diff options
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 1dfc2860075..255658906fc 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -1877,10 +1877,8 @@ int drm_mode_cursor_ioctl(struct drm_device *dev, | |||
1877 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 1877 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) |
1878 | return -EINVAL; | 1878 | return -EINVAL; |
1879 | 1879 | ||
1880 | if (!req->flags) { | 1880 | if (!req->flags) |
1881 | DRM_ERROR("no operation set\n"); | ||
1882 | return -EINVAL; | 1881 | return -EINVAL; |
1883 | } | ||
1884 | 1882 | ||
1885 | mutex_lock(&dev->mode_config.mutex); | 1883 | mutex_lock(&dev->mode_config.mutex); |
1886 | obj = drm_mode_object_find(dev, req->crtc_id, DRM_MODE_OBJECT_CRTC); | 1884 | obj = drm_mode_object_find(dev, req->crtc_id, DRM_MODE_OBJECT_CRTC); |
@@ -1893,7 +1891,6 @@ int drm_mode_cursor_ioctl(struct drm_device *dev, | |||
1893 | 1891 | ||
1894 | if (req->flags & DRM_MODE_CURSOR_BO) { | 1892 | if (req->flags & DRM_MODE_CURSOR_BO) { |
1895 | if (!crtc->funcs->cursor_set) { | 1893 | if (!crtc->funcs->cursor_set) { |
1896 | DRM_ERROR("crtc does not support cursor\n"); | ||
1897 | ret = -ENXIO; | 1894 | ret = -ENXIO; |
1898 | goto out; | 1895 | goto out; |
1899 | } | 1896 | } |
@@ -1906,7 +1903,6 @@ int drm_mode_cursor_ioctl(struct drm_device *dev, | |||
1906 | if (crtc->funcs->cursor_move) { | 1903 | if (crtc->funcs->cursor_move) { |
1907 | ret = crtc->funcs->cursor_move(crtc, req->x, req->y); | 1904 | ret = crtc->funcs->cursor_move(crtc, req->x, req->y); |
1908 | } else { | 1905 | } else { |
1909 | DRM_ERROR("crtc does not support cursor\n"); | ||
1910 | ret = -EFAULT; | 1906 | ret = -EFAULT; |
1911 | goto out; | 1907 | goto out; |
1912 | } | 1908 | } |
@@ -1989,14 +1985,11 @@ int drm_mode_addfb(struct drm_device *dev, | |||
1989 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 1985 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) |
1990 | return -EINVAL; | 1986 | return -EINVAL; |
1991 | 1987 | ||
1992 | if ((config->min_width > r.width) || (r.width > config->max_width)) { | 1988 | if ((config->min_width > r.width) || (r.width > config->max_width)) |
1993 | DRM_ERROR("mode new framebuffer width not within limits\n"); | ||
1994 | return -EINVAL; | 1989 | return -EINVAL; |
1995 | } | 1990 | |
1996 | if ((config->min_height > r.height) || (r.height > config->max_height)) { | 1991 | if ((config->min_height > r.height) || (r.height > config->max_height)) |
1997 | DRM_ERROR("mode new framebuffer height not within limits\n"); | ||
1998 | return -EINVAL; | 1992 | return -EINVAL; |
1999 | } | ||
2000 | 1993 | ||
2001 | mutex_lock(&dev->mode_config.mutex); | 1994 | mutex_lock(&dev->mode_config.mutex); |
2002 | 1995 | ||
@@ -2110,7 +2103,6 @@ int drm_mode_rmfb(struct drm_device *dev, | |||
2110 | obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB); | 2103 | obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB); |
2111 | /* TODO check that we really get a framebuffer back. */ | 2104 | /* TODO check that we really get a framebuffer back. */ |
2112 | if (!obj) { | 2105 | if (!obj) { |
2113 | DRM_ERROR("mode invalid framebuffer id\n"); | ||
2114 | ret = -EINVAL; | 2106 | ret = -EINVAL; |
2115 | goto out; | 2107 | goto out; |
2116 | } | 2108 | } |
@@ -2121,7 +2113,6 @@ int drm_mode_rmfb(struct drm_device *dev, | |||
2121 | found = 1; | 2113 | found = 1; |
2122 | 2114 | ||
2123 | if (!found) { | 2115 | if (!found) { |
2124 | DRM_ERROR("tried to remove a fb that we didn't own\n"); | ||
2125 | ret = -EINVAL; | 2116 | ret = -EINVAL; |
2126 | goto out; | 2117 | goto out; |
2127 | } | 2118 | } |
@@ -2168,7 +2159,6 @@ int drm_mode_getfb(struct drm_device *dev, | |||
2168 | mutex_lock(&dev->mode_config.mutex); | 2159 | mutex_lock(&dev->mode_config.mutex); |
2169 | obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB); | 2160 | obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB); |
2170 | if (!obj) { | 2161 | if (!obj) { |
2171 | DRM_ERROR("invalid framebuffer id\n"); | ||
2172 | ret = -EINVAL; | 2162 | ret = -EINVAL; |
2173 | goto out; | 2163 | goto out; |
2174 | } | 2164 | } |
@@ -2204,7 +2194,6 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev, | |||
2204 | mutex_lock(&dev->mode_config.mutex); | 2194 | mutex_lock(&dev->mode_config.mutex); |
2205 | obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB); | 2195 | obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB); |
2206 | if (!obj) { | 2196 | if (!obj) { |
2207 | DRM_ERROR("invalid framebuffer id\n"); | ||
2208 | ret = -EINVAL; | 2197 | ret = -EINVAL; |
2209 | goto out_err1; | 2198 | goto out_err1; |
2210 | } | 2199 | } |