[PATCH] drm: allow DRM_IOCTL_VERSION on render-nodes

David Herrmann dh.herrmann at gmail.com
Sun Nov 3 03:04:39 PST 2013


Hi Dave

That one should go into 3.13. I'd like to keep drm.rnodes=0 for one
more release. OpenCL is reported to be working with this (thanks to
Tom), OpenGL isn't working, yet as it relies on flink names. Patches
are available to make OpenGL work on rnodes with mesa.

Cheers
David

On Mon, Oct 28, 2013 at 11:22 AM, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Mon, Oct 28, 2013 at 10:55:49AM +0100, David Herrmann wrote:
>> DRM_IOCTL_VERSION is a reliable way to get the driver-name and version
>> information. It's not related to the interface-version (SET_VERSION ioctl)
>> so we can safely enable it on render-nodes.
>>
>> Note that gbm uses udev-BUSID to load the correct mesa driver. However,
>> the VERSION ioctl should be the more reliable way to do this (in case we
>> add new DRM-bus drivers which have no BUSID or similar).
>>
>> Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>> ---
>>  drivers/gpu/drm/drm_drv.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
>> index 21cd5f5..e01168b 100644
>> --- a/drivers/gpu/drm/drm_drv.c
>> +++ b/drivers/gpu/drm/drm_drv.c
>> @@ -61,7 +61,7 @@ static int drm_version(struct drm_device *dev, void *data,
>>
>>  /** Ioctl table */
>>  static const struct drm_ioctl_desc drm_ioctls[] = {
>> -     DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED),
>> +     DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED|DRM_RENDER_ALLOW),
>>       DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0),
>>       DRM_IOCTL_DEF(DRM_IOCTL_GET_MAGIC, drm_getmagic, 0),
>>       DRM_IOCTL_DEF(DRM_IOCTL_IRQ_BUSID, drm_irq_by_busid, DRM_MASTER|DRM_ROOT_ONLY),
>> --
>> 1.8.4.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list