[Intel-gfx] [PATCH] drm/i915/hotplug: Use phy to get the hpd_pin instead of the port
Jani Nikula
jani.nikula at linux.intel.com
Thu Jan 30 10:37:29 UTC 2020
On Wed, 29 Jan 2020, Vivek Kasireddy <vivek.kasireddy at intel.com> wrote:
> On some platforms such as Elkhart Lake, although we may use DDI D
> to drive a connector, we have to use PHY A (Combo Phy PORT A) to
> detect the hotplug interrupts as per the spec because there is no
> one-to-one mapping between DDIs and PHYs. Therefore, use the
> function intel_port_to_phy() which contains the logic for such
> mapping(s) to find the correct hpd_pin.
>
> This change should not affect other platforms as there is always
> a one-to-one mapping between DDIs and PHYs.
>
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Cc: José Roberto de Souza <jose.souza at intel.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hotplug.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
> index 042d98bae1ea..491f6b6f920d 100644
> --- a/drivers/gpu/drm/i915/display/intel_hotplug.c
> +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
> @@ -89,7 +89,8 @@
> enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,
> enum port port)
> {
> - switch (port) {
> + enum phy phy = intel_port_to_phy(dev_priv, port);
> + switch (phy) {
> case PORT_A:
If you switch on enum phy, then the cases should be phys also.
BR,
Jani.
> return HPD_PORT_A;
> case PORT_B:
> @@ -111,7 +112,7 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,
> case PORT_I:
> return HPD_PORT_I;
> default:
> - MISSING_CASE(port);
> + MISSING_CASE(phy);
> return HPD_NONE;
> }
> }
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list