All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Cooksey <thomas.cooksey@trolltech.com>
To: Daniel J Laird <daniel.j.laird@nxp.com>
Cc: Robert Schwebel <r.schwebel@pengutronix.de>,
	linux-embedded mailing list <linux-embedded@vger.kernel.org>
Subject: Re: Getting physical addresses of mmap'd pages from userspace
Date: Tue, 14 Oct 2008 11:03:06 +0200	[thread overview]
Message-ID: <200810141103.06994.thomas.cooksey@trolltech.com> (raw)
In-Reply-To: <C13DBBE85AD6974B85C118C35890CA5F13B1B2F0AB@EU1RDCRDC1WX029.exi.nxp.com>

On Tuesday 14 October 2008 09:31:51 Daniel J Laird wrote:
> We have a 2D chip on board with our silicon.
> It too had a driver in kernel space and a queue in user space that allowed us to post jobs to it like Blit/Fill etc.
> 
> We run DirectFB on the platform and we too needed to get Physical addresses etc.
> 
> In the end what we did was use Linux FB device to allocate our memory.
> 
> We allocate more than we need in the FB device when it is created.
> The Double buffered FB comes first and what is left over we use as scratch memory.
> This allows us to create surfaces etc in this 'scratch' memory.
> When we need the physical address we use the offset from FB base in virtual memory (user space) and add that the physical base address of FB device.
> This then allows us to post the job to the 2D hardware.
> 
> This approach has worked on 2 different chips now.  Maybe this might help for you?

This is something I hadn't concidered - I'd forgotton that fbdev lets you query
the physical address of the framebuffer. I'm not sure it's possible to ask the
framebuffer device to use more memory however. The amount of memory is returned
in the fb_fix_screeninfo struct. I guess you must have implemented your own 
fbdev driver?

On a side note, I'm also tracking the DRM discussions on an in-kernel memory
manager for graphics. It seems a lot of what I'm trying to do is exactly what
the new memory manager is supposed to do. It sounds like this is also what you
needed? I'm asking because the DRM+GEM+modesetting API looks like a good API
for basic hardware as well as the more advanced desktop hardware it's intended
for. It would be really good if one day kernel graphics APIs could be unified.


Cheers,

Tom

      reply	other threads:[~2008-10-14  9:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 16:15 Getting physical addresses of mmap'd pages from userspace Tom Cooksey
2008-10-10 16:37 ` Bart Van Assche
2008-10-10 19:12 ` Robert Schwebel
2008-10-13  6:33   ` Tom Cooksey
2008-10-13  7:00     ` Robert Schwebel
2008-10-13  7:20       ` Tom Cooksey
2008-10-13  7:28       ` Thomas Petazzoni
2008-10-13  7:31         ` Robert Schwebel
2008-10-13 12:50       ` Bill Gatliff
2008-10-13 13:23         ` Robert Schwebel
2008-10-13 15:58           ` George G. Davis
2008-10-13 16:09             ` Robert Schwebel
2008-10-14  6:36               ` Tom Cooksey
2008-10-14 15:47                 ` Bill Gatliff
2008-10-15  7:06                   ` Tom Cooksey
2008-10-15  8:30                     ` James Chapman
2008-10-15 18:27                   ` Robert Schwebel
2008-10-15 18:29                     ` Bill Gatliff
2008-10-13  9:37     ` Gilad Ben-Yossef
     [not found]     ` <48F31155.6090603@codefidence.com>
2008-10-13  9:38       ` Tom Cooksey
2008-10-13 12:48     ` Bill Gatliff
2008-10-13 14:45       ` Tom Cooksey
2008-10-13 15:09         ` Daniel THOMPSON
2008-10-13 17:21           ` George G. Davis
2008-10-13 17:29     ` Chris
2008-10-14  6:46       ` Tom Cooksey
2008-10-14  7:31     ` Daniel J Laird
2008-10-14  9:03       ` Tom Cooksey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810141103.06994.thomas.cooksey@trolltech.com \
    --to=thomas.cooksey@trolltech.com \
    --cc=daniel.j.laird@nxp.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=r.schwebel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.