tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: non-PCI driver name lookup



maya%netbsd.org@localhost wrote:
>On Sun, Jul 07, 2019 at 11:23:14PM +0100, Robert Swindells wrote:
>> 
>> The pinebook uses the modesetting X11 driver.
>> 
>> An application that calls DRI2Connect() doesn't get back valid values
>> for device name and driver name so typically assumes that DRI2 isn't
>> available.
>> 
>> This looks to be down to how libdrm tries to work out which driver is
>> being used from an open file descriptor. I presume the NetBSD specific
>> code in it does work for PCI devices but it looks like we need to add
>> something for display devices that are built into the CPU.
> 
>I assume, although I can't find proof that it's the case, that you want
>to adjust the 'unique' value.
>
>arm/nvidia/tegra_nouveau.c
>257:	master->unique = kmem_asprintf("platform:tegra_nouveau:%02d", id);

The 'unique' value ought to be fine, there is code in
arm/sunxi/sunxi_drm.c to create it, but it never gets called.

>I think the code in libdrm looks at this value via DRM_IOCTL_GET_UNIQUE,
>but I'm not sure.

It does, and creation of the unique value should be done lazily from
the DRM_IOCTL_SET_VERSION ioctl. This ioctl fails as the is_master
member of the file struct for the drm device isn't set. Not got any
further in tracking down why.




Home | Main Index | Thread Index | Old Index