Skip to contentSkip to conversation

drm/i915: check FDI config for 3 pipe

RFC In review Jesse Barnes 1 participant 3 messages Apr 18, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 drm/i915: check FDI config for 3 pipe

Three pipe can only be enabled in some cases and updated docs indicate a bit to control FDI B+C sharing.

This patch adds a check to make sure we can support a given config with the existing FDI lane configuration, and tries to set the bit as appropriate.

We may want to go further though and just totally break the link between our pipes, planes, PLLs, FDI lanes, transcoders, etc and the CRTCs we expose to userspace. We could theoretically just allocate new ones every mode set. That wouldn't help a whole lot though since we don't get full configuration changes from userspace, just a small window of CRTC data with no idea of what might happen next...

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 3cf5770..74c2f8c 100644
@@ -3570,6 +3570,7 @@
 #define SOUTH_CHICKEN1		0xc2000
 #define  FDIA_PHASE_SYNC_SHIFT_OVR	19
 #define  FDIA_PHASE_SYNC_SHIFT_EN	18
+#define  FDIBC_LANE_SHARE_EN		(1<<12)
 #define FDI_PHASE_SYNC_OVR(pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_OVR - ((pipe) * 2)))
 #define FDI_PHASE_SYNC_EN(pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_EN - ((pipe) * 2)))
 #define SOUTH_CHICKEN2		0xc2004
drivers/gpu/drm/i915/intel_display.c +49 -0

67 lines not on this page · raw message

#1 lore raw
Quoted 7 lines · On Wed, 18 Apr 2012 14:25:36 -0700 Jesse Barnes <[email protected]>…

Three pipe can only be enabled in some cases and updated docs indicate a bit to control FDI B+C sharing.

This patch adds a check to make sure we can support a given config with the existing FDI lane configuration, and tries to set the bit as appropriate.

Quoted 6 lines

We may want to go further though and just totally break the link between our pipes, planes, PLLs, FDI lanes, transcoders, etc and the CRTCs we expose to userspace. We could theoretically just allocate new ones every mode set. That wouldn't help a whole lot though since we don't get full configuration changes from userspace, just a small window of CRTC data with no idea of what might happen next...

Ah just found a bug in reviewing my own patch here.

+ if (intel_crtc->pipe > 1) {
+ if (intel_crtc->fdi_lanes > 2)
+ I915_WRITE(SOUTH_CHICKEN1, I915_READ(SOUTH_CHICKEN1) &
+ ~FDIBC_LANE_SHARE_EN);
+ else
+ I915_WRITE(SOUTH_CHICKEN1, I915_READ(SOUTH_CHICKEN1) |
+ FDIBC_LANE_SHARE_EN);
+ }

Should be if (intel_crtc->pipe > 0) since we need to apply this when either FDI C *or* B changes config.

I'll try, maybe it'll help with the funky 3 pipe config mode set problem I saw.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#2 lore raw
Quoted 28 lines · On Wed, 18 Apr 2012 15:27:44 -0700 Jesse Barnes <[email protected]>…
Quoted 7 lines · On Wed, 18 Apr 2012 14:25:36 -0700 Jesse Barnes <[email protected]>…

Three pipe can only be enabled in some cases and updated docs indicate a bit to control FDI B+C sharing.

This patch adds a check to make sure we can support a given config with the existing FDI lane configuration, and tries to set the bit as appropriate.

Quoted 6 lines

We may want to go further though and just totally break the link between our pipes, planes, PLLs, FDI lanes, transcoders, etc and the CRTCs we expose to userspace. We could theoretically just allocate new ones every mode set. That wouldn't help a whole lot though since we don't get full configuration changes from userspace, just a small window of CRTC data with no idea of what might happen next...

Ah just found a bug in reviewing my own patch here.

drivers/gpu/drm/i915/intel_display.c +8 -0
+	if (intel_crtc->pipe > 1) {
+		if (intel_crtc->fdi_lanes > 2)
+			I915_WRITE(SOUTH_CHICKEN1, I915_READ(SOUTH_CHICKEN1) &
+				   ~FDIBC_LANE_SHARE_EN);
+		else
+			I915_WRITE(SOUTH_CHICKEN1, I915_READ(SOUTH_CHICKEN1) |
+				   FDIBC_LANE_SHARE_EN);
+	}
Quoted 5 lines

Should be if (intel_crtc->pipe > 0) since we need to apply this when either FDI C *or* B changes config.

I'll try, maybe it'll help with the funky 3 pipe config mode set problem I saw.

Oh and this hunk belongs in the IVB function!

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center