[PATCH] drm/i915: add check for valid init_clock_gating-pointer

Wolfram Sang w.sang at pengutronix.de
Thu Jun 16 06:28:46 PDT 2011


> > 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:
> > 
> > if (HAS_PCH_SPLIT(dev)) {
> > 	...
> > 	} else
> > 		dev_priv->display.update_wm = NULL;
> > }
> 
> 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...

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20110616/a9d2ee9f/attachment.pgp>


More information about the dri-devel mailing list