Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282479
b: refs/heads/master
c: acb4b99
h: refs/heads/master
i:
  282477: 074b516
  282475: 749cbf1
  282471: eb46db1
  282463: 9fd3191
v: v3
  • Loading branch information
Jesse Barnes authored and Dave Airlie committed Dec 6, 2011
1 parent e1becdf commit c311d0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a62c93d5df1695535afa1413f6496adc219a196e
refs/heads/master: acb4b992d8a13728044f430b47b9199aa45993e9
19 changes: 4 additions & 15 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,10 +1877,8 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

if (!req->flags) {
DRM_ERROR("no operation set\n");
if (!req->flags)
return -EINVAL;
}

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, req->crtc_id, DRM_MODE_OBJECT_CRTC);
Expand All @@ -1893,7 +1891,6 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,

if (req->flags & DRM_MODE_CURSOR_BO) {
if (!crtc->funcs->cursor_set) {
DRM_ERROR("crtc does not support cursor\n");
ret = -ENXIO;
goto out;
}
Expand All @@ -1906,7 +1903,6 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
if (crtc->funcs->cursor_move) {
ret = crtc->funcs->cursor_move(crtc, req->x, req->y);
} else {
DRM_ERROR("crtc does not support cursor\n");
ret = -EFAULT;
goto out;
}
Expand Down Expand Up @@ -1989,14 +1985,11 @@ int drm_mode_addfb(struct drm_device *dev,
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

if ((config->min_width > r.width) || (r.width > config->max_width)) {
DRM_ERROR("mode new framebuffer width not within limits\n");
if ((config->min_width > r.width) || (r.width > config->max_width))
return -EINVAL;
}
if ((config->min_height > r.height) || (r.height > config->max_height)) {
DRM_ERROR("mode new framebuffer height not within limits\n");

if ((config->min_height > r.height) || (r.height > config->max_height))
return -EINVAL;
}

mutex_lock(&dev->mode_config.mutex);

Expand Down Expand Up @@ -2110,7 +2103,6 @@ int drm_mode_rmfb(struct drm_device *dev,
obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB);
/* TODO check that we really get a framebuffer back. */
if (!obj) {
DRM_ERROR("mode invalid framebuffer id\n");
ret = -EINVAL;
goto out;
}
Expand All @@ -2121,7 +2113,6 @@ int drm_mode_rmfb(struct drm_device *dev,
found = 1;

if (!found) {
DRM_ERROR("tried to remove a fb that we didn't own\n");
ret = -EINVAL;
goto out;
}
Expand Down Expand Up @@ -2168,7 +2159,6 @@ int drm_mode_getfb(struct drm_device *dev,
mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
if (!obj) {
DRM_ERROR("invalid framebuffer id\n");
ret = -EINVAL;
goto out;
}
Expand Down Expand Up @@ -2204,7 +2194,6 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
if (!obj) {
DRM_ERROR("invalid framebuffer id\n");
ret = -EINVAL;
goto out_err1;
}
Expand Down

0 comments on commit c311d0a

Please sign in to comment.