[Intel-gfx] [PATCH 4/4] drm/i915: Ignore LVDS EDID when it is unavailabe or invalid
Eric Anholt
eric at anholt.net
Fri Apr 9 23:22:31 CEST 2010
On Wed, 7 Apr 2010 17:11:22 +0800, Zhenyu Wang <zhenyuw at linux.intel.com> wrote:
> From: Zhao Yakui <yakui.zhao at intel.com>
>
> This trys to shut up complains about invalid LVDS EDID during
> mode probe, but uses fixed panel mode directly for panels with
> broken EDID.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=23099
> https://bugs.freedesktop.org/show_bug.cgi?id=26395
>
> Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
> Tested-by: Sitsofe Wheeler <sitsofe at yahoo.com>
> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 2 ++
> drivers/gpu/drm/i915/intel_lvds.c | 13 +++++++++----
> 2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index b7cb4aa..6960849 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -611,6 +611,8 @@ typedef struct drm_i915_private {
> /* Reclocking support */
> bool render_reclock_avail;
> bool lvds_downclock_avail;
> + /* indicate whether the LVDS EDID is OK */
> + bool lvds_edid_good;
> /* indicates the reduced downclock for LVDS*/
> int lvds_downclock;
> struct work_struct idle_work;
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 3fa088c..8bbcb32 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -638,10 +638,12 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
> struct drm_i915_private *dev_priv = dev->dev_private;
> int ret = 0;
>
> - ret = intel_ddc_get_modes(intel_encoder);
> + if (dev_priv->lvds_edid_good) {
> + ret = intel_ddc_get_modes(intel_encoder);
>
> - if (ret)
> - return ret;
> + if (ret)
> + return ret;
> + }
>
> /* Didn't get an EDID, so
> * Set wide sync ranges so we get all modes
> @@ -1064,7 +1066,10 @@ void intel_lvds_init(struct drm_device *dev)
> * Attempt to get the fixed panel mode from DDC. Assume that the
> * preferred mode is the right one.
> */
> - intel_ddc_get_modes(intel_encoder);
> + dev_priv->lvds_edid_good = true;
> +
> + if (!intel_ddc_get_modes(intel_encoder))
> + dev_priv->lvds_edid_good = false;
I've applied this one to for-linus, though I'm not a huge fan. We
shouldn't be re-probing DDC on LVDS panels anyway -- there shouldn't be
any circumstance when it can change.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100409/b2d77299/attachment.sig>
More information about the Intel-gfx
mailing list