linux-omap 2.6.37: replace various patch with upstream versions and rediff
[openembedded.git] / recipes / linux / linux-omap-2.6.37 / linus / 0009-drm-i915-Verify-Ironlake-eDP-presence-on-DP_A-using-.patch
blobe0f4515ea1bb045d88d07fa2eb0967116daf93f6
1 From b3ae260de2254a0aed982b5964396a9914859c0e Mon Sep 17 00:00:00 2001
2 From: Chris Wilson <chris@chris-wilson.co.uk>
3 Date: Tue, 14 Dec 2010 19:21:29 +0000
4 Subject: [PATCH 09/65] drm/i915: Verify Ironlake eDP presence on DP_A using the capability fuse
6 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 ---
8 drivers/gpu/drm/i915/i915_reg.h | 7 +++++++
9 drivers/gpu/drm/i915/intel_display.c | 19 ++++++++++++++++++-
10 2 files changed, 25 insertions(+), 1 deletions(-)
12 diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
13 index 8470a97..cb8f434 100644
14 --- a/drivers/gpu/drm/i915/i915_reg.h
15 +++ b/drivers/gpu/drm/i915/i915_reg.h
16 @@ -2591,6 +2591,13 @@
17 #define ILK_DISPLAY_CHICKEN2 0x42004
18 #define ILK_DPARB_GATE (1<<22)
19 #define ILK_VSDPFD_FULL (1<<21)
20 +#define ILK_DISPLAY_CHICKEN_FUSES 0x42014
21 +#define ILK_INTERNAL_GRAPHICS_DISABLE (1<<31)
22 +#define ILK_INTERNAL_DISPLAY_DISABLE (1<<30)
23 +#define ILK_DISPLAY_DEBUG_DISABLE (1<<29)
24 +#define ILK_HDCP_DISABLE (1<<25)
25 +#define ILK_eDP_A_DISABLE (1<<24)
26 +#define ILK_DESKTOP (1<<23)
27 #define ILK_DSPCLK_GATE 0x42020
28 #define ILK_DPARB_CLK_GATE (1<<5)
29 /* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */
30 diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
31 index 97e374e..fca5232 100644
32 --- a/drivers/gpu/drm/i915/intel_display.c
33 +++ b/drivers/gpu/drm/i915/intel_display.c
34 @@ -5379,6 +5379,23 @@ static int intel_encoder_clones(struct drm_device *dev, int type_mask)
35 return index_mask;
38 +static bool has_edp_a(struct drm_device *dev)
40 + struct drm_i915_private *dev_priv = dev->dev_private;
42 + if (!IS_MOBILE(dev))
43 + return false;
45 + if ((I915_READ(DP_A) & DP_DETECTED) == 0)
46 + return false;
48 + if (IS_GEN5(dev) &&
49 + (I915_READ(ILK_DISPLAY_CHICKEN_FUSES) & ILK_eDP_A_DISABLE))
50 + return false;
52 + return true;
55 static void intel_setup_outputs(struct drm_device *dev)
57 struct drm_i915_private *dev_priv = dev->dev_private;
58 @@ -5396,7 +5413,7 @@ static void intel_setup_outputs(struct drm_device *dev)
59 if (HAS_PCH_SPLIT(dev)) {
60 dpd_is_edp = intel_dpd_is_edp(dev);
62 - if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED))
63 + if (has_edp_a(dev))
64 intel_dp_init(dev, DP_A);
66 if (dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED))
67 --
68 1.6.6.1