* [PATCH AUTOSEL 5.10 07/28] drm/amd/display: Fix tiled display misalignment
[not found] <20240122151521.996443-1-sashal@kernel.org>
@ 2024-01-22 15:14 ` Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 09/28] drm/amd/display: Fix writeback_info never got updated Sasha Levin
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-01-22 15:14 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, aric.cyr, dillon.varone, dri-devel, amd-gfx,
sunpeng.li, airlied, Qingqing.Zhuo, Xinhui.Pan, Rodrigo.Siqueira,
samson.tam, christian.koenig, Meenakshikumar Somasundaram,
wenjing.liu, Hamza Mahfooz, daniel, Alex Deucher, jun.lei,
harry.wentland, Nicholas Kazlauskas, alvin.lee2
From: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
[ Upstream commit c4b8394e76adba4f50a3c2696c75b214a291e24a ]
[Why]
When otg workaround is applied during clock update, otgs of
tiled display went out of sync.
[How]
To call dc_trigger_sync() after clock update to sync otgs again.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@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/core/dc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 36a9e9c84ed4..272252cd0500 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1440,6 +1440,10 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
wait_for_no_pipes_pending(dc, context);
/* pplib is notified if disp_num changed */
dc->hwss.optimize_bandwidth(dc, context);
+ /* Need to do otg sync again as otg could be out of sync due to otg
+ * workaround applied during clock update
+ */
+ dc_trigger_sync(dc, context);
}
context->stream_mask = get_stream_mask(dc, context);
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.10 09/28] drm/amd/display: Fix writeback_info never got updated
[not found] <20240122151521.996443-1-sashal@kernel.org>
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 07/28] drm/amd/display: Fix tiled display misalignment Sasha Levin
@ 2024-01-22 15:14 ` Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 26/28] drm/amd/display: make flip_timestamp_in_us a 64-bit variable Sasha Levin
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-01-22 15:14 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, dillon.varone, dri-devel, Alex Hung, airlied,
qingqing.zhuo, Xinhui.Pan, Rodrigo.Siqueira, amd-gfx, sunpeng.li,
aurabindo.pillai, alvin.lee2, daniel, Alex Deucher, jun.lei,
Harry Wentland, christian.koenig
From: Alex Hung <alex.hung@amd.com>
[ Upstream commit 8a307777c36e15f38c9f23778babcd368144c7d8 ]
[WHY]
wb_enabled field is set to false before it is used, and the following
code will never be executed.
[HOW]
Setting wb_enable to false after all removal work is completed.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@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/core/dc_stream.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 8206c6edba74..c54691166871 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -481,18 +481,13 @@ bool dc_stream_remove_writeback(struct dc *dc,
return false;
}
-// stream->writeback_info[dwb_pipe_inst].wb_enabled = false;
- for (i = 0; i < stream->num_wb_info; i++) {
- /*dynamic update*/
- if (stream->writeback_info[i].wb_enabled &&
- stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst) {
- stream->writeback_info[i].wb_enabled = false;
- }
- }
-
/* remove writeback info for disabled writeback pipes from stream */
for (i = 0, j = 0; i < stream->num_wb_info; i++) {
if (stream->writeback_info[i].wb_enabled) {
+
+ if (stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst)
+ stream->writeback_info[i].wb_enabled = false;
+
if (i != j)
/* trim the array */
stream->writeback_info[j] = stream->writeback_info[i];
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.10 26/28] drm/amd/display: make flip_timestamp_in_us a 64-bit variable
[not found] <20240122151521.996443-1-sashal@kernel.org>
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 07/28] drm/amd/display: Fix tiled display misalignment Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 09/28] drm/amd/display: Fix writeback_info never got updated Sasha Levin
@ 2024-01-22 15:14 ` Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 27/28] drm/amdgpu: Let KFD sync with VM fences Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 28/28] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' Sasha Levin
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-01-22 15:14 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Aric Cyr, dri-devel, sunpeng.li, harry.wentland,
qingqing.zhuo, Xinhui.Pan, Rodrigo.Siqueira, amd-gfx, wenjing.liu,
Daniel Wheeler, aurabindo.pillai, mario.limonciello, daniel,
Wayne Lin, Alex Deucher, airlied, Josip Pavic, christian.koenig,
hamza.mahfooz
From: Josip Pavic <josip.pavic@amd.com>
[ Upstream commit 6fb12518ca58412dc51054e2a7400afb41328d85 ]
[Why]
This variable currently overflows after about 71 minutes. This doesn't
cause any known functional issues but it does make debugging more
difficult.
[How]
Make it a 64-bit variable.
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Josip Pavic <josip.pavic@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/dc_hw_types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
index 1a87bc3da826..b36d4c5d0eca 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
@@ -426,7 +426,7 @@ struct dc_cursor_position {
};
struct dc_cursor_mi_param {
- unsigned int pixel_clk_khz;
+ unsigned long long pixel_clk_khz;
unsigned int ref_clk_khz;
struct rect viewport;
struct fixed31_32 h_scale_ratio;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.10 27/28] drm/amdgpu: Let KFD sync with VM fences
[not found] <20240122151521.996443-1-sashal@kernel.org>
` (2 preceding siblings ...)
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 26/28] drm/amd/display: make flip_timestamp_in_us a 64-bit variable Sasha Levin
@ 2024-01-22 15:14 ` Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 28/28] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' Sasha Levin
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-01-22 15:14 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Felix Kuehling, Xinhui.Pan, amd-gfx, dri-devel,
daniel, Alex Deucher, airlied, Christian König
From: Felix Kuehling <Felix.Kuehling@amd.com>
[ Upstream commit ec9ba4821fa52b5efdbc4cdf0a77497990655231 ]
Change the rules for amdgpu_sync_resv to let KFD synchronize with VM
fences on page table reservations. This fixes intermittent memory
corruption after evictions when using amdgpu_vm_handle_moved to update
page tables for VM mappings managed through render nodes.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
index 8ea6c49529e7..6a22bc41c205 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
@@ -241,7 +241,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
/* Never sync to VM updates either. */
if (fence_owner == AMDGPU_FENCE_OWNER_VM &&
- owner != AMDGPU_FENCE_OWNER_UNDEFINED)
+ owner != AMDGPU_FENCE_OWNER_UNDEFINED &&
+ owner != AMDGPU_FENCE_OWNER_KFD)
continue;
/* Ignore fences depending on the sync mode */
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.10 28/28] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'
[not found] <20240122151521.996443-1-sashal@kernel.org>
` (3 preceding siblings ...)
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 27/28] drm/amdgpu: Let KFD sync with VM fences Sasha Levin
@ 2024-01-22 15:14 ` Sasha Levin
4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-01-22 15:14 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Srinivasan Shanmugam, Felix Kuehling, Xinhui.Pan,
amd-gfx, dri-devel, daniel, Alex Deucher, airlied,
Christian König
From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
[ Upstream commit bf2ad4fb8adca89374b54b225d494e0b1956dbea ]
Return value of container_of(...) can't be null, so null check is not
required for 'fence'. Hence drop its NULL check.
Fixes the below:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:93 to_amdgpu_amdkfd_fence() warn: can 'fence' even be NULL?
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
index 3107b9575929..eef7517c9d24 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
@@ -88,7 +88,7 @@ struct amdgpu_amdkfd_fence *to_amdgpu_amdkfd_fence(struct dma_fence *f)
return NULL;
fence = container_of(f, struct amdgpu_amdkfd_fence, base);
- if (fence && f->ops == &amdkfd_fence_ops)
+ if (f->ops == &amdkfd_fence_ops)
return fence;
return NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-22 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240122151521.996443-1-sashal@kernel.org>
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 07/28] drm/amd/display: Fix tiled display misalignment Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 09/28] drm/amd/display: Fix writeback_info never got updated Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 26/28] drm/amd/display: make flip_timestamp_in_us a 64-bit variable Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 27/28] drm/amdgpu: Let KFD sync with VM fences Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 28/28] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' 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).