drm/nexell: add render node support
authorInki Dae <inki.dae@samsung.com>
Mon, 25 Sep 2017 09:47:47 +0000 (18:47 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 29 Jan 2019 02:25:31 +0000 (11:25 +0900)
Add render node support to rendering relevant ioctls.

Clients require access authorization from DRM master to access
some rendering relevant interfaces - especially flink things,
and it incurs performance drop due to hand-shaking between
Client and Server, DRM master.

So this patch makes access to these interfaces not to be required
anymore.

Change-Id: I73e6d448ce3bc2ac1770826d485e8eb54323e9ae
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/nexell/nx_drm_drv.c

index 9fec20adc9ef34b798825095fb69024109d08ecf..ae3a9b2a253c8419b6f604baacc68f90fd30baa6 100644 (file)
@@ -275,9 +275,9 @@ static int nx_drm_unload(struct drm_device *drm)
 
 static struct drm_ioctl_desc nx_drm_ioctls[] = {
        DRM_IOCTL_DEF_DRV(NX_GEM_CREATE, nx_drm_gem_create_ioctl,
-                       DRM_UNLOCKED | DRM_AUTH),
+                       DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(NX_GEM_SYNC, nx_drm_gem_sync_ioctl,
-                       DRM_UNLOCKED | DRM_AUTH),
+                       DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(NX_GEM_GET, nx_drm_gem_get_ioctl,
                        DRM_UNLOCKED),
 };
@@ -333,8 +333,7 @@ static struct dma_buf *__drm_gem_prime_export(struct drm_device *drm,
 
 static struct drm_driver nx_drm_driver = {
        .driver_features = DRIVER_MODESET |
-               DRIVER_GEM | DRIVER_PRIME | DRIVER_ATOMIC,
-
+               DRIVER_GEM | DRIVER_PRIME | DRIVER_ATOMIC | DRIVER_RENDER,
        .load = nx_drm_load,
        .unload = nx_drm_unload,
        .fops = &nx_drm_fops,   /* replace fops */