public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found.
@ 2016-10-21 17:12 Eric Anholt
  2016-10-21 17:12 ` [PATCH libdrm 2/2] Silence runtime complaints on platform devices Eric Anholt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eric Anholt @ 2016-10-21 17:12 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel, Rob Herring, Eric Anholt

From: Rob Herring <robh@kernel.org>

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 <eric@anholt.net>
---
 xf86drm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xf86drm.c b/xf86drm.c
index 9cfca49ddfda..9b52889e4cef 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH libdrm 2/2] Silence runtime complaints on platform devices
  2016-10-21 17:12 [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Eric Anholt
@ 2016-10-21 17:12 ` Eric Anholt
  2016-10-21 17:32   ` Alex Deucher
  2016-10-24 11:11   ` Emil Velikov
  2016-10-21 17:24 ` [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Alex Deucher
  2016-10-21 17:31 ` Emil Velikov
  2 siblings, 2 replies; 7+ messages in thread
From: Eric Anholt @ 2016-10-21 17:12 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel, 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 <eric@anholt.net>
---
 xf86drm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xf86drm.c b/xf86drm.c
index 9b52889e4cef..52add5e441d7 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found.
  2016-10-21 17:12 [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Eric Anholt
  2016-10-21 17:12 ` [PATCH libdrm 2/2] Silence runtime complaints on platform devices Eric Anholt
@ 2016-10-21 17:24 ` Alex Deucher
  2016-10-21 17:31 ` Emil Velikov
  2 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2016-10-21 17:24 UTC (permalink / raw)
  To: Eric Anholt; +Cc: Maling list - DRI developers, LKML

On Fri, Oct 21, 2016 at 1:12 PM, Eric Anholt <eric@anholt.net> wrote:
> From: Rob Herring <robh@kernel.org>
>
> 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 <eric@anholt.net>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  xf86drm.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index 9cfca49ddfda..9b52889e4cef 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found.
  2016-10-21 17:12 [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Eric Anholt
  2016-10-21 17:12 ` [PATCH libdrm 2/2] Silence runtime complaints on platform devices Eric Anholt
  2016-10-21 17:24 ` [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Alex Deucher
@ 2016-10-21 17:31 ` Emil Velikov
  2 siblings, 0 replies; 7+ messages in thread
From: Emil Velikov @ 2016-10-21 17:31 UTC (permalink / raw)
  To: Eric Anholt; +Cc: ML dri-devel, Linux-Kernel@Vger. Kernel. Org

On 21 October 2016 at 18:12, Eric Anholt <eric@anholt.net> wrote:
> From: Rob Herring <robh@kernel.org>
>
> 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 <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

Thanks
Emil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm 2/2] Silence runtime complaints on platform devices
  2016-10-21 17:12 ` [PATCH libdrm 2/2] Silence runtime complaints on platform devices Eric Anholt
@ 2016-10-21 17:32   ` Alex Deucher
  2016-10-24 11:11   ` Emil Velikov
  1 sibling, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2016-10-21 17:32 UTC (permalink / raw)
  To: Eric Anholt; +Cc: Maling list - DRI developers, LKML

On Fri, Oct 21, 2016 at 1:12 PM, Eric Anholt <eric@anholt.net> wrote:
> 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 <eric@anholt.net>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  xf86drm.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index 9b52889e4cef..52add5e441d7 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm 2/2] Silence runtime complaints on platform devices
  2016-10-21 17:12 ` [PATCH libdrm 2/2] Silence runtime complaints on platform devices Eric Anholt
  2016-10-21 17:32   ` Alex Deucher
@ 2016-10-24 11:11   ` Emil Velikov
  2016-10-24 16:35     ` Eric Anholt
  1 sibling, 1 reply; 7+ messages in thread
From: Emil Velikov @ 2016-10-24 11:11 UTC (permalink / raw)
  To: Eric Anholt; +Cc: ML dri-devel, Linux-Kernel@Vger. Kernel. Org

On 21 October 2016 at 18:12, Eric Anholt <eric@anholt.net> wrote:
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm 2/2] Silence runtime complaints on platform devices
  2016-10-24 11:11   ` Emil Velikov
@ 2016-10-24 16:35     ` Eric Anholt
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Anholt @ 2016-10-24 16:35 UTC (permalink / raw)
  To: Emil Velikov; +Cc: ML dri-devel, Linux-Kernel@Vger. Kernel. Org

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Emil Velikov <emil.l.velikov@gmail.com> writes:

> On 21 October 2016 at 18:12, Eric Anholt <eric@anholt.net> wrote:
>> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-10-24 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-21 17:12 [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Eric Anholt
2016-10-21 17:12 ` [PATCH libdrm 2/2] Silence runtime complaints on platform devices Eric Anholt
2016-10-21 17:32   ` Alex Deucher
2016-10-24 11:11   ` Emil Velikov
2016-10-24 16:35     ` Eric Anholt
2016-10-21 17:24 ` [PATCH libdrm 1/2] Return an -ENODEV from drmGetDevice() when no device was found Alex Deucher
2016-10-21 17:31 ` Emil Velikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox