Skip to contentSkip to conversation

drm/i915: Parsing the PWM cntrl and CABC ON/OFF fields in VBT

PATCH In review Deepak M 1 participant 1 message Mar 28, 2016

Subsystems (2)
lore
Share & tools
lore

Deepak M

author
#0 lore raw

PATCH 2/5 drm/i915: Parsing the PWM cntrl and CABC ON/OFF fields in VBT

For dual link panel scenarios there are new fields added in the VBT which indicate on which port the PWM cntrl and CABC ON/OFF commands needs to be sent.

v2: Moving the comment to intel_dsi.h(Jani)

v3: Renaming the field names (Jani)

Cc Jani Nikula <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Yetunde Adebisi <[email protected]>

---

DCS commands 0x53h and 0x54h controls the panel
PWM operations and therfore we should send these
commands to the ports mentioned in the field
"dl_panel_pwm_ports" in the VBT

DCS commands 55h and 56h controls the CABC operation and therfore we should be sending these commands to the ports specified in the field "dl_cabc_ports" in the VBT.

 drivers/gpu/drm/i915/intel_bios.c | 10 ++++++++++
 drivers/gpu/drm/i915/intel_bios.h |  5 ++++-
 drivers/gpu/drm/i915/intel_dsi.h  |  9 +++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_bios.c +10 -0
index 083003b..1af7074 100644
@@ -749,6 +749,16 @@ parse_mipi_config(struct drm_i915_private *dev_priv,
 		return;
 	}
 
+	/*
+	 * These fields are introduced from the VBT version 197 onwards,
+	 * so making sure that these bits are set zero in the previous
+	 * versions.
+	 */
+	if (dev_priv->vbt.dsi.config->dual_link && bdb->version < 197) {
+		dev_priv->vbt.dsi.config->dl_cabc_ports = 0;
+		dev_priv->vbt.dsi.config->dl_panel_pwm_ports = 0;
+	}
+
 	/* We have mandatory mipi config blocks. Initialize as generic panel */
 	dev_priv->vbt.dsi.panel_id = MIPI_DSI_GENERIC_PANEL_ID;
 }
drivers/gpu/drm/i915/intel_bios.h +4 -1
index ab0ea31..fdfb634 100644
@@ -113,7 +113,10 @@ struct mipi_config {
 	u16 dual_link:2;
 	u16 lane_cnt:2;
 	u16 pixel_overlap:3;
-	u16 rsvd3:9;
+	u16 rgb_flip:1;
+	u16 dl_cabc_ports:2;
+	u16 dl_panel_pwm_ports:2;
+	u16 rsvd3:4;
 
 	u16 rsvd4;
 
drivers/gpu/drm/i915/intel_dsi.h +9 -0
index e582ef8..f54748d 100644
@@ -78,6 +78,15 @@ struct intel_dsi {
 
 	u8 escape_clk_div;
 	u8 dual_link;
+
+	/*
+	 * Below field will inform us on which port the panel blk_cntrl
+	 * and CABC ON/OFF commands needs to be sent in case of dual link
+	 * panels
+	 */
+	u8 cabc_dcs_ports;
+	u8 panel_pwm_dcs_ports;
+
 	u8 pixel_overlap;
 	u32 port_bits;
 	u32 bw_timer;
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx