Message ID | 20231102151228.668842-2-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO | expand |
On Thu, Nov 02, 2023 at 05:12:14PM +0200, Andy Shevchenko wrote: > From: Jani Nikula <jani.nikula@intel.com> > > Purely a guess. Drop the nop function. > > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Cc: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > index 24b2cbcfc1ef..b2c0cc11f8c1 100644 > --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > @@ -372,14 +372,6 @@ static void bxt_exec_gpio(struct intel_connector *connector, > gpiod_set_value(gpio_desc, value); > } > > -static void icl_exec_gpio(struct intel_connector *connector, > - u8 gpio_source, u8 gpio_index, bool value) > -{ > - struct drm_i915_private *dev_priv = to_i915(connector->base.dev); > - > - drm_dbg_kms(&dev_priv->drm, "Skipping ICL GPIO element execution\n"); > -} > - > enum { > MIPI_RESET_1 = 0, > MIPI_AVDD_EN_1, > @@ -491,7 +483,7 @@ static const u8 *mipi_exec_gpio(struct intel_dsi *intel_dsi, const u8 *data) > if (native) > icl_native_gpio_set_value(dev_priv, gpio_number, value); > else if (DISPLAY_VER(dev_priv) >= 11) > - icl_exec_gpio(connector, gpio_source, gpio_index, value); > + bxt_exec_gpio(connector, gpio_source, gpio_index, value); We could just drop this whole branch since we end up in bxt_exec_gpio() in the end anyway. Or we drop the final else and make this one check for DISPLAY_VER >=9. > else if (IS_VALLEYVIEW(dev_priv)) > vlv_exec_gpio(connector, gpio_source, gpio_number, value); > else if (IS_CHERRYVIEW(dev_priv)) > -- > 2.40.0.1.gaa8946217a0b
On Thu, Nov 02, 2023 at 07:10:09PM +0200, Ville Syrjälä wrote: > On Thu, Nov 02, 2023 at 05:12:14PM +0200, Andy Shevchenko wrote: ... > > if (native) > > icl_native_gpio_set_value(dev_priv, gpio_number, value); > > else if (DISPLAY_VER(dev_priv) >= 11) > > - icl_exec_gpio(connector, gpio_source, gpio_index, value); > > + bxt_exec_gpio(connector, gpio_source, gpio_index, value); > > We could just drop this whole branch since we end up in bxt_exec_gpio() > in the end anyway. Or we drop the final else and make this one check for > DISPLAY_VER >=9. Looking at the code, I'm not sure how we can get rid of it, but the second option is feasible. > > else if (IS_VALLEYVIEW(dev_priv)) > > vlv_exec_gpio(connector, gpio_source, gpio_number, value); > > else if (IS_CHERRYVIEW(dev_priv))
diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c index 24b2cbcfc1ef..b2c0cc11f8c1 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c @@ -372,14 +372,6 @@ static void bxt_exec_gpio(struct intel_connector *connector, gpiod_set_value(gpio_desc, value); } -static void icl_exec_gpio(struct intel_connector *connector, - u8 gpio_source, u8 gpio_index, bool value) -{ - struct drm_i915_private *dev_priv = to_i915(connector->base.dev); - - drm_dbg_kms(&dev_priv->drm, "Skipping ICL GPIO element execution\n"); -} - enum { MIPI_RESET_1 = 0, MIPI_AVDD_EN_1, @@ -491,7 +483,7 @@ static const u8 *mipi_exec_gpio(struct intel_dsi *intel_dsi, const u8 *data) if (native) icl_native_gpio_set_value(dev_priv, gpio_number, value); else if (DISPLAY_VER(dev_priv) >= 11) - icl_exec_gpio(connector, gpio_source, gpio_index, value); + bxt_exec_gpio(connector, gpio_source, gpio_index, value); else if (IS_VALLEYVIEW(dev_priv)) vlv_exec_gpio(connector, gpio_source, gpio_number, value); else if (IS_CHERRYVIEW(dev_priv))