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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 23, 2012 at 11:23:15PM +0100, Chris Wilson wrote:
> 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.

I've simply missed this one - when I've started cleaning up these checks
it took me a while to untangle it all ;-)
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux