[PATCH] drm: enforce dumb allocation flags policy

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

 



From: Dave Airlie <airlied@xxxxxxxxxx>

I thought you could be trusted people, looks like I was wrong, no flags
for you.

I propose possibly adding a cursor flag here since it might be useful for
some people.

Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
---
 drivers/gpu/drm/drm_crtc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index dd64a06..490d57a 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -3829,6 +3829,9 @@ int drm_mode_create_dumb_ioctl(struct drm_device *dev,
 
 	if (!dev->driver->dumb_create)
 		return -ENOSYS;
+	/* kernel doesn't understand any flags yet */
+	if (args->flags)
+		return -EINVAL;
 	return dev->driver->dumb_create(file_priv, dev, args);
 }
 
-- 
1.8.1.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux