* [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH
@ 2012-02-09 9:35 Chris Wilson
2012-02-09 17:13 ` Keith Packard
2012-02-09 18:19 ` Eugeni Dodonov
0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2012-02-09 9:35 UTC (permalink / raw)
To: intel-gfx
With the introduction of the PCH, we gained an LVDS presence pin but we
continued to use the existing logic that asserted that LVDS was only
supported on certain mobile chipsets. However, there are desktop
IronLake systems with LVDS attached which we fail to detect. So for PCH,
trust the LVDS presence pin and quirk all the lying manufacturers.
Reported-by: Daniel Woff <wolff.daniel@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43171
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_display.c | 5 ++---
drivers/gpu/drm/i915/intel_lvds.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f02f86a..62bcbfd 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7456,10 +7456,9 @@ static void intel_setup_outputs(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *encoder;
bool dpd_is_edp = false;
- bool has_lvds = false;
+ bool has_lvds;
- if (IS_MOBILE(dev) && !IS_I830(dev))
- has_lvds = intel_lvds_init(dev);
+ has_lvds = intel_lvds_init(dev);
if (!has_lvds && !HAS_PCH_SPLIT(dev)) {
/* disable the panel fitter on everything but LVDS */
I915_WRITE(PFIT_CONTROL, 0);
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index e441911..fff3886 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -828,6 +828,18 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev,
return false;
}
+static bool intel_lvds_supported(struct drm_device *dev)
+{
+ /* With the introduction of the PCH we gained a dedicated
+ * LVDS presence pin, use it. */
+ if (HAS_PCH_SPLIT(dev))
+ return true;
+
+ /* Otherwise LVDS was only attached to mobile products,
+ * except for the inglorious 830gm */
+ return IS_MOBILE(dev) && !IS_I830(dev);
+}
+
/**
* intel_lvds_init - setup LVDS connectors on this device
* @dev: drm device
@@ -849,6 +861,9 @@ bool intel_lvds_init(struct drm_device *dev)
int pipe;
u8 pin;
+ if (!intel_lvds_supported(dev))
+ return false;
+
/* Skip init on machines we know falsely report LVDS */
if (dmi_check_system(intel_no_lvds))
return false;
--
1.7.9
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH
2012-02-09 9:35 [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH Chris Wilson
@ 2012-02-09 17:13 ` Keith Packard
2012-02-09 17:33 ` Chris Wilson
2012-02-09 18:19 ` Eugeni Dodonov
1 sibling, 1 reply; 6+ messages in thread
From: Keith Packard @ 2012-02-09 17:13 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
<#part sign=pgpmime>
On Thu, 9 Feb 2012 09:35:53 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> With the introduction of the PCH, we gained an LVDS presence pin but we
> continued to use the existing logic that asserted that LVDS was only
> supported on certain mobile chipsets. However, there are desktop
> IronLake systems with LVDS attached which we fail to detect. So for PCH,
> trust the LVDS presence pin and quirk all the lying manufacturers.
Uh. I don't see where this is using the LVDS presence pin. Am I just
missing something?
--
keith.packard@intel.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH
2012-02-09 17:13 ` Keith Packard
@ 2012-02-09 17:33 ` Chris Wilson
2012-02-09 18:23 ` Keith Packard
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2012-02-09 17:33 UTC (permalink / raw)
To: Keith Packard, intel-gfx
On Thu, 09 Feb 2012 09:13:35 -0800, Keith Packard <keithp@keithp.com> wrote:
> <#part sign=pgpmime>
> On Thu, 9 Feb 2012 09:35:53 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > With the introduction of the PCH, we gained an LVDS presence pin but we
> > continued to use the existing logic that asserted that LVDS was only
> > supported on certain mobile chipsets. However, there are desktop
> > IronLake systems with LVDS attached which we fail to detect. So for PCH,
> > trust the LVDS presence pin and quirk all the lying manufacturers.
>
> Uh. I don't see where this is using the LVDS presence pin. Am I just
> missing something?
That code already existed in intel_lvds_init():
if (HAS_PCH_SPLIT(dev)) {
if (I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
return false
...
}
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH
2012-02-09 17:33 ` Chris Wilson
@ 2012-02-09 18:23 ` Keith Packard
2012-02-15 15:47 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Keith Packard @ 2012-02-09 18:23 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
<#part sign=pgpmime>
On Thu, 09 Feb 2012 17:33:23 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> That code already existed in intel_lvds_init():
> if (HAS_PCH_SPLIT(dev)) {
> if (I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
> return false
> ...
> }
Tricky. Do we have any idea how reliable this pin is? We've had such bad
luck in the past...
--
keith.packard@intel.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH
2012-02-09 18:23 ` Keith Packard
@ 2012-02-15 15:47 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-02-15 15:47 UTC (permalink / raw)
To: Keith Packard; +Cc: intel-gfx
On Thu, Feb 09, 2012 at 10:23:37AM -0800, Keith Packard wrote:
> <#part sign=pgpmime>
> On Thu, 09 Feb 2012 17:33:23 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >
> > That code already existed in intel_lvds_init():
> > if (HAS_PCH_SPLIT(dev)) {
> > if (I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
> > return false
> > ...
> > }
>
> Tricky. Do we have any idea how reliable this pin is? We've had such bad
> luck in the past...
It's imo guaranteed to blow up somewhere, but we already have the no_lvds
quirk infrastructure in place for that. Bug reporter confirmed that this
patch works for him, so I've decided to include this into the current
-next cycle to get feedback (and no_lvds quirk patches) as early as
possible.
Thanks for the patch and review.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH
2012-02-09 9:35 [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH Chris Wilson
2012-02-09 17:13 ` Keith Packard
@ 2012-02-09 18:19 ` Eugeni Dodonov
1 sibling, 0 replies; 6+ messages in thread
From: Eugeni Dodonov @ 2012-02-09 18:19 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 889 bytes --]
On Thu, Feb 9, 2012 at 07:35, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> With the introduction of the PCH, we gained an LVDS presence pin but we
> continued to use the existing logic that asserted that LVDS was only
> supported on certain mobile chipsets. However, there are desktop
> IronLake systems with LVDS attached which we fail to detect. So for PCH,
> trust the LVDS presence pin and quirk all the lying manufacturers.
>
> Reported-by: Daniel Woff <wolff.daniel@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43171
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
I think it is a valid use-case for LVDS connections for the all-in-one and
similar machines. They don't necessarily have to be mobile, but they can
have a LVDS connection.
--
Eugeni Dodonov
<http://eugeni.dodonov.net/>
[-- Attachment #1.2: Type: text/html, Size: 1464 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-15 15:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 9:35 [PATCH] drm/i915/lvds: Always use the presence pin for LVDS on PCH Chris Wilson
2012-02-09 17:13 ` Keith Packard
2012-02-09 17:33 ` Chris Wilson
2012-02-09 18:23 ` Keith Packard
2012-02-15 15:47 ` Daniel Vetter
2012-02-09 18:19 ` Eugeni Dodonov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.