From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Subject: Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer Date: Thu, 16 Jun 2011 15:28:46 +0200 Message-ID: <20110616132846.GE23579@pengutronix.de> References: <1308176679-13766-1-git-send-email-w.sang@pengutronix.de> <20110615153000.00438750@jbarnes-desktop> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0260901038==" Return-path: Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by gabe.freedesktop.org (Postfix) with ESMTP id 015439E887 for ; Thu, 16 Jun 2011 06:28:49 -0700 (PDT) In-Reply-To: <20110615153000.00438750@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0260901038== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+SfteS7bOf3dGlBC" Content-Disposition: inline --+SfteS7bOf3dGlBC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > Commit 6067aa (drm/i915: split clock gating init into per-chipset > > functions) unconditionally calls the newly created > > init_clock_gating-pointer. There is one case, however, where it does > > not get set: > >=20 > > if (HAS_PCH_SPLIT(dev)) { > > ... > > } else > > dev_priv->display.update_wm =3D NULL; > > } >=20 > We'll only hit this path on non-existent hardware. Since a clock > gating routine is required I'd rather just see the panic and add a new > routine at that time (i.e. what we normally do during bringup). How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or a warning in the else-block? It seems to happen to users... --=20 Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | --+SfteS7bOf3dGlBC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk36BQ4ACgkQD27XaX1/VRuyvgCgk98UXFyq0WJvxqnL6/RTHMhw XwIAn3Xul2l+P9/swGZwJq1fL20r0dI1 =dQh9 -----END PGP SIGNATURE----- --+SfteS7bOf3dGlBC-- --===============0260901038== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0260901038==--