diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-24 03:55:08 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 05:18:13 -0400 |
commit | 1cff8f6b4c668a060c7e3f82d3f1fb5aaa37edc4 (patch) | |
tree | 1ceab1794043c677b541d3bee50a33f72e0527e4 /drivers/gpu/drm/i915/intel_overlay.c | |
parent | 13a86b85aca24f825c7843cdcd81eaff19fa4ea9 (diff) |
drm/i915: properly check for MODESET for kms driver ioctls
Also ditch the cargo-culted dev_priv checks - either we have a
giant hole in our setup code or this is useless. Plainly bogus
to check for it in either case.
v2: Chris Wilson noticed that I've missed one bogus dev_priv check.
v3: The check in the overlay code is redundant (Chris)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 0f0fe31fc466..a0b5053c5a32 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -1122,11 +1122,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, | |||
1122 | struct put_image_params *params; | 1122 | struct put_image_params *params; |
1123 | int ret; | 1123 | int ret; |
1124 | 1124 | ||
1125 | if (!dev_priv) { | 1125 | /* No need to check for DRIVER_MODESET - we don't set it up then. */ |
1126 | DRM_ERROR("called with no initialization\n"); | ||
1127 | return -EINVAL; | ||
1128 | } | ||
1129 | |||
1130 | overlay = dev_priv->overlay; | 1126 | overlay = dev_priv->overlay; |
1131 | if (!overlay) { | 1127 | if (!overlay) { |
1132 | DRM_DEBUG("userspace bug: no overlay\n"); | 1128 | DRM_DEBUG("userspace bug: no overlay\n"); |
@@ -1323,11 +1319,7 @@ int intel_overlay_attrs(struct drm_device *dev, void *data, | |||
1323 | struct overlay_registers __iomem *regs; | 1319 | struct overlay_registers __iomem *regs; |
1324 | int ret; | 1320 | int ret; |
1325 | 1321 | ||
1326 | if (!dev_priv) { | 1322 | /* No need to check for DRIVER_MODESET - we don't set it up then. */ |
1327 | DRM_ERROR("called with no initialization\n"); | ||
1328 | return -EINVAL; | ||
1329 | } | ||
1330 | |||
1331 | overlay = dev_priv->overlay; | 1323 | overlay = dev_priv->overlay; |
1332 | if (!overlay) { | 1324 | if (!overlay) { |
1333 | DRM_DEBUG("userspace bug: no overlay\n"); | 1325 | DRM_DEBUG("userspace bug: no overlay\n"); |