Subject: Re: Unable to mmap /dev/mem
To: Jared D. McNeill <jmcneill@invisible.yi.org>
From: Matthieu Herrb <matthieu@laas.fr>
List: tech-x11
Date: 11/13/2000 17:44:03
--YjhTy34M0C
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit
You wrote (in your message from Monday 13)
> On Mon, 13 Nov 2000, Matthieu Herrb wrote:
> > In this case you need to use the aperture driver and to patch the
> > application to try /dev/xf86 if /dev/mem fails.
>
> The only place that '/dev/mem' is referenced to in the source of the
> program is an open() call, to see if the device exists. XF86DGAGetVideo is
> called just after. 'strings libXxf86dga.a | less' shows '/dev/mem', but no
> '/dev/xf86'. Sounds like XF86DGAGetVideo doesn't have a choice; does this
> mean our X server is broken?
>
Not the Xserver. The DGA library. Sorry I've never played with any DGA
application, so I didn't notice this problem. We need to patch
xsrc/xc/lib/Xxf86dga/XF86DGA.c. If you have an xsrc tree, can you try
the following patch, rebuild/install in xc/lib/Xxf86dga
and try again ?
If it works, it should probably be send-pr'd.
Matthieu
--YjhTy34M0C
Content-Type: application/octet-stream
Content-Description: libXxf86dga patch
Content-Disposition: attachment;
filename="diffs.dga"
Content-Transfer-Encoding: base64
LS0tIHhzcmMveGMvbGliL1h4Zjg2ZGdhL1hGODZER0EuY34JVGh1IFNlcCAgMiAxMzoxODox
OSAxOTk5CisrKyB4c3JjL3hjL2xpYi9YeGY4NmRnYS9YRjg2REdBLmMJTW9uIE5vdiAxMyAx
NzozMzoyOCAyMDAwCkBAIC00NzQsNiArNDc0LDEwIEBACiAjZGVmaW5lIERFVl9NRU0gIi9k
ZXYvbWVtIgogI2VuZGlmCiAKKyNpZmRlZiBIQVNfQVBFUlRVUkVfRFJWCisjZGVmaW5lIERF
Vl9BUEVSVFVSRSAiL2Rldi94Zjg2IgorI2VuZGlmCisKICNpZiBkZWZpbmVkKElTQykgJiYg
ZGVmaW5lZChIQVNfU1ZSM19NTUFQKQogc3RydWN0IGtkX21lbWxvYyBYRnJlZTg2b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