[Bug 212293] [amdgpu] divide error: 0000 on resume from S3
bugzilla-daemon at bugzilla.kernel.org
bugzilla-daemon at bugzilla.kernel.org
Tue Mar 16 19:54:22 UTC 2021
https://bugzilla.kernel.org/show_bug.cgi?id=212293
--- Comment #6 from Sefa Eyeoglu (contact at scrumplex.net) ---
Okay I tried to debug it by printing.
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 573cf17262da..8e6b890ad611 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9271,6 +9271,8 @@ static int dm_check_crtc_cursor(struct drm_atomic_state
*state,
return 0;
}
+ printk("SCRUMPLEX_DEBUG %d %d %d %d", new_cursor_state->src_w,
new_cursor_state->src_h, new_primary_state->src_w, new_primary_state->src_h);
+
cursor_scale_w = new_cursor_state->crtc_w * 1000 /
(new_cursor_state->src_w >> 16);
cursor_scale_h = new_cursor_state->crtc_h * 1000 /
--
2.31.0
This adds my very professional printk, which outputs all values that are used
to divide in any way later.
While reproducing the issue I got the following output
[ 89.850437] SCRUMPLEX_DEBUG 8388608 8388608 0 0
So some weird state is causing the src_w and src_h values of
"new_primary_state" to be 0.
That would explain the issue to me. Now I don't know enough about
drm_plane_state and drm_atomic_get_new_plane_state to say why this is like
this. But as with most of these kinds of issues. A simple condition check
beforehand would solve this issue.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the dri-devel
mailing list