[Intel-gfx] [PATCH] drm/i915/dp: Be paranoid in case we disable a DP before it is attached
Keith Packard
keithp at keithp.com
Wed Apr 20 19:36:29 CEST 2011
On Wed, 20 Apr 2011 16:42:08 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Given that the hardware may be left in a random condition by the BIOS,
> it is conceivable that we then attempt to clear the DP_PIPEB_SELECT bit
> without us ever enabling/attaching the DP encoder to a pipe. Thus
> causing a NULL deference when we attempt to wait for a vblank on that
> crtc.
Is this because we're assuming that the only way DP_PIPEB_SELECT could
have been set is by our driver? That does seem like a bad assumption on
our part.
> - intel_wait_for_vblank(dev, intel_crtc->pipe);
> + intel_wait_for_crtc_vblank_safe(intel_dp->base.base.crtc);
I actually think that simply placing the in-line function here in the
code is clearer -- it makes it obvious that we aren't counting on there
being a crtc assigned to this output.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110420/97cf194a/attachment.sig>
More information about the Intel-gfx
mailing list