[Intel-gfx] [PATCH v2 6/9] drm/i915/dsi: add support for sequence block v3 gpio for VLV
Jani Nikula
jani.nikula at intel.com
Fri Mar 18 11:11:14 UTC 2016
Just put the iosf port in the gpio table. The table might include some
duplication, but this approach keeps the code the cleanest.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
index 3f84c0f96eeb..ca48f7aa6a05 100644
--- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
@@ -77,23 +77,24 @@ static inline struct vbt_panel *to_vbt_panel(struct drm_panel *panel)
struct vlv_gpio_map {
u8 gpio_index;
+ u8 port;
u16 base_offset;
bool init;
};
static struct vlv_gpio_map vlv_gpio_table[] = {
- { 0, VLV_GPIO_NC_0_HV_DDI0_HPD },
- { 1, VLV_GPIO_NC_1_HV_DDI0_DDC_SDA },
- { 2, VLV_GPIO_NC_2_HV_DDI0_DDC_SCL },
- { 3, VLV_GPIO_NC_3_PANEL0_VDDEN },
- { 4, VLV_GPIO_NC_4_PANEL0_BLKEN },
- { 5, VLV_GPIO_NC_5_PANEL0_BLKCTL },
- { 6, VLV_GPIO_NC_6_PCONF0 },
- { 7, VLV_GPIO_NC_7_PCONF0 },
- { 8, VLV_GPIO_NC_8_PCONF0 },
- { 9, VLV_GPIO_NC_9_PCONF0 },
- { 10, VLV_GPIO_NC_10_PCONF0 },
- { 11, VLV_GPIO_NC_11_PCONF0 },
+ { 0, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_0_HV_DDI0_HPD },
+ { 1, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_1_HV_DDI0_DDC_SDA },
+ { 2, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_2_HV_DDI0_DDC_SCL },
+ { 3, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_3_PANEL0_VDDEN },
+ { 4, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_4_PANEL0_BLKEN },
+ { 5, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_5_PANEL0_BLKCTL },
+ { 6, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_6_PCONF0 },
+ { 7, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_7_PCONF0 },
+ { 8, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_8_PCONF0 },
+ { 9, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_9_PCONF0 },
+ { 10, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_10_PCONF0 },
+ { 11, IOSF_PORT_GPIO_NC, VLV_GPIO_NC_11_PCONF0 },
};
static inline enum port intel_dsi_seq_port_to_port(u8 port)
@@ -210,8 +211,7 @@ static void vlv_exec_gpio(struct drm_i915_private *dev_priv,
}
if (dev_priv->vbt.dsi.seq_version >= 3) {
- DRM_DEBUG_KMS("GPIO element v3 not supported\n");
- return;
+ port = map->port;
} else {
if (gpio_source == 0) {
port = IOSF_PORT_GPIO_NC;
--
2.1.4
More information about the Intel-gfx
mailing list