Skip to contentSkip to conversation

drm/i915: allow dev_priv for HAS_PCH_* macros too

PATCH In review Jani Nikula 5 participants 7 messages Oct 10, 2014 – Oct 21, 2014

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

PATCH 1/2 drm/i915: allow dev_priv for HAS_PCH_* macros too

Follow-up to
commit dbbe91279511d6a18a521b953a3c139e4787e660

Author: Chris Wilson <[email protected]>
Date:   Sat Aug 9 19:18:43 2014 +0100

drm/i915: Agnostic INTEL_INFO

---
 drivers/gpu/drm/i915/i915_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
index ac6232bc1341..48da10e3c6fb 100644
@@ -2196,7 +2196,7 @@ struct drm_i915_cmd_table {
 #define INTEL_PCH_SPT_DEVICE_ID_TYPE		0xA100
 #define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE		0x9D00
 
-#define INTEL_PCH_TYPE(dev) (to_i915(dev)->pch_type)
+#define INTEL_PCH_TYPE(dev) (__I915__(dev)->pch_type)
 #define HAS_PCH_SPT(dev) (INTEL_PCH_TYPE(dev) == PCH_SPT)
 #define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
 #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 drm/i915: spt does not have pch backlight override bit

SPT is always in the PCH override mode, and the bit MBZ. Only set override on LPT.

v2: check for PCH version (Ville)

---
 drivers/gpu/drm/i915/intel_panel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +3 -2
index e3def5ad4a77..e18b3f49074c 100644
@@ -775,8 +775,9 @@ 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;
+	/* After LPT, override is the default. */
+	if (HAS_PCH_LPT(dev_priv))
+		pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
 
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
Signature · 1 line
2.1.0
Tested-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915: spt does not have pch backlight

-------------------------------------Summary-------------------------------------
Platform: baseline_drm_intel_nightly_pass_rate->patch_applied_pass_rate
BYT: pass/total=271/271->271/271
PNV: pass/total=269/271->271/271
ILK: pass/total=269/271->271/271
IVB: pass/total=271/271->271/271
SNB: pass/total=271/271->271/271
HSW: pass/total=271/271->271/271
BDW: pass/total=270/271->271/271 -------------------------------------Detailed-------------------------------------
test_platform: test_suite, test_case, result_with_drm_intel_nightly->result_with_patch_applied
PNV: Intel_gpu_tools, igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-forked, TIMEOUT->PASS
PNV: Intel_gpu_tools, igt_gem_concurrent_blit_gttX-bcs-gpu-read-after-write-forked, TIMEOUT->PASS
ILK: Intel_gpu_tools, igt_kms_pipe_crc_basic_bad-nb-words-3, DMESG_WARN->PASS
ILK: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, DMESG_WARN->PASS
BDW: Intel_gpu_tools, igt_drv_missed_irq_hang, DMESG_WARN->PASS

Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] drm/i915: spt does not have pch backlight override bit

In reply to Jani Nikula
Quoted 6 lines · Jani Nikula

SPT is always in the PCH override mode, and the bit MBZ. Only set override on LPT.

v2: check for PCH version (Ville)

Quoted 27 lines
---
 drivers/gpu/drm/i915/intel_panel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +3 -2
index e3def5ad4a77..e18b3f49074c 100644
@@ -775,8 +775,9 @@ 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;
+	/* After LPT, override is the default. */
+	if (HAS_PCH_LPT(dev_priv))
+		pch_ctl1 |= BLM_PCH_OVERRIDE_ENABLE;
 
 	I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1);
 	POSTING_READ(BLC_PWM_PCH_CTL1);
Signature · 6 lines
2.1.0

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

Follow-up to
commit dbbe91279511d6a18a521b953a3c139e4787e660

Author: Chris Wilson <[email protected]>
Date:   Sat Aug 9 19:18:43 2014 +0100

drm/i915: Agnostic INTEL_INFO

Quoted 7 lines
Quoted 1 line

If you look at

[email protected]

you will find another one suitable for conversion as well

Thanks, I missed that. I just added my r-b.

Daniel, please pick that one up instead of 1/2 as a prerequisite for 2/2.

BR,
Jani.

Quoted 4 lines

-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#6 lore raw
Quoted 13 lines · Jani Nikula
Quoted 12 lines · Chris Wilson
Quoted 8 lines · Jani Nikula

Follow-up to
commit dbbe91279511d6a18a521b953a3c139e4787e660

Author: Chris Wilson <[email protected]>
Date:   Sat Aug 9 19:18:43 2014 +0100

drm/i915: Agnostic INTEL_INFO

If you look at

Quoted 8 lines
Quoted 3 lines

[email protected]

you will find another one suitable for conversion as well

Thanks, I missed that. I just added my r-b.

Daniel, please pick that one up instead of 1/2 as a prerequisite for 2/2.

Done. Well I didn't find that mail in my inbox, but I think I've picked the right one. Otherwise please scream.

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch