From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 01/22] drm/i915: properly check for MODESET for kms driver ioctls Date: Tue, 24 Apr 2012 09:19:17 +0200 Message-ID: <20120424071917.GA4722@phenom.ffwll.local> References: <1335192669-10805-1-git-send-email-daniel.vetter@ffwll.ch> <1335192669-10805-2-git-send-email-daniel.vetter@ffwll.ch> <1335219824_31493@CP5-2952> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D5A9A026C for ; Tue, 24 Apr 2012 00:18:44 -0700 (PDT) Received: by werp11 with SMTP id p11so255320wer.36 for ; Tue, 24 Apr 2012 00:18:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1335219824_31493@CP5-2952> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Mon, Apr 23, 2012 at 11:23:15PM +0100, Chris Wilson wrote: > On Mon, 23 Apr 2012 16:50:48 +0200, Daniel Vetter 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 > > --- > > 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@ffwll.ch Mobile: +41 (0)79 365 57 48