Return an -ENODEV from drmGetDevice() when no device was found.
PATCH 1/2 Return an -ENODEV from drmGetDevice() when no device was found.
From: Rob Herring <[email protected]>
Fixes crashes in Mesa on platform device, which expected *device to have a device when 0 was returned.
(code from a paste by Rob, commit message by anholt)
--- xf86drm.c | 2 ++ 1 file changed, 2 insertions(+)
xf86drm.c +2 -0
@@ -3181,6 +3181,8 @@ int drmGetDevice(int fd, drmDevicePtr *device)closedir (sysdir);free (local_devices); +if (*device ==NULL ) +return -ENODEV ;return 0 ; free_devices:
Signature · 1 line
2.9.3
PATCH 2/2 Silence runtime complaints on platform devices
glxgears was spamming this 12 times at startup because of Mesa's probing of the DRM device code, which doesn't support platform devices.
--- xf86drm.c | 2 -- 1 file changed, 2 deletions(-)
xf86drm.c +0 -2
@@ -3149,7 +3149,6 @@ int drmGetDevice(int fd, drmDevicePtr *device)break ;default : -fprintf (stderr,"The subsystem type is not supported yet\n" );continue ; }
@@ -3259,7 +3258,6 @@ int drmGetDevices(drmDevicePtr devices[], int max_devices)break ;default : -fprintf (stderr,"The subsystem type is not supported yet\n" );continue ; }
Signature · 1 line
2.9.3
Re: [PATCH libdrm 2/2] Silence runtime complaints on platform devices
Quoted 5 lines · Eric Anholt
glxgears was spamming this 12 times at startup because of Mesa's probing of the DRM device code, which doesn't support platform devices.
Signed-off-by Eric Anholt <[email protected]>
Quoted 27 lines
--- xf86drm.c | 2 -- 1 file changed, 2 deletions(-)xf86drm.c +0
-3@@ -3149,7 +3149,6 @@ int drmGetDevice(int fd, drmDevicePtr *device)break ;default : -fprintf (stderr,"The subsystem type is not supported yet\n" );continue ; }@@ -3259,7 +3258,6 @@ int drmGetDevices(drmDevicePtr devices[], int max_devices)break ;default : -fprintf (stderr,"The subsystem type is not supported yet\n" );continue ; } --2.9.3
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm 2/2] Silence runtime complaints on platform devices
In reply to Eric AnholtQuoted 4 lines · Eric Anholt
glxgears was spamming this 12 times at startup because of Mesa's probing of the DRM device code, which doesn't support platform devices.
Better option is to add support for platform devices. Can we get anyone interested in that ?
If we drop (the annoying) printf people will just ignore/forget about it, and things will fall through the cracks - similar to the 5+ pokes (at various people) to add support.
On the cool side - it will allow you to use the DRI_PRIME/driconf's device_id=libudev_path_id_tag to manage the devices on your system.
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm 2/2] Silence runtime complaints on platform devices
Quoted 7 lines · Emil Velikov
Quoted 4 lines · Eric Anholt
glxgears was spamming this 12 times at startup because of Mesa's probing of the DRM device code, which doesn't support platform devices.
Better option is to add support for platform devices. Can we get anyone interested in that ?
I agree it would be good but it certainly isn't remotely near the top of my todo list. I'm just fixing up regressions.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Eric Anholt
From: Rob Herring <[email protected]>
Fixes crashes in Mesa on platform device, which expected *device to have a device when 0 was returned.
(code from a paste by Rob, commit message by anholt)
Signed-off-by Eric Anholt <[email protected]>
Quoted 20 lines
--- xf86drm.c | 2 ++ 1 file changed, 2 insertions(+)xf86drm.c +2
-1@@ -3181,6 +3181,8 @@ int drmGetDevice(int fd, drmDevicePtr *device)closedir (sysdir);free (local_devices); +if (*device ==NULL ) +return -ENODEV ;return 0 ; free_devices: --2.9.3
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Eric Anholt
From: Rob Herring <[email protected]>
Fixes crashes in Mesa on platform device, which expected *device to have a device when 0 was returned.
(code from a paste by Rob, commit message by anholt)
Signed-off-by Eric Anholt <[email protected]>
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel