* [PATCH AUTOSEL 6.1 09/15] drm/amd/display: Reset freesync config before update new state
[not found] <20240716142825.2713416-1-sashal@kernel.org>
@ 2024-07-16 14:28 ` Sasha Levin
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 10/15] drm/amd/display: Account for cursor prefetch BW in DML1 mode support Sasha Levin
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 11/15] drm/radeon: check bo_va->bo is non-NULL before using it Sasha Levin
2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-07-16 14:28 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tom Chung, Sun peng Li, Jerry Zuo, Daniel Wheeler, Alex Deucher,
Sasha Levin, harry.wentland, Rodrigo.Siqueira, christian.koenig,
Xinhui.Pan, airlied, daniel, alex.hung, hamza.mahfooz, roman.li,
mario.limonciello, joshua, wayne.lin, srinivasan.shanmugam,
amd-gfx, dri-devel
From: Tom Chung <chiahsuan.chung@amd.com>
[ Upstream commit 6b8487cdf9fc7bae707519ac5b5daeca18d1e85b ]
[Why]
Sometimes the new_crtc_state->vrr_infopacket did not sync up with the
current state.
It will affect the update_freesync_state_on_stream() does not update
the state correctly.
[How]
Reset the freesync config before get_freesync_config_for_crtc() to
make sure we have the correct new_crtc_state for VRR.
Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@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 | 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 31bae620aeffc..ebf53a9a9dc89 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9278,6 +9278,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
}
/* Update Freesync settings. */
+ reset_freesync_config_for_crtc(dm_new_crtc_state);
get_freesync_config_for_crtc(dm_new_crtc_state,
dm_new_conn_state);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH AUTOSEL 6.1 10/15] drm/amd/display: Account for cursor prefetch BW in DML1 mode support
[not found] <20240716142825.2713416-1-sashal@kernel.org>
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 09/15] drm/amd/display: Reset freesync config before update new state Sasha Levin
@ 2024-07-16 14:28 ` Sasha Levin
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 11/15] drm/radeon: check bo_va->bo is non-NULL before using it Sasha Levin
2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-07-16 14:28 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alvin Lee, Chaitanya Dhere, Nevenko Stupar, Jerry Zuo,
Daniel Wheeler, Alex Deucher, Sasha Levin, harry.wentland,
sunpeng.li, Rodrigo.Siqueira, christian.koenig, Xinhui.Pan,
airlied, daniel, jun.lei, amd-gfx, dri-devel
From: Alvin Lee <alvin.lee2@amd.com>
[ Upstream commit 074b3a886713f69d98d30bb348b1e4cb3ce52b22 ]
[Description]
We need to ensure to take into account cursor prefetch BW in
mode support or we may pass ModeQuery but fail an actual flip
which will cause a hang. Flip may fail because the cursor_pre_bw
is populated during mode programming (and mode programming is
never called prior to ModeQuery).
Reviewed-by: Chaitanya Dhere <chaitanya.dhere@amd.com>
Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@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/dc/dml/dcn32/display_mode_vba_32.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
index cc8c1a48c5c4d..76df036fb2f34 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
@@ -3338,6 +3338,9 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
&mode_lib->vba.UrgentBurstFactorLumaPre[k],
&mode_lib->vba.UrgentBurstFactorChromaPre[k],
&mode_lib->vba.NotUrgentLatencyHidingPre[k]);
+
+ v->cursor_bw_pre[k] = mode_lib->vba.NumberOfCursors[k] * mode_lib->vba.CursorWidth[k][0] * mode_lib->vba.CursorBPP[k][0] /
+ 8.0 / (mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k]) * v->VRatioPreY[i][j][k];
}
{
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH AUTOSEL 6.1 11/15] drm/radeon: check bo_va->bo is non-NULL before using it
[not found] <20240716142825.2713416-1-sashal@kernel.org>
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 09/15] drm/amd/display: Reset freesync config before update new state Sasha Levin
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 10/15] drm/amd/display: Account for cursor prefetch BW in DML1 mode support Sasha Levin
@ 2024-07-16 14:28 ` Sasha Levin
2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-07-16 14:28 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pierre-Eric Pelloux-Prayer, Alex Deucher, Sasha Levin,
christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx, dri-devel
From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
[ Upstream commit 6fb15dcbcf4f212930350eaee174bb60ed40a536 ]
The call to radeon_vm_clear_freed might clear bo_va->bo, so
we have to check it before dereferencing it.
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/radeon/radeon_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index 75d79c3110389..3388a3d21d2c0 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -657,7 +657,7 @@ static void radeon_gem_va_update_vm(struct radeon_device *rdev,
if (r)
goto error_unlock;
- if (bo_va->it.start)
+ if (bo_va->it.start && bo_va->bo)
r = radeon_vm_bo_update(rdev, bo_va, bo_va->bo->tbo.resource);
error_unlock:
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-16 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240716142825.2713416-1-sashal@kernel.org>
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 09/15] drm/amd/display: Reset freesync config before update new state Sasha Levin
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 10/15] drm/amd/display: Account for cursor prefetch BW in DML1 mode support Sasha Levin
2024-07-16 14:28 ` [PATCH AUTOSEL 6.1 11/15] drm/radeon: check bo_va->bo is non-NULL before using it Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox