From: Jani Nikula <jani.nikula@linux.intel.com>
To: "20210916102118.17356-1-shawn.c.lee\@intel.com"
<20210916102118.17356-1-shawn.c.lee@intel.com>,
"intel-gfx\@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "Kulkarni\, Vandita" <vandita.kulkarni@intel.com>, "Chiou\,
Cooper" <cooper.chiou@intel.com>, "Tseng\,
William" <william.tseng@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dsi: unregister gmbus if LFP display was MIPI panel
Date: Thu, 16 Sep 2021 14:12:29 +0300 [thread overview]
Message-ID: <878rzwwz8i.fsf@intel.com> (raw)
In-Reply-To: <CO6PR11MB5651BAD4133E70B7A008B3CBA3DC9@CO6PR11MB5651.namprd11.prod.outlook.com>
On Thu, 16 Sep 2021, "Lee, Shawn C" <shawn.c.lee@intel.com> wrote:
> On Thu, 16 Sep 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>On Thu, 16 Sep 2021, Lee Shawn C <shawn.c.lee@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.
>>
>
> Create a new function in gmbus driver that allow to remove a given gmbus adapter. And DSI driver used it to unregister particular gmbus.
> It looks to me more reasonable for DSI and gmbus driver. What do you think?
No, I don't think that's good enough either. We probably need to figure
this out up front in intel_bios.c. You see, if a non-DSI port is already
using the pin, you'll end up removing it under it. So I think you'd need
to prevent the gmbus pin from being registered and the non-DSI port
being used.
BR,
Jani.
>
> Best regards,
> Shawn
>
>>>
>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
>>> Cc: Cooper Chiou <cooper.chiou@intel.com>
>>> Cc: William Tseng <william.tseng@intel.com>
>>> Signed-off-by: Lee Shawn C <shawn.c.lee@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
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2021-09-16 11:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 10:21 [Intel-gfx] [PATCH] drm/i915/dsi: unregister gmbus if LFP display was MIPI panel Lee Shawn C
2021-09-16 10:32 ` Jani Nikula
2021-09-16 11:03 ` Lee, Shawn C
2021-09-16 11:12 ` Jani Nikula [this message]
2021-09-16 10:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-09-16 12:46 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-09-16 14:08 ` [Intel-gfx] [PATCH] drm/i915/dsi: do not register gmbus if it was reserved for MIPI display Lee Shawn C
2021-09-16 20:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2) Patchwork
2021-09-16 20:39 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-09-16 21:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-09-17 0:43 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-09-17 4:35 ` [Intel-gfx] [PATCH] drm/i915/dsi: do not register gmbus if it was reserved for MIPI display Lee Shawn C
2021-09-17 10:59 ` Jani Nikula
2021-09-17 12:35 ` Lee, Shawn C
2021-09-17 4:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev3) Patchwork
2021-09-17 5:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-09-17 6:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-09-23 2:33 ` [Intel-gfx] [v4] drm/i915/dsi: do not register gmbus if it was reserved for MIPI display Lee Shawn C
2021-10-05 1:28 ` Lee, Shawn C
2021-09-23 3:01 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev4) Patchwork
2021-09-23 3:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-09-23 5:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=878rzwwz8i.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=20210916102118.17356-1-shawn.c.lee@intel.com \
--cc=cooper.chiou@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vandita.kulkarni@intel.com \
--cc=william.tseng@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.