All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Deepak M <m.deepak@intel.com>, jani.nikula@intel.com
Subject: [PATCH v2 6/9] drm/i915/dsi: add support for sequence block v3 gpio for VLV
Date: Fri, 18 Mar 2016 13:11:14 +0200	[thread overview]
Message-ID: <5c8a85b08affcf88780aa92aa7675d8a4607c87d.1458299160.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1458299160.git.jani.nikula@intel.com>
In-Reply-To: <cover.1458299160.git.jani.nikula@intel.com>

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@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-03-18 11:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 11:11 [PATCH v2 0/9] drm/i915/dsi: improved gpio element support for vlv/chv/bxt Jani Nikula
2016-03-18 11:11 ` [PATCH v2 1/9] drm/i915/dsi: refer to gpio index instead of gpio to avoid confusion Jani Nikula
2016-03-24 11:57   ` Mika Kahola
2016-04-01 11:53     ` Jani Nikula
2016-03-18 11:11 ` [PATCH v2 2/9] drm/i915/dsi: add support for DSI sequence block v2 gpio element Jani Nikula
2016-04-04 16:19   ` Ville Syrjälä
2016-04-05  7:33     ` Jani Nikula
2016-03-18 11:11 ` [PATCH v2 3/9] drm/i915/dsi: clean up vlv gpio table and definitions Jani Nikula
2016-04-04 17:07   ` Ville Syrjälä
2016-03-18 11:11 ` [PATCH v2 4/9] drm/i915/dsi: add gpio indexes to the gpio table Jani Nikula
2016-04-04 17:37   ` Ville Syrjälä
2016-03-18 11:11 ` [PATCH v2 5/9] drm/i915/dsi: abstract VLV gpio element execution to a separate function Jani Nikula
2016-03-18 11:11 ` Jani Nikula [this message]
2016-03-18 11:11 ` [PATCH v2 7/9] drm/i915/chv: add more IOSF port definitions Jani Nikula
2016-04-04 17:43   ` Ville Syrjälä
2016-04-05  7:34     ` Jani Nikula
2016-03-18 11:11 ` [PATCH v2 8/9] drm/i915/dsi: add support for gpio elements on CHV Jani Nikula
2016-04-04 18:11   ` Ville Syrjälä
2016-03-18 11:11 ` [PATCH v2 9/9] drm/i915/bxt: add bxt dsi gpio element support Jani Nikula
2016-03-23 10:55   ` Mika Kahola
2016-03-23 11:19     ` Jani Nikula
2016-04-04 17:46   ` Ville Syrjälä
2016-03-21  8:52 ` ✗ Fi.CI.BAT: warning for drm/i915/dsi: improved gpio element support for vlv/chv/bxt Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c8a85b08affcf88780aa92aa7675d8a4607c87d.1458299160.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=m.deepak@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.