stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: hpd rx irq not working with eDP interface
@ 2023-05-25  0:22 Mario Limonciello
  2023-05-25  0:56 ` Limonciello, Mario
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2023-05-25  0:22 UTC (permalink / raw)
  To: stable; +Cc: Mario Limonciello

From: Robin Chen <robin.chen@amd.com>

[Why]
This is the fix for the defect of commit ab144f0b4ad6
("drm/amd/display: Allow individual control of eDP hotplug support").

[How]
To revise the default eDP hotplug setting and use the enum to git rid
of the magic number for different options.

Fixes: ab144f0b4ad6 ("drm/amd/display: Allow individual control of eDP hotplug support")
Cc: stable@vger.kernel.org
Cc: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Robin Chen <robin.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit eeefe7c4820b6baa0462a8b723ea0a3b5846ccae)
Hand modified for missing file rename changes and symbol moves in 6.1.y.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
This will help some unhandled interrupts that are related to MST
and eDP use.
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 +++++++--
 drivers/gpu/drm/amd/display/dc/dc_types.h     | 6 ++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 6299130663a3..5d53e54ebe90 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1634,14 +1634,18 @@ static bool dc_link_construct_legacy(struct dc_link *link,
 				link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
 
 			switch (link->dc->config.allow_edp_hotplug_detection) {
-			case 1: // only the 1st eDP handles hotplug
+			case HPD_EN_FOR_ALL_EDP:
+				link->irq_source_hpd_rx =
+						dal_irq_get_rx_source(link->hpd_gpio);
+				break;
+			case HPD_EN_FOR_PRIMARY_EDP_ONLY:
 				if (link->link_index == 0)
 					link->irq_source_hpd_rx =
 						dal_irq_get_rx_source(link->hpd_gpio);
 				else
 					link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
 				break;
-			case 2: // only the 2nd eDP handles hotplug
+			case HPD_EN_FOR_SECONDARY_EDP_ONLY:
 				if (link->link_index == 1)
 					link->irq_source_hpd_rx =
 						dal_irq_get_rx_source(link->hpd_gpio);
@@ -1649,6 +1653,7 @@ static bool dc_link_construct_legacy(struct dc_link *link,
 					link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
 				break;
 			default:
+				link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
 				break;
 			}
 		}
diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h
index ad9041472cca..6050a3469a57 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_types.h
@@ -993,4 +993,10 @@ struct display_endpoint_id {
 	enum display_endpoint_type ep_type;
 };
 
+enum dc_hpd_enable_select {
+	HPD_EN_FOR_ALL_EDP = 0,
+	HPD_EN_FOR_PRIMARY_EDP_ONLY,
+	HPD_EN_FOR_SECONDARY_EDP_ONLY,
+};
+
 #endif /* DC_TYPES_H_ */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amd/display: hpd rx irq not working with eDP interface
  2023-05-25  0:22 [PATCH] drm/amd/display: hpd rx irq not working with eDP interface Mario Limonciello
@ 2023-05-25  0:56 ` Limonciello, Mario
  2023-05-26 18:30   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Limonciello, Mario @ 2023-05-25  0:56 UTC (permalink / raw)
  To: stable@vger.kernel.org

[AMD Official Use Only - General]

> -----Original Message-----
> From: Limonciello, Mario <Mario.Limonciello@amd.com>
> Sent: Wednesday, May 24, 2023 7:22 PM
> To: stable@vger.kernel.org
> Cc: Limonciello, Mario <Mario.Limonciello@amd.com>
> Subject: [PATCH] drm/amd/display: hpd rx irq not working with eDP interface
>
> From: Robin Chen <robin.chen@amd.com>
>
> [Why]
> This is the fix for the defect of commit ab144f0b4ad6
> ("drm/amd/display: Allow individual control of eDP hotplug support").
>
> [How]
> To revise the default eDP hotplug setting and use the enum to git rid
> of the magic number for different options.
>
> Fixes: ab144f0b4ad6 ("drm/amd/display: Allow individual control of eDP
> hotplug support")
> Cc: stable@vger.kernel.org
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
> Signed-off-by: Robin Chen <robin.chen@amd.com>
> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> (cherry picked from commit
> eeefe7c4820b6baa0462a8b723ea0a3b5846ccae)
> Hand modified for missing file rename changes and symbol moves in 6.1.y.
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> This will help some unhandled interrupts that are related to MST
> and eDP use.

Apologies; forgot to mention in the message this is ONLY for 6.1.y.
It doesn't apply to 5.15.y, and 6.3.y already picked it up successfully.

>  drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 +++++++--
>  drivers/gpu/drm/amd/display/dc/dc_types.h     | 6 ++++++
>  2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> index 6299130663a3..5d53e54ebe90 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> @@ -1634,14 +1634,18 @@ static bool dc_link_construct_legacy(struct
> dc_link *link,
>                               link->irq_source_hpd =
> DC_IRQ_SOURCE_INVALID;
>
>                       switch (link->dc-
> >config.allow_edp_hotplug_detection) {
> -                     case 1: // only the 1st eDP handles hotplug
> +                     case HPD_EN_FOR_ALL_EDP:
> +                             link->irq_source_hpd_rx =
> +                                             dal_irq_get_rx_source(link-
> >hpd_gpio);
> +                             break;
> +                     case HPD_EN_FOR_PRIMARY_EDP_ONLY:
>                               if (link->link_index == 0)
>                                       link->irq_source_hpd_rx =
>                                               dal_irq_get_rx_source(link-
> >hpd_gpio);
>                               else
>                                       link->irq_source_hpd =
> DC_IRQ_SOURCE_INVALID;
>                               break;
> -                     case 2: // only the 2nd eDP handles hotplug
> +                     case HPD_EN_FOR_SECONDARY_EDP_ONLY:
>                               if (link->link_index == 1)
>                                       link->irq_source_hpd_rx =
>                                               dal_irq_get_rx_source(link-
> >hpd_gpio);
> @@ -1649,6 +1653,7 @@ static bool dc_link_construct_legacy(struct dc_link
> *link,
>                                       link->irq_source_hpd =
> DC_IRQ_SOURCE_INVALID;
>                               break;
>                       default:
> +                             link->irq_source_hpd =
> DC_IRQ_SOURCE_INVALID;
>                               break;
>                       }
>               }
> diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h
> b/drivers/gpu/drm/amd/display/dc/dc_types.h
> index ad9041472cca..6050a3469a57 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc_types.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc_types.h
> @@ -993,4 +993,10 @@ struct display_endpoint_id {
>       enum display_endpoint_type ep_type;
>  };
>
> +enum dc_hpd_enable_select {
> +     HPD_EN_FOR_ALL_EDP = 0,
> +     HPD_EN_FOR_PRIMARY_EDP_ONLY,
> +     HPD_EN_FOR_SECONDARY_EDP_ONLY,
> +};
> +
>  #endif /* DC_TYPES_H_ */
> --
> 2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amd/display: hpd rx irq not working with eDP interface
  2023-05-25  0:56 ` Limonciello, Mario
@ 2023-05-26 18:30   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-05-26 18:30 UTC (permalink / raw)
  To: Limonciello, Mario; +Cc: stable@vger.kernel.org

On Thu, May 25, 2023 at 12:56:48AM +0000, Limonciello, Mario wrote:
> [AMD Official Use Only - General]
> 
> > -----Original Message-----
> > From: Limonciello, Mario <Mario.Limonciello@amd.com>
> > Sent: Wednesday, May 24, 2023 7:22 PM
> > To: stable@vger.kernel.org
> > Cc: Limonciello, Mario <Mario.Limonciello@amd.com>
> > Subject: [PATCH] drm/amd/display: hpd rx irq not working with eDP interface
> >
> > From: Robin Chen <robin.chen@amd.com>
> >
> > [Why]
> > This is the fix for the defect of commit ab144f0b4ad6
> > ("drm/amd/display: Allow individual control of eDP hotplug support").
> >
> > [How]
> > To revise the default eDP hotplug setting and use the enum to git rid
> > of the magic number for different options.
> >
> > Fixes: ab144f0b4ad6 ("drm/amd/display: Allow individual control of eDP
> > hotplug support")
> > Cc: stable@vger.kernel.org
> > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
> > Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
> > Signed-off-by: Robin Chen <robin.chen@amd.com>
> > Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > (cherry picked from commit
> > eeefe7c4820b6baa0462a8b723ea0a3b5846ccae)
> > Hand modified for missing file rename changes and symbol moves in 6.1.y.
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > ---
> > This will help some unhandled interrupts that are related to MST
> > and eDP use.
> 
> Apologies; forgot to mention in the message this is ONLY for 6.1.y.
> It doesn't apply to 5.15.y, and 6.3.y already picked it up successfully.

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-26 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-25  0:22 [PATCH] drm/amd/display: hpd rx irq not working with eDP interface Mario Limonciello
2023-05-25  0:56 ` Limonciello, Mario
2023-05-26 18:30   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).