From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 101387] amdgpu display corruption and hang on AMD A10-9620P
Date: Wed, 14 Jun 2017 11:59:41 +0000	[thread overview]
Message-ID: <bug-101387-502-4jBOhJy9IV@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-101387-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 2162 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=101387
--- Comment #8 from Carlo Caione <carlo@caione.org> ---
Just a better description of what's going on and a couple of questions.
When amdgpu_atombios_crtc_powergate_init() is called this triggers the parsing
of the command table with index == 13 (>> execute C5C0 (len 589, WS 0, PS 0)).
As already reported the parameter space used (struct
ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1) is 32 bytes wide.
During the execution of this table several CALL_TABLE (op == 82) are executed. 
In particular we first just to table with index == 78 (>> execute F166 (len
588, WS 0, PS 8)), then to table with index == 51 (>> execute F446 (len 465, WS
4, PS 4)) and finally to table with index == 75 (>> execute F6CC (len 1330, WS
4, PS 0)) before finally reaching the EOT for table 13.
During the execution of table 75 a MOVE_PS is executed with a destination index
== 1, accessing ctx->ps[idx] and causing the stack corruption.
So either the atombios code is wrong or the atombios interpreter in the kernel
is doing something wrong.
I also have a couple of questions / observations:
1) Table 75 has WS == 4 and PS == 0 and looking at the opcodes in the table I
basically have only *_WS opcodes (MOVE_WS, TEST_WS, ADD_WS, etc...) and just
two *_PS instructions (MOVE_PS and OR_PS) that (guess what) are the
instructions causing the stack corruption. My guess here is that the opcodes
*_PS in the atombios are wrong and they should actually be *_WS opcodes.
2) Don't we need to allocate the size of the ps allocation struct for the
command table we are going to execute after a CALL_TABLE matching the ps size
in the table header? IIUC the code in the kernel, when we are jumping to a
different table ctx->ps is not being reallocated.
3) Could the point at (2) also be a problem in our case? Assuming that ps read
from the table header has something to do with the size of the parameter space
(guessing here) Table 13 has PS == 0, while table 75 has PS == 4 whereas both
are using the same ctx->ps.
-- 
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2979 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply	other threads:[~2017-06-14 11:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 10:21 [Bug 101387] amdgpu display corruption and hang on AMD A10-9620P bugzilla-daemon
2017-06-12 11:13 ` bugzilla-daemon
2017-06-13  2:27 ` bugzilla-daemon
2017-06-13  2:27 ` bugzilla-daemon
2017-06-13  2:33 ` bugzilla-daemon
2017-06-13  7:49 ` bugzilla-daemon
2017-06-13  8:44 ` bugzilla-daemon
2017-06-13  8:49 ` bugzilla-daemon
2017-06-13 11:35 ` bugzilla-daemon
2017-06-13 13:13 ` bugzilla-daemon
2017-06-14 11:59 ` bugzilla-daemon [this message]
2017-06-15 14:44 ` bugzilla-daemon
2017-06-15 15:03 ` bugzilla-daemon
2017-06-15 15:17 ` bugzilla-daemon
2017-06-15 15:32 ` bugzilla-daemon
2017-06-15 15:40 ` bugzilla-daemon
2017-06-15 16:35 ` bugzilla-daemon
2017-06-15 16:59 ` bugzilla-daemon
2017-06-15 18:17 ` bugzilla-daemon
2017-06-15 18:40 ` bugzilla-daemon
2017-06-15 21:51 ` bugzilla-daemon
2017-06-16 14:43 ` bugzilla-daemon
2017-06-20 17:47 ` bugzilla-daemon
2017-06-21  1:08 ` bugzilla-daemon
2017-06-21  6:26 ` bugzilla-daemon
2017-06-21  6:49 ` bugzilla-daemon
2017-06-21  9:26 ` bugzilla-daemon
2017-06-22  8:27 ` bugzilla-daemon
2019-11-19  8:19 ` 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-101387-502-4jBOhJy9IV@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.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 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).