Skip to contentSkip to conversation

drm/i915: bdw does not have pch backlight override bit

PATCH In review Jani Nikula 2 participants 4 messages Sep 4, 2014

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

PATCH 1/1 drm/i915: bdw does not have pch backlight override bit

BDW is always in the PCH override mode, and the bit MBZ.

---
 drivers/gpu/drm/i915/intel_panel.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +0 -3
index 18784470a760..066a66165cf1 100644
@@ -780,9 +780,6 @@ static void bdw_enable_backlight(struct intel_connector *connector)
 	if (panel->backlight.active_low_pwm)
 		pch_ctl1 |= BLM_PCH_POLARITY;
 
-	/* BDW always uses the pch pwm controls. */
-	pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
-
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1 | BLM_PCH_PWM_ENABLE);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 1 line · Jani Nikula

BDW is always in the PCH override mode, and the bit MBZ.

BSpec doesn't seem to agree. In fact it says the override must be enabled on bdw.

Quoted 27 lines
---
 drivers/gpu/drm/i915/intel_panel.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +0 -3
index 18784470a760..066a66165cf1 100644
@@ -780,9 +780,6 @@ static void bdw_enable_backlight(struct intel_connector *connector)
 	if (panel->backlight.active_low_pwm)
 		pch_ctl1 |= BLM_PCH_POLARITY;
 
-	/* BDW always uses the pch pwm controls. */
-	pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
-
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1 | BLM_PCH_PWM_ENABLE);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
#2 lore raw
Quoted 5 lines · Ville Syrjälä
Quoted 1 line · Jani Nikula

BDW is always in the PCH override mode, and the bit MBZ.

BSpec doesn't seem to agree. In fact it says the override must be enabled on bdw.

Gah, I was looking at the skl bspec, which said bdw+. Oh well, how about this one instead:

From 53db5d77cf8e959ed65535f2d80f721baf74d93a Mon Sep 17 00:00:00 2001
From: Jani Nikula <[email protected]>
Date: Thu, 4 Sep 2014 14:54:34 +0300
Subject: [PATCH] drm/i915: skl does not have pch backlight override bit
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
Cc: Jani Nikula <[email protected]>

SKL is always in the PCH override mode, and the bit MBZ.

---
 drivers/gpu/drm/i915/intel_panel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_panel.c +2 -1
index 18784470a760..bc3e74eaf52e 100644
@@ -781,7 +781,8 @@ static void bdw_enable_backlight(struct intel_connector *connector)
 		pch_ctl1 |= BLM_PCH_POLARITY;
 
 	/* BDW always uses the pch pwm controls. */
-	pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
+	if (IS_BROADWELL(dev))
+		pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
 
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
Signature · 1 line
1.9.1
Quoted 32 lines
Quoted 28 lines
---
 drivers/gpu/drm/i915/intel_panel.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +0 -3
index 18784470a760..066a66165cf1 100644
@@ -780,9 +780,6 @@ static void bdw_enable_backlight(struct intel_connector *connector)
 	if (panel->backlight.active_low_pwm)
 		pch_ctl1 |= BLM_PCH_POLARITY;
 
-	/* BDW always uses the pch pwm controls. */
-	pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
-
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1 | BLM_PCH_PWM_ENABLE);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 30 lines · Jani Nikula
Quoted 5 lines · Ville Syrjälä
Quoted 1 line · Jani Nikula

BDW is always in the PCH override mode, and the bit MBZ.

BSpec doesn't seem to agree. In fact it says the override must be enabled on bdw.

Gah, I was looking at the skl bspec, which said bdw+. Oh well, how about this one instead:

Quoted 1 line

From 53db5d77cf8e959ed65535f2d80f721baf74d93a Mon Sep 17 00:00:00 2001

From: Jani Nikula <[email protected]>
Date: Thu, 4 Sep 2014 14:54:34 +0300
Subject: [PATCH] drm/i915: skl does not have pch backlight override bit
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
Cc: Jani Nikula <[email protected]>

SKL is always in the PCH override mode, and the bit MBZ.

---
 drivers/gpu/drm/i915/intel_panel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_panel.c +0 -0
index 18784470a760..bc3e74eaf52e 100644

drivers/gpu/drm/i915/intel_panel.c static void bdw_enable_backlight(struct intel_connector *connector) · line 785

Quoted 6 lines
drivers/gpu/drm/i915/intel_panel.c +2 -1
@@ -781,7 +781,8 @@ static void bdw_enable_backlight(struct intel_connector *connector)
 		pch_ctl1 |= BLM_PCH_POLARITY;
 
 	/* BDW always uses the pch pwm controls. */
-	pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
+	if (IS_BROADWELL(dev))
+		pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;

I guess this should really check for the PCH version instead. I'm slightly concerned about early SKLs being equipped with WPT where this might cause problems.

Quoted 44 lines
drivers/gpu/drm/i915/intel_panel.c +0 -0
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
Signature · 1 line
1.9.1
Quoted 32 lines
Quoted 28 lines
---
 drivers/gpu/drm/i915/intel_panel.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +0 -3
index 18784470a760..066a66165cf1 100644
@@ -780,9 +780,6 @@ static void bdw_enable_backlight(struct intel_connector *connector)
 	if (panel->backlight.active_low_pwm)
 		pch_ctl1 |= BLM_PCH_POLARITY;
 
-	/* BDW always uses the pch pwm controls. */
-	pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
-
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1 | BLM_PCH_PWM_ENABLE);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 2 lines
Ville Syrjälä
Intel OTC