public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: what's the difference between smem_start and mmio_start?
Date: Fri, 24 Apr 2015 07:42:04 +0000	[thread overview]
Message-ID: <20150424073004.GE3489@sudip-PC> (raw)
In-Reply-To: <CADvLq87aq7m-xuf6XbOq7rDDjLORwiW-5O0qd5tfm+_H_xd05w@mail.gmail.com>

On Sat, Apr 18, 2015 at 03:46:48PM +0800, z f wrote:
> what's the difference between smem_start member and mmio_start member
> in struct fb_fix_screeninfo?

let me try, but I am not sure that I am fully correct.
smem_start gives you the starting address where your framebuffer memory
starts. mmio_start will give you the memory address from where you can
access memory mapped io ports.
I dont think that all the hardware will follow the same location rules.

like, if you consider the driver that I have in staging/sm7xxfb,
the memory map is like:

________________________________  0MB
|				|	
|  display memory		|
|				|
|				|
|_______________________________| 4MB
|				|
|_______________________________| 5MB
|				|
| memory mapped io port  	|
|				|
|_______________________________|

so here I have:

smem_start = pci_resource_start (pdev, 0);
mmio_start = smem_start + 4MB

but if you see the radeon driver you will see thay have
smem_start = pci_resource_start (pdev, 0);
and
mmio_start = pci_resource_start (pdev, 2);

regards
sudip

      reply	other threads:[~2015-04-24  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18  7:46 what's the difference between smem_start and mmio_start? z f
2015-04-24  7:42 ` Sudip Mukherjee [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=20150424073004.GE3489@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox