[PATCH 2/3] drm/i915: check PPS regs for sanity when using eDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Apr 2012 11:58:04 -0700
Jesse Barnes <jbarnes at virtuousgeek.org> wrote:

> If these regs don't have valid values, the panel won't come up, and may
> even cause a system hang.  So do a basic sanity check when an eDP panel
> is detected.
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_dp.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 110552f..6346b29 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2462,6 +2462,13 @@ intel_dp_init(struct drm_device *dev, int output_reg)
>  		pp_off = I915_READ(PCH_PP_OFF_DELAYS);
>  		pp_div = I915_READ(PCH_PP_DIVISOR);
>  
> +		if (!pp_on || !pp_off || !pp_div) {
> +			DRM_INFO("bad panel power sequencing delays, disabling panel\n");
> +			intel_dp_encoder_destroy(&intel_dp->base.base);
> +			intel_dp_destroy(&intel_connector->base);
> +			return;
> +		}
> +
>  		/* Pull timing values out of registers */
>  		cur.t1_t3 = (pp_on & PANEL_POWER_UP_DELAY_MASK) >>
>  			PANEL_POWER_UP_DELAY_SHIFT;

Forgot to add, this one references
https://bugs.freedesktop.org/show_bug.cgi?id=44305

so if it looks ok, please add that to the commit message.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120410/05b27594/attachment.pgp>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux