aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2014-11-11 15:31:16 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2015-06-19 14:17:28 +0100
commiteea4a8ed6da8af40de54999d608f263c5c82a462 (patch)
tree3f407985072175533d89a106b869afaf665473dc
parent200dacfa3b9c7d39d67c789c750cb83829d64215 (diff)
downloadlinux-eea4a8ed6da8af40de54999d608f263c5c82a462.tar.gz
drm: sti: Honour O_RDWR during prime-handle-to-fd
Currently the sti drm driver forcible applies O_RDWR when it exports a prime handle. This is because it was not previously possible for user requests to create the fd with O_RDWR passed into drivers. This is a cleanup to remove this code. This change has obvious impact upon the userspace which must change the flags passed to DRM_IOCTL_PRIME_HANDLE_TO_FD. However at present only a tiny handful of developers run this userspace and, if they don't complain, nobody else will. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r--drivers/gpu/drm/sti/sti_drm_drv.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/sti/sti_drm_drv.c b/drivers/gpu/drm/sti/sti_drm_drv.c
index 59d558b400b3..bec1b1d609f4 100644
--- a/drivers/gpu/drm/sti/sti_drm_drv.c
+++ b/drivers/gpu/drm/sti/sti_drm_drv.c
@@ -181,15 +181,6 @@ static const struct file_operations sti_drm_driver_fops = {
.release = drm_release,
};
-static struct dma_buf *sti_drm_gem_prime_export(struct drm_device *dev,
- struct drm_gem_object *obj,
- int flags)
-{
- /* we want to be able to write in mmapped buffer */
- flags |= O_RDWR;
- return drm_gem_prime_export(dev, obj, flags);
-}
-
static struct drm_driver sti_drm_driver = {
.driver_features = DRIVER_HAVE_IRQ | DRIVER_MODESET |
DRIVER_GEM | DRIVER_PRIME,
@@ -207,7 +198,7 @@ static struct drm_driver sti_drm_driver = {
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
- .gem_prime_export = sti_drm_gem_prime_export,
+ .gem_prime_export = drm_gem_prime_export,
.gem_prime_import = drm_gem_prime_import,
.gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
.gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,