All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: explicitly set is_dsc_supported to false before use
@ 2022-01-06 13:40 Mario Limonciello
  2022-01-06 21:40 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2022-01-06 13:40 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello

When UBSAN is enabled a case is shown on unplugging the display that
this variable hasn't been initialized by `update_dsc_caps`, presumably
when the display was unplugged it wasn't copied from the DPCD.

Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1956497
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5d20807b6f88..3d81314e6cb4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6093,6 +6093,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector,
 							struct dsc_dec_dpcd_caps *dsc_caps)
 {
 	stream->timing.flags.DSC = 0;
+	dsc_caps->is_dsc_supported = false;
 
 	if (aconnector->dc_link && (sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT ||
 		sink->sink_signal == SIGNAL_TYPE_EDP)) {
-- 
2.25.1


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

* Re: [PATCH] drm/amd/display: explicitly set is_dsc_supported to false before use
  2022-01-06 13:40 [PATCH] drm/amd/display: explicitly set is_dsc_supported to false before use Mario Limonciello
@ 2022-01-06 21:40 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-01-06 21:40 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: amd-gfx list

Acked-by: Alex Deucher <alexander.deucher@amd.com>

On Thu, Jan 6, 2022 at 8:40 AM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> When UBSAN is enabled a case is shown on unplugging the display that
> this variable hasn't been initialized by `update_dsc_caps`, presumably
> when the display was unplugged it wasn't copied from the DPCD.
>
> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1956497
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 5d20807b6f88..3d81314e6cb4 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6093,6 +6093,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector,
>                                                         struct dsc_dec_dpcd_caps *dsc_caps)
>  {
>         stream->timing.flags.DSC = 0;
> +       dsc_caps->is_dsc_supported = false;
>
>         if (aconnector->dc_link && (sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT ||
>                 sink->sink_signal == SIGNAL_TYPE_EDP)) {
> --
> 2.25.1
>

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

end of thread, other threads:[~2022-01-06 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 13:40 [PATCH] drm/amd/display: explicitly set is_dsc_supported to false before use Mario Limonciello
2022-01-06 21:40 ` Alex Deucher

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.