[Intel-gfx] [PATCH 01/22] drm/i915: properly check for MODESET for kms driver ioctls

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 24 00:23:15 CEST 2012


On Mon, 23 Apr 2012 16:50:48 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> 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.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    3 +++
>  drivers/gpu/drm/i915/intel_overlay.c |   12 ++++--------
>  drivers/gpu/drm/i915/intel_sprite.c  |   10 ++++------
>  3 files changed, 11 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4c844c6..f17046c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6078,6 +6078,9 @@ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
>  	struct drm_mode_object *drmmode_obj;
>  	struct intel_crtc *crtc;
>  
> +	if (!drm_core_check_feature(dev, DRIVER_MODESET))
> +		return -ENODEV;
> +
>  	if (!dev_priv) {
>  		DRM_ERROR("called with no initialization\n");
>  		return -EINVAL;

So why is it still here? What does this mean, we can reach this point
without initialising the device? Yikes.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list