amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.15 11/12] drm/amd/display: Fix timing not changning when freesync video is enabled
       [not found] <20230131150030.1250104-1-sashal@kernel.org>
@ 2023-01-31 15:00 ` Sasha Levin
  2023-01-31 15:00 ` [PATCH AUTOSEL 5.15 12/12] amdgpu: fix build on non-DCN platforms Sasha Levin
  1 sibling, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2023-01-31 15:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Alan Liu, Sasha Levin, stylon.wang, sunpeng.li, airlied,
	Xinhui.Pan, Rodrigo.Siqueira, roman.li, amd-gfx,
	christian.koenig, Daniel Wheeler, Aurabindo Pillai, dri-devel,
	daniel, Jerry.Zuo, Alex Deucher, harry.wentland,
	Nicholas Kazlauskas

From: Aurabindo Pillai <aurabindo.pillai@amd.com>

[ Upstream commit 4b069553246f993c4221e382d0d0ae34f5ba730e ]

[Why&How]
Switching between certain modes that are freesync video modes and those
are not freesync video modes result in timing not changing as seen by
the monitor due to incorrect timing being driven.

The issue is fixed by ensuring that when a non freesync video mode is
set, we reset the freesync status on the crtc.

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++
 1 file changed, 7 insertions(+)

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 409739ee5ba0..ee238a16572e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10140,6 +10140,13 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
 		if (!dm_old_crtc_state->stream)
 			goto skip_modeset;
 
+		/* Unset freesync video if it was active before */
+		if (dm_old_crtc_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED) {
+			dm_new_crtc_state->freesync_config.state = VRR_STATE_INACTIVE;
+			dm_new_crtc_state->freesync_config.fixed_refresh_in_uhz = 0;
+		}
+
+		/* Now check if we should set freesync video mode */
 		if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
 		    is_timing_unchanged_for_freesync(new_crtc_state,
 						     old_crtc_state)) {
-- 
2.39.0


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

* [PATCH AUTOSEL 5.15 12/12] amdgpu: fix build on non-DCN platforms.
       [not found] <20230131150030.1250104-1-sashal@kernel.org>
  2023-01-31 15:00 ` [PATCH AUTOSEL 5.15 11/12] drm/amd/display: Fix timing not changning when freesync video is enabled Sasha Levin
@ 2023-01-31 15:00 ` Sasha Levin
  2023-01-31 20:29   ` Alex Deucher
  1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2023-01-31 15:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sasha Levin, stylon.wang, sunpeng.li, airlied, Xinhui.Pan,
	Rodrigo.Siqueira, roman.li, amd-gfx, Jerry.Zuo, aurabindo.pillai,
	dri-devel, daniel, alexander.deucher, Dave Airlie,
	harry.wentland, christian.koenig

From: Dave Airlie <airlied@redhat.com>

[ Upstream commit f439a959dcfb6b39d6fd4b85ca1110a1d1de1587 ]

This fixes the build here locally on my 32-bit arm build.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)

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 ee238a16572e..0f0dd9b0d84a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10769,6 +10769,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 	bool lock_and_validation_needed = false;
 	struct dm_crtc_state *dm_old_crtc_state;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
+	struct drm_dp_mst_topology_mgr *mgr;
+	struct drm_dp_mst_topology_state *mst_state;
 	struct dsc_mst_fairness_vars vars[MAX_PIPES];
 #endif
 
-- 
2.39.0


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

* Re: [PATCH AUTOSEL 5.15 12/12] amdgpu: fix build on non-DCN platforms.
  2023-01-31 15:00 ` [PATCH AUTOSEL 5.15 12/12] amdgpu: fix build on non-DCN platforms Sasha Levin
@ 2023-01-31 20:29   ` Alex Deucher
  2023-02-05 14:17     ` Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2023-01-31 20:29 UTC (permalink / raw)
  To: Sasha Levin
  Cc: stylon.wang, sunpeng.li, dri-devel, Xinhui.Pan, Rodrigo.Siqueira,
	linux-kernel, stable, roman.li, Jerry.Zuo, aurabindo.pillai,
	amd-gfx, alexander.deucher, Dave Airlie, christian.koenig

On Tue, Jan 31, 2023 at 10:01 AM Sasha Levin <sashal@kernel.org> wrote:
>
> From: Dave Airlie <airlied@redhat.com>
>
> [ Upstream commit f439a959dcfb6b39d6fd4b85ca1110a1d1de1587 ]
>
> This fixes the build here locally on my 32-bit arm build.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This patch is only applicable to kernel 6.1 and newer.

Alex


> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> 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 ee238a16572e..0f0dd9b0d84a 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -10769,6 +10769,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>         bool lock_and_validation_needed = false;
>         struct dm_crtc_state *dm_old_crtc_state;
>  #if defined(CONFIG_DRM_AMD_DC_DCN)
> +       struct drm_dp_mst_topology_mgr *mgr;
> +       struct drm_dp_mst_topology_state *mst_state;
>         struct dsc_mst_fairness_vars vars[MAX_PIPES];
>  #endif
>
> --
> 2.39.0
>

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

* Re: [PATCH AUTOSEL 5.15 12/12] amdgpu: fix build on non-DCN platforms.
  2023-01-31 20:29   ` Alex Deucher
@ 2023-02-05 14:17     ` Sasha Levin
  0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2023-02-05 14:17 UTC (permalink / raw)
  To: Alex Deucher
  Cc: stylon.wang, sunpeng.li, dri-devel, Xinhui.Pan, Rodrigo.Siqueira,
	linux-kernel, stable, roman.li, Jerry.Zuo, aurabindo.pillai,
	amd-gfx, alexander.deucher, Dave Airlie, christian.koenig

On Tue, Jan 31, 2023 at 03:29:04PM -0500, Alex Deucher wrote:
>On Tue, Jan 31, 2023 at 10:01 AM Sasha Levin <sashal@kernel.org> wrote:
>>
>> From: Dave Airlie <airlied@redhat.com>
>>
>> [ Upstream commit f439a959dcfb6b39d6fd4b85ca1110a1d1de1587 ]
>>
>> This fixes the build here locally on my 32-bit arm build.
>>
>> Signed-off-by: Dave Airlie <airlied@redhat.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>This patch is only applicable to kernel 6.1 and newer.

Ack, I'll drop it on older kernels, thanks!

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2023-02-05 14:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230131150030.1250104-1-sashal@kernel.org>
2023-01-31 15:00 ` [PATCH AUTOSEL 5.15 11/12] drm/amd/display: Fix timing not changning when freesync video is enabled Sasha Levin
2023-01-31 15:00 ` [PATCH AUTOSEL 5.15 12/12] amdgpu: fix build on non-DCN platforms Sasha Levin
2023-01-31 20:29   ` Alex Deucher
2023-02-05 14:17     ` Sasha Levin

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).