diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-24 09:55:08 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 11:18:13 +0200 |
commit | 1cff8f6b4c668a060c7e3f82d3f1fb5aaa37edc4 (patch) | |
tree | 1ceab1794043c677b541d3bee50a33f72e0527e4 /drivers/gpu/drm/i915/intel_display.c | |
parent | 13a86b85aca24f825c7843cdcd81eaff19fa4ea9 (diff) | |
download | lwn-1cff8f6b4c668a060c7e3f82d3f1fb5aaa37edc4.tar.gz lwn-1cff8f6b4c668a060c7e3f82d3f1fb5aaa37edc4.zip |
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_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cf9dfcd7a94f..e1716be47656 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6189,15 +6189,12 @@ static void intel_crtc_init(struct drm_device *dev, int pipe) int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data, struct drm_file *file) { - drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data; struct drm_mode_object *drmmode_obj; struct intel_crtc *crtc; - if (!dev_priv) { - DRM_ERROR("called with no initialization\n"); - return -EINVAL; - } + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return -ENODEV; drmmode_obj = drm_mode_object_find(dev, pipe_from_crtc_id->crtc_id, DRM_MODE_OBJECT_CRTC); |