From: Jon Smirl <jonsmirl@gmail.com>
To: lkml <linux-kernel@vger.kernel.org>, Dave Airlie <airlied@linux.ie>
Subject: sparse, __iomem and framebuffer memory
Date: Fri, 24 Sep 2004 23:13:52 -0400 [thread overview]
Message-ID: <9e47339104092420131410dd3@mail.gmail.com> (raw)
I just spent sometime looking at about a thousand errors from sparse
in the DRM code.
There are two main problems, first DRM makes use of opaque handles
which are passed to user space. These handles can be to normal or
iomem memory. Since the handles are typeless this generates a lot of
sparse errors. Other data associated with the handle can be use to
tell if it is normal or iomem.
Second the DRM code always treats the framebuffer as if it is in
IOMEM. But what about IGP type devices where the framebuffer is in
main memory? These only exist on the x86 so treating their framebuffer
as IOMEM works since there is no difference between IOMEM and normal
memory access on an x86.
Is there an example of a IGP type device on an architecture where
normal and IOMEM need different access functions? I suspect DRI/DRM
would break on the device.
This implies that DRM should be passing back two distinct handle
types, one for normal and one for IOMEM, so that the user space app
will use the correct access function. This is also a pretty good
argument for hiding direct framebuffer access and forcing access with
read/write calls on a handle like the IA64 people want to do.
Of course there are a thousand errors to browse though and I may not
be interpreting everything right.
--
Jon Smirl
jonsmirl@gmail.com
reply other threads:[~2004-09-25 3:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9e47339104092420131410dd3@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=airlied@linux.ie \
--cc=linux-kernel@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