Results 1 to 3 of 3

Thread: Display memory access

  1. #1
    Join Date
    Sep 2009

    Display memory access

    Can someone give me a pointer on how to access the display memory directly? I am looking to send the RGB components of a screen section to another device, and although it appears there are libraries and methods for screenshotting or copying it, I'd like to just be able to access the RGB memory directly. Is this possible?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2005
    Fargo, ND, USA
    Kubuntu 10.04 Lucid Lynx

    Re: Display memory access

    I don't know how easy it would be, but it's possible. I once worked on a project with an LCD screen. I needed to draw to it from userspace, but obviously I needed to expose it to userspace from the kernel. I wrote a driver that was basically a minimal framebuffer driver that allocated a page of physical memory at a known address. In userspace I could mmap() that page and read/write to it.

    Now, all of this was on an ARM single board computer, and the way the LCD was actually accessed was through two memory mapped addresses, so the stuff I did just made it look like a framebuffer. From what I understand, on x86, there is a BIOS interface to the display memory, which is how DOS used to display graphics. You might be able to access this through the framebuffer kernel interface (e.g. /dev/fbX).

    I'm not sure how all this applies to X11, but it is probably completely different there.
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

  3. #3
    Join Date
    Aug 2007

    Re: Display memory access

    I think this is what DRI is for, although I know no specifics.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts