[Intel-gfx] [PATCH] drm/i915/dsi: unregister gmbus if LFP display was MIPI panel
Jani Nikula
jani.nikula at linux.intel.com
Thu Sep 16 10:32:47 UTC 2021
On Thu, 16 Sep 2021, Lee Shawn C <shawn.c.lee at intel.com> wrote:
> Gmbus driver would setup all Intel i2c GMBuses. But DDC bus
> may configured as gpio and reserved for MIPI driver to control
> panel power on/off sequence.
>
> Using i2c tool to communicate to peripherals via i2c interface
> reversed for gmbus(DDC). There will be some high/low pulse
> appear on DDC SCL and SDA (might be host sent out i2c slave
> address). MIPI panel would be impacted due to unexpected signal
> then caused abnormal display or shut down issue.
Just a quick reply:
So I don't know off the bat what the right solution is, but it's very
obvious to me that we absolute can't go deleting gmbus adapters from DSI
code.
BR,
Jani.
>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Cc: Vandita Kulkarni <vandita.kulkarni at intel.com>
> Cc: Cooper Chiou <cooper.chiou at intel.com>
> Cc: William Tseng <william.tseng at intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee at intel.com>
> ---
> drivers/gpu/drm/i915/display/icl_dsi.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 060bc8fb0d30..d2504e291fcb 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1999,6 +1999,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
> struct intel_connector *intel_connector;
> struct drm_connector *connector;
> struct drm_display_mode *fixed_mode;
> + struct intel_gmbus *bus;
> enum port port;
>
> if (!intel_bios_is_dsi_present(dev_priv, &port))
> @@ -2092,6 +2093,19 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
> icl_dphy_param_init(intel_dsi);
>
> icl_dsi_add_properties(intel_connector);
> +
> + /*
> + * DDC bus may configured as gpio and reserved for MIPI driver
> + * to control panel power on/off sequence. so, unregister gmbus
> + * if MIPI was LFP display.
> + */
> + bus = &dev_priv->gmbus[GMBUS_PIN_1_BXT];
> + i2c_del_adapter(&bus->adapter);
> +
> + if (dev_priv->vbt.dsi.config->dual_link) {
> + bus = &dev_priv->gmbus[GMBUS_PIN_2_BXT];
> + i2c_del_adapter(&bus->adapter);
> + }
> return;
>
> err:
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list