Subject: Re: drm on amd64 (drmMap failed)
To: Xning Lee <email@example.com>
From: Matt Thomas <firstname.lastname@example.org>
Date: 04/06/2007 08:52:19
On Apr 5, 2007, at 11:17 PM, Xning Lee wrote:
> Matt Thomas <email@example.com> writes:
>> Xning Lee wrote:
>>> "Blair Sadewitz" <firstname.lastname@example.org> writes:
>>>> This is exactly the same problem I had on amd64; I've since
>>>> to i386 (for reasons other than drm; linux compatability on
>>>> amd64 for
>>>> EMT64 processors is broken). Could you file a PR for this, please?
>>> The issue of 'drmMap failed' on amd64 because the function
>>> 'udv_attach' of /usr/src/sys/uvm/uvm_device.c can't accept address
>>> offset value more than 0x7fffffffffffffff: (the type of 'voff_t'
>>> is int64)
>> This is going to be, ultimately, a sign extension problem. I'm
>> that line 176 in drm_ioctl.c would show that the address being
>> passed in
>> has already been sign-extended.
> that because at line 190 in drm_bufs.c, the address
> value('map->handle') that retured by 'malloc' has been more than
> 0x7fffffffffffffff, then at line 197 in drm_bufs.c:
> map->offset = (unsigned long)map->handle;
Since you can't use a malloc'ed address with mmap, it's probably not
mmap wants a physical address, not a virtual address.