Re: [Intel-gfx] [PATCH v10 13/15] drm/i915/icl: add dummy DSI GPIO element execution function

2018-11-02 Thread Jani Nikula
On Fri, 02 Nov 2018, Madhav Chauhan  wrote:
> On 11/2/2018 5:17 PM, Jani Nikula wrote:
>> Add dummy debug logging GPIO element execution function for ICL.
>>
>> Signed-off-by: Jani Nikula 
> Its kinda split of "drm/i915/icl: Add changes to program DSI panel GPIOs"
> to pave out the way further. Looks good to me.

Yeah since there was controversy with that change, add this one to not
take the other platform code paths for ICL.

> Reviewed-by: Madhav Chauhan 

Thanks,
Jani.

>
> Regards,
> Madhav
>
>> ---
>>   drivers/gpu/drm/i915/intel_dsi_vbt.c | 10 +-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c 
>> b/drivers/gpu/drm/i915/intel_dsi_vbt.c
>> index b41ca6436401..a1a8b3790e61 100644
>> --- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
>> +++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
>> @@ -336,6 +336,12 @@ static void bxt_exec_gpio(struct drm_i915_private 
>> *dev_priv,
>>  gpiod_set_value(gpio_desc, value);
>>   }
>>   
>> +static void icl_exec_gpio(struct drm_i915_private *dev_priv,
>> +  u8 gpio_source, u8 gpio_index, bool value)
>> +{
>> +DRM_DEBUG_KMS("Skipping ICL GPIO element execution\n");
>> +}
>> +
>>   static const u8 *mipi_exec_gpio(struct intel_dsi *intel_dsi, const u8 
>> *data)
>>   {
>>  struct drm_device *dev = intel_dsi->base.base.dev;
>> @@ -359,7 +365,9 @@ static const u8 *mipi_exec_gpio(struct intel_dsi 
>> *intel_dsi, const u8 *data)
>>  /* pull up/down */
>>  value = *data++ & 1;
>>   
>> -if (IS_VALLEYVIEW(dev_priv))
>> +if (IS_ICELAKE(dev_priv))
>> +icl_exec_gpio(dev_priv, gpio_source, gpio_index, value);
>> +else if (IS_VALLEYVIEW(dev_priv))
>>  vlv_exec_gpio(dev_priv, gpio_source, gpio_number, value);
>>  else if (IS_CHERRYVIEW(dev_priv))
>>  chv_exec_gpio(dev_priv, gpio_source, gpio_number, value);
>

-- 
Jani Nikula, Intel Open Source Graphics Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v10 13/15] drm/i915/icl: add dummy DSI GPIO element execution function

2018-11-02 Thread Madhav Chauhan

On 11/2/2018 5:17 PM, Jani Nikula wrote:

Add dummy debug logging GPIO element execution function for ICL.

Signed-off-by: Jani Nikula 

Its kinda split of "drm/i915/icl: Add changes to program DSI panel GPIOs"
to pave out the way further. Looks good to me.

Reviewed-by: Madhav Chauhan 

Regards,
Madhav


---
  drivers/gpu/drm/i915/intel_dsi_vbt.c | 10 +-
  1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c 
b/drivers/gpu/drm/i915/intel_dsi_vbt.c
index b41ca6436401..a1a8b3790e61 100644
--- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
@@ -336,6 +336,12 @@ static void bxt_exec_gpio(struct drm_i915_private 
*dev_priv,
gpiod_set_value(gpio_desc, value);
  }
  
+static void icl_exec_gpio(struct drm_i915_private *dev_priv,

+ u8 gpio_source, u8 gpio_index, bool value)
+{
+   DRM_DEBUG_KMS("Skipping ICL GPIO element execution\n");
+}
+
  static const u8 *mipi_exec_gpio(struct intel_dsi *intel_dsi, const u8 *data)
  {
struct drm_device *dev = intel_dsi->base.base.dev;
@@ -359,7 +365,9 @@ static const u8 *mipi_exec_gpio(struct intel_dsi 
*intel_dsi, const u8 *data)
/* pull up/down */
value = *data++ & 1;
  
-	if (IS_VALLEYVIEW(dev_priv))

+   if (IS_ICELAKE(dev_priv))
+   icl_exec_gpio(dev_priv, gpio_source, gpio_index, value);
+   else if (IS_VALLEYVIEW(dev_priv))
vlv_exec_gpio(dev_priv, gpio_source, gpio_number, value);
else if (IS_CHERRYVIEW(dev_priv))
chv_exec_gpio(dev_priv, gpio_source, gpio_number, value);


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