From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm/i915: sprite init failure on pre-SNB is not a failure Date: Thu, 12 Jan 2012 08:59:37 -0800 Message-ID: <20120112085937.30da2174@jbarnes-desktop> References: <20120112080844.4682d087@jbarnes-desktop> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0232579889==" Return-path: Received: from oproxy7-pub.bluehost.com (oproxy7-pub.bluehost.com [67.222.55.9]) by gabe.freedesktop.org (Postfix) with SMTP id 20BA89E921 for ; Thu, 12 Jan 2012 08:59:45 -0800 (PST) In-Reply-To: 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: Daniel Vetter Cc: airlied@linux.ie, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0232579889== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/4e+=SXPi7taQwW1VBQgTvyX"; protocol="application/pgp-signature" --Sig_/4e+=SXPi7taQwW1VBQgTvyX Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, 12 Jan 2012 17:54:50 +0100 Daniel Vetter wrote: > On Thu, Jan 12, 2012 at 17:08, Jesse Barnes wr= ote: > > We can call the plane init function unconditionally, but don't need to > > complain if it fails, since that will only happen if we're out of > > memory (and other things will fail) or if we're on the wrong platform > > (which is ok). > > > > And remove the DRM_ERRORs from the sprite code itself to avoid dmesg > > spam. > > > > Signed-off-by: Jesse Barnes > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index 29743de..e3bfa50 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -9027,12 +9027,9 @@ void intel_modeset_init(struct drm_device *dev) > > > > =A0 =A0 =A0 =A0for (i =3D 0; i < dev_priv->num_pipe; i++) { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0intel_crtc_init(dev, i); > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (HAS_PCH_SPLIT(dev)) { > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D intel_plane_init(= dev, i); > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret) > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DRM_ERROR= ("plane %d init failed: %d\n", > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 i, ret); > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D intel_plane_init(dev, i); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret) > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DRM_DEBUG_KMS("plane %d i= nit failed: %d\n", i, ret); > > =A0 =A0 =A0 =A0} > > > > =A0 =A0 =A0 =A0/* Just disable it once at startup */ > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915= /intel_sprite.c > > index b26e7c4..32909e3 100644 > > --- a/drivers/gpu/drm/i915/intel_sprite.c > > +++ b/drivers/gpu/drm/i915/intel_sprite.c > > @@ -466,10 +466,8 @@ intel_update_plane(struct drm_plane *plane, struct= drm_crtc *crtc, > > =A0 =A0 =A0 =A0mutex_lock(&dev->struct_mutex); > > > > =A0 =A0 =A0 =A0ret =3D intel_pin_and_fence_fb_obj(dev, obj, NULL); > > - =A0 =A0 =A0 if (ret) { > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 DRM_ERROR("failed to pin object\n"); > > + =A0 =A0 =A0 if (ret) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out_unlock; > > - =A0 =A0 =A0 } > > > > =A0 =A0 =A0 =A0intel_plane->obj =3D obj; > > > > @@ -632,10 +630,8 @@ intel_plane_init(struct drm_device *dev, enum pipe= pipe) > > =A0 =A0 =A0 =A0unsigned long possible_crtcs; > > =A0 =A0 =A0 =A0int ret; > > > > - =A0 =A0 =A0 if (!(IS_GEN6(dev) || IS_GEN7(dev))) { > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 DRM_ERROR("new plane code only for SNB+\n= "); > > + =A0 =A0 =A0 if (!(IS_GEN6(dev) || IS_GEN7(dev))) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return -ENODEV; > > - =A0 =A0 =A0 } >=20 > Why not return 0; to avoid the "plane init" spam at kms debug level? > After all, nothing failed, there's just no plane there to init ... ENODEV actually does tell you why the init failed, in case you want to look at the debug logs... --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/4e+=SXPi7taQwW1VBQgTvyX Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJPDxF5AAoJEIEoDkX4Qk9hNUoP/Rr1cl+apLo11T0XKFgqI1vn mj7LTBlRcIuD2mudOjbq8LOGX1B9FE4eYjzg+maXWBK5w7mYJ8b+mPWMuZfovk0A EXhZkVfzmS1o+JthtzniIadhqkcXMtqR8ik0L2JbZDO2gL3yh9zoedhKoouY2S3Y FYczVUKjbvNCzlKF/jIA/Xpgkdj8QS7rfNn2JJuDQ88d7OeFu7D339MHnDOFVRF6 CYivNDgXSeORKrufB0eY1d24wRdbdRqY/URfwq3vvVQWNWt8IR0c6JgxBRenk9wN LJxaXYi4TLSud+wrt6PZkw9gHCzuKV4x+UhAS04frMLJTfhFCFzgfu0h34yfyaN8 n1OvwjvfeOBHeCTkqmXTImdpvgT8L3nfMICtm9UmOohgh6esinrHleFkMQpvb+uy 8ejQ2cXvCRd/FGxt+pnGt3C/l0nLSlmsA4y82hZUokviEuAfs8MlTBxH6JBEk6X6 9QoK71zG7RZAh8E40ABci0vvs4VCvciV3g2O6iMZAMy/bbyLEvmedDmLwa6Gedbm daX1LAi1aoKo2EzQv+a4+OjVbZpYh1LN2BW/nz0Wrf3WTNuCYqrDaxpiMI5A3iEj vH4i+8Ji2ozFnz1b4sR9yo1zYohsUDh2JMzIDl3ec0FUk3lFIV0NiQJAHH0UB19v fMuQWvDPO1ZlfQwjIhHn =NooX -----END PGP SIGNATURE----- --Sig_/4e+=SXPi7taQwW1VBQgTvyX-- --===============0232579889== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0232579889==--