diff options
Diffstat (limited to 'drivers/gpu/drm/drm_plane.c')
-rw-r--r-- | drivers/gpu/drm/drm_plane.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 6153cbda239f..1fa98bd12003 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -20,8 +20,17 @@ * OF THIS SOFTWARE. */ -#include <drm/drmP.h> +#include <linux/slab.h> +#include <linux/uaccess.h> + #include <drm/drm_plane.h> +#include <drm/drm_drv.h> +#include <drm/drm_print.h> +#include <drm/drm_framebuffer.h> +#include <drm/drm_file.h> +#include <drm/drm_crtc.h> +#include <drm/drm_fourcc.h> +#include <drm/drm_vblank.h> #include "drm_crtc_internal.h" @@ -463,15 +472,13 @@ int drm_mode_getplane_res(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_mode_get_plane_res *plane_resp = data; - struct drm_mode_config *config; struct drm_plane *plane; uint32_t __user *plane_ptr; int count = 0; if (!drm_core_check_feature(dev, DRIVER_MODESET)) - return -EINVAL; + return -EOPNOTSUPP; - config = &dev->mode_config; plane_ptr = u64_to_user_ptr(plane_resp->plane_id_ptr); /* @@ -507,7 +514,7 @@ int drm_mode_getplane(struct drm_device *dev, void *data, uint32_t __user *format_ptr; if (!drm_core_check_feature(dev, DRIVER_MODESET)) - return -EINVAL; + return -EOPNOTSUPP; plane = drm_plane_find(dev, file_priv, plane_resp->plane_id); if (!plane) @@ -774,7 +781,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data, int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) - return -EINVAL; + return -EOPNOTSUPP; /* * First, find the plane, crtc, and fb objects. If not available, @@ -912,7 +919,7 @@ static int drm_mode_cursor_common(struct drm_device *dev, int ret = 0; if (!drm_core_check_feature(dev, DRIVER_MODESET)) - return -EINVAL; + return -EOPNOTSUPP; if (!req->flags || (~DRM_MODE_CURSOR_FLAGS & req->flags)) return -EINVAL; @@ -1016,7 +1023,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, int ret = -EINVAL; if (!drm_core_check_feature(dev, DRIVER_MODESET)) - return -EINVAL; + return -EOPNOTSUPP; if (page_flip->flags & ~DRM_MODE_PAGE_FLIP_FLAGS) return -EINVAL; |