From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 3/6] drm/i915/dsi: use a temp variable for referencing the gpio table
Date: Thu, 07 Apr 2016 16:39:30 +0300 [thread overview]
Message-ID: <87bn5lwnal.fsf@intel.com> (raw)
In-Reply-To: <20160407130119.GH4329@intel.com>
On Thu, 07 Apr 2016, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Apr 05, 2016 at 10:30:51PM +0300, Jani Nikula wrote:
>> The shorthand is easier. Also change the struct name. No functional
>> changes.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Pushed the first three to drm-intel-next-queued, with the fixme comment
restored in patch 2, thanks for the review.
BR,
Jani.
>
>> ---
>> drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 15 +++++++++------
>> 1 file changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
>> index 6c2774ceb69f..ff0731420677 100644
>> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
>> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
>> @@ -75,12 +75,12 @@ static inline struct vbt_panel *to_vbt_panel(struct drm_panel *panel)
>> #define VLV_GPIO_PCONF0(base_offset) (base_offset)
>> #define VLV_GPIO_PAD_VAL(base_offset) ((base_offset) + 8)
>>
>> -struct gpio_table {
>> +struct gpio_map {
>> u16 base_offset;
>> bool init;
>> };
>>
>> -static struct gpio_table vlv_gpio_table[] = {
>> +static struct gpio_map vlv_gpio_table[] = {
>> { VLV_GPIO_NC_0_HV_DDI0_HPD },
>> { VLV_GPIO_NC_1_HV_DDI0_DDC_SDA },
>> { VLV_GPIO_NC_2_HV_DDI0_DDC_SCL },
>> @@ -190,6 +190,7 @@ static const u8 *mipi_exec_delay(struct intel_dsi *intel_dsi, const u8 *data)
>> static void vlv_exec_gpio(struct drm_i915_private *dev_priv,
>> u8 gpio_source, u8 gpio_index, bool value)
>> {
>> + struct gpio_map *map;
>> u16 pconf0, padval;
>> u32 tmp;
>> u8 port;
>> @@ -199,6 +200,8 @@ static void vlv_exec_gpio(struct drm_i915_private *dev_priv,
>> return;
>> }
>>
>> + map = &vlv_gpio_table[gpio_index];
>> +
>> if (dev_priv->vbt.dsi.seq_version >= 3) {
>> DRM_DEBUG_KMS("GPIO element v3 not supported\n");
>> return;
>> @@ -213,13 +216,13 @@ static void vlv_exec_gpio(struct drm_i915_private *dev_priv,
>> }
>> }
>>
>> - pconf0 = VLV_GPIO_PCONF0(vlv_gpio_table[gpio_index].base_offset);
>> - padval = VLV_GPIO_PAD_VAL(vlv_gpio_table[gpio_index].base_offset);
>> + pconf0 = VLV_GPIO_PCONF0(map->base_offset);
>> + padval = VLV_GPIO_PAD_VAL(map->base_offset);
>>
>> mutex_lock(&dev_priv->sb_lock);
>> - if (!vlv_gpio_table[gpio_index].init) {
>> + if (!map->init) {
>> vlv_iosf_sb_write(dev_priv, port, pconf0, 0x2000CC00);
>> - vlv_gpio_table[gpio_index].init = true;
>> + map->init = true;
>> }
>>
>> tmp = 0x4 | value;
>> --
>> 2.1.4
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-07 13:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 19:30 [PATCH v3 0/6] drm/i915/dsi: improved gpio element support for vlv/chv/bxt Jani Nikula
2016-04-05 19:30 ` [PATCH v3 1/6] drm/i915/dsi: clean up vlv gpio table and definitions Jani Nikula
2016-04-07 12:59 ` Ville Syrjälä
2016-04-05 19:30 ` [PATCH v3 2/6] drm/i915/dsi: abstract VLV gpio element execution to a separate function Jani Nikula
2016-04-07 13:00 ` Ville Syrjälä
2016-04-05 19:30 ` [PATCH v3 3/6] drm/i915/dsi: use a temp variable for referencing the gpio table Jani Nikula
2016-04-07 13:01 ` Ville Syrjälä
2016-04-07 13:39 ` Jani Nikula [this message]
2016-04-05 19:30 ` [PATCH v3 4/6] drm/i915/dsi: add support for sequence block v3 gpio for VLV Jani Nikula
2016-04-07 13:04 ` Ville Syrjälä
2016-04-07 13:14 ` Jani Nikula
2016-04-05 19:30 ` [PATCH v3 5/6] drm/i915/dsi: add support for gpio elements on CHV Jani Nikula
2016-04-07 13:16 ` Ville Syrjälä
2016-04-05 19:30 ` [PATCH v3 6/6] drm/i915/bxt: add bxt dsi gpio element support Jani Nikula
2016-04-07 11:47 ` [PATCH] " Jani Nikula
2016-04-07 12:21 ` Ville Syrjälä
2016-04-07 12:55 ` Jani Nikula
2016-04-06 7:27 ` ✗ Fi.CI.BAT: failure for drm/i915/dsi: improved gpio element support for vlv/chv/bxt (rev2) 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=87bn5lwnal.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).