All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 212293] [amdgpu] divide error: 0000 on resume from S3
Date: Tue, 16 Mar 2021 19:54:22 +0000	[thread overview]
Message-ID: <bug-212293-2300-PVdAilT90S@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-212293-2300@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=212293

--- Comment #6 from Sefa Eyeoglu (contact@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.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2021-03-16 19:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 16:49 [Bug 212293] New: [amdgpu] divide error: 0000 on resume from S3 bugzilla-daemon
2021-03-15 16:57 ` [Bug 212293] " bugzilla-daemon
2021-03-15 17:35 ` bugzilla-daemon
2021-03-16 18:18 ` bugzilla-daemon
2021-03-16 18:18 ` bugzilla-daemon
2021-03-16 18:19 ` bugzilla-daemon
2021-03-16 19:54 ` bugzilla-daemon [this message]
2021-03-17  8:19 ` bugzilla-daemon
2021-05-29 15:07 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-212293-2300-PVdAilT90S@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.