Skip to contentSkip to conversation

drm/i915: access the PP_ON_DELAYS/PP_OFF_DELAYS regs only pre GEN5

PATCH Superseded Imre Deak 2 participants 2 messages Sep 2, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 drm/i915: access the PP_ON_DELAYS/PP_OFF_DELAYS regs only pre GEN5

These registers exist only before GEN5, so currently we may access undefined registers on VLV/CHV and BXT. Apply the workaround only pre GEN5.

This triggered an unclaimed register access warning on BXT.

---
 drivers/gpu/drm/i915/intel_bios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_bios.c +1 -1
index b3e437b..8969fe6 100644
@@ -1349,7 +1349,7 @@ void intel_setup_bios(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
 	 /* Set the Panel Power On/Off timings if uninitialized. */
-	if (!HAS_PCH_SPLIT(dev) &&
+	if (INTEL_INFO(dev_priv)->gen < 5 &&
 	    I915_READ(PP_ON_DELAYS) == 0 && I915_READ(PP_OFF_DELAYS) == 0) {
 		/* Set T2 to 40ms and T5 to 200ms */
 		I915_WRITE(PP_ON_DELAYS, 0x019007d0);
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 16 lines · Imre Deak

These registers exist only before GEN5, so currently we may access undefined registers on VLV/CHV and BXT. Apply the workaround only pre GEN5.

This triggered an unclaimed register access warning on BXT.

---
 drivers/gpu/drm/i915/intel_bios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_bios.c +0 -0
index b3e437b..8969fe6 100644

drivers/gpu/drm/i915/intel_bios.c void intel_setup_bios(struct drm_device *dev) · line 1355

Quoted 8 lines
drivers/gpu/drm/i915/intel_bios.c +1 -1
@@ -1349,7 +1349,7 @@ void intel_setup_bios(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
 	 /* Set the Panel Power On/Off timings if uninitialized. */
-	if (!HAS_PCH_SPLIT(dev) &&
+	if (INTEL_INFO(dev_priv)->gen < 5 &&
 	    I915_READ(PP_ON_DELAYS) == 0 && I915_READ(PP_OFF_DELAYS) == 0) {
 		/* Set T2 to 40ms and T5 to 200ms */
 		I915_WRITE(PP_ON_DELAYS, 0x019007d0);

What a nasty place to hide it. Could you move this somewhere into the LVDS init code so that it's less well hidden? And maybe toss in a debug message indicating we had to pull the panel delays from thin air.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx