drm/i915: add HDMI and DP port enumeration on ValleyView
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 15 Jun 2012 18:55:16 +0000 (11:55 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 20 Jun 2012 12:52:42 +0000 (14:52 +0200)
ValleyView is similar to IbexPeak here, but with different register
offsets.

v2: use SDVOB instead ov VLV_HDMIB (Daniel)
    drop unnecessary eDP check in DP_C init (Daniel)

eDP support will be coming later from Shobit.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c

index 122256fc0221b65194d0c5022bfdc52105a38c9b..f075139ed9b8fcccab0b01c5e5e59cd3ce511bff 100644 (file)
 #define  ADPA_CRT_HOTPLUG_FORCE_TRIGGER (1<<16)
 
 /* or SDVOB */
-#define VLV_HDMIB 0x61140
 #define HDMIB   0xe1140
 #define  PORT_ENABLE    (1 << 31)
 #define  TRANSCODER(pipe)       ((pipe) << 30)
index 7794c1a630c0e0150093388d2b96820369ec1a79..06721c0e9f98fdf5fcd9cfa1665da26595efb0a6 100644 (file)
@@ -6768,7 +6768,24 @@ static void intel_setup_outputs(struct drm_device *dev)
 
                if (!dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED))
                        intel_dp_init(dev, PCH_DP_D);
+       } else if (IS_VALLEYVIEW(dev)) {
+               int found;
+
+               if (I915_READ(SDVOB) & PORT_DETECTED) {
+                       /* SDVOB multiplex with HDMIB */
+                       found = intel_sdvo_init(dev, SDVOB, true);
+                       if (!found)
+                               intel_hdmi_init(dev, SDVOB);
+                       if (!found && (I915_READ(DP_B) & DP_DETECTED))
+                               intel_dp_init(dev, DP_B);
+               }
+
+               if (I915_READ(SDVOC) & PORT_DETECTED)
+                       intel_hdmi_init(dev, SDVOC);
 
+               /* Shares lanes with HDMI on SDVOC */
+               if (I915_READ(DP_C) & DP_DETECTED)
+                       intel_dp_init(dev, DP_C);
        } else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) {
                bool found = false;