diff mbox

[v2,5/9] drm/i915: Disable CRT hotplug detection for valleyview

Message ID 1348753389-30736-6-git-send-email-vijay.a.purushothaman@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vijay Purushothaman Sept. 27, 2012, 1:43 p.m. UTC
Temporary work around to avoid spurious crt hotplug interrupts.

Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
---
 drivers/gpu/drm/i915/intel_crt.c |    7 +++++++
 1 file changed, 7 insertions(+)

Comments

Jesse Barnes Sept. 27, 2012, 3:20 p.m. UTC | #1
On Thu, 27 Sep 2012 19:13:05 +0530
Vijay Purushothaman <vijay.a.purushothaman@intel.com> wrote:

> Temporary work around to avoid spurious crt hotplug interrupts.
> 
> Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_crt.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index c42b980..5f30364 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -308,6 +308,13 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
>  	bool ret;
>  	u32 save_adpa;
>  
> +	/*
> +	 * Disable crt detect hotplug for VLV X0. Spurious hot plug
> +	 * detect calls crashses the X0 system
> +	 */
> +	if (IS_VALLEYVIEW(dev))
> +		return false;
> +
>  	save_adpa = adpa = I915_READ(ADPA);
>  	DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);
>  

Not sure about this one; your platform seems to be less stable than
mine when it comes to both VGA port handling and legacy VGA I/O...  But
I have no problem with it either, I just know it works ok on at least
some of the SDVs, probably depending on board rework and firmware
status.

Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Jesse Barnes Sept. 27, 2012, 3:34 p.m. UTC | #2
On Thu, 27 Sep 2012 19:13:05 +0530
Vijay Purushothaman <vijay.a.purushothaman@intel.com> wrote:

> Temporary work around to avoid spurious crt hotplug interrupts.
> 
> Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_crt.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index c42b980..5f30364 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -308,6 +308,13 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
>  	bool ret;
>  	u32 save_adpa;
>  
> +	/*
> +	 * Disable crt detect hotplug for VLV X0. Spurious hot plug
> +	 * detect calls crashses the X0 system
> +	 */
> +	if (IS_VALLEYVIEW(dev))
> +		return false;
> +
>  	save_adpa = adpa = I915_READ(ADPA);
>  	DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);
>  

Oh and since this is a vlv specific function, the IS_VLV check is
unnecessary.
Daniel Vetter Sept. 28, 2012, 2:51 p.m. UTC | #3
On Thu, Sep 27, 2012 at 08:20:15AM -0700, Jesse Barnes wrote:
> On Thu, 27 Sep 2012 19:13:05 +0530
> Vijay Purushothaman <vijay.a.purushothaman@intel.com> wrote:
> 
> > Temporary work around to avoid spurious crt hotplug interrupts.
> > 
> > Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> > Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_crt.c |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> > index c42b980..5f30364 100644
> > --- a/drivers/gpu/drm/i915/intel_crt.c
> > +++ b/drivers/gpu/drm/i915/intel_crt.c
> > @@ -308,6 +308,13 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
> >  	bool ret;
> >  	u32 save_adpa;
> >  
> > +	/*
> > +	 * Disable crt detect hotplug for VLV X0. Spurious hot plug
> > +	 * detect calls crashses the X0 system
> > +	 */
> > +	if (IS_VALLEYVIEW(dev))
> > +		return false;
> > +
> >  	save_adpa = adpa = I915_READ(ADPA);
> >  	DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);
> >  
> 
> Not sure about this one; your platform seems to be less stable than
> mine when it comes to both VGA port handling and legacy VGA I/O...  But
> I have no problem with it either, I just know it works ok on at least
> some of the SDVs, probably depending on board rework and firmware
> status.
> 
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Since it's unclear whether we need this, I'll punt on this patch here.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index c42b980..5f30364 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -308,6 +308,13 @@  static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
 	bool ret;
 	u32 save_adpa;
 
+	/*
+	 * Disable crt detect hotplug for VLV X0. Spurious hot plug
+	 * detect calls crashses the X0 system
+	 */
+	if (IS_VALLEYVIEW(dev))
+		return false;
+
 	save_adpa = adpa = I915_READ(ADPA);
 	DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);