Patrice,

On Sunday, 28 January 2024 11:44:59 CET Linux regression tracking (Thorsten 
Leemhuis) wrote:
> On 27.01.24 14:14, Salvatore Bonaccorso wrote:
> > In Debian (https://bugs.debian.org/1061449) we got the following
> > quotred report:
> > 
> > On Wed, Jan 24, 2024 at 07:38:16PM +0100, Patrice Duroux wrote:
> >> Giving a try to 6.7, here is a message extracted from dmesg:
> >> [    4.177226] ------------[ cut here ]------------
> >> [    4.177227] WARNING: CPU: 6 PID: 248 at
> >> drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:387
> >> construct_phy+0xb26/0xd60 [amdgpu]
> > 
> > [...]
> 
> Not my area of expertise, but looks a lot like a duplicate of
> https://gitlab.freedesktop.org/drm/amd/-/issues/3122#note_2252835
> 
> Mario (now CCed) already prepared a patch for that issue that seems to work.

If you can build and test a kernel with the `test-patches` script like before 
with the attached patch, but *without* the previous patch (which just reverted 
commit b17ef04bf3a4346d66404454d6a646343ddc9749), that would be really useful.

When you've done that, do a Reply-All to Thorsten Leemhuis' message so that 
everyone sees the results. Optionally also reply to the gitlab issue Thorsten 
mentioned.

(It didn't seem useful to send these instructions to all the people/lists)
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_factory.c b/drivers/gpu/drm/amd/display/dc/link/link_factory.c
index 37d3027c32dc..cf45d33ce2b7 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_factory.c
@@ -377,17 +377,21 @@ static uint8_t translate_dig_inst_to_pwrseq_inst(struct dc_link *link)

        DC_LOGGER_INIT(dc_ctx->logger);

-       switch (link->eng_id) {
-       case ENGINE_ID_DIGA:
+       if (dc_ctx->dce_version >= DCN_VERSION_3_0) {
+               switch (link->eng_id) {
+               case ENGINE_ID_DIGA:
+                       pwrseq_inst = 0;
+                       break;
+               case ENGINE_ID_DIGB:
+                       pwrseq_inst = 1;
+                       break;
+               default:
+                       DC_LOG_WARNING("Unsupported pwrseq engine id: %d!\n", link->eng_id);
+                       ASSERT(false);
+                       break;
+               }
+       } else {
                pwrseq_inst = 0;
-               break;
-       case ENGINE_ID_DIGB:
-               pwrseq_inst = 1;
-               break;
-       default:
-               DC_LOG_WARNING("Unsupported pwrseq engine id: %d!\n", link->eng_id);
-               ASSERT(false);
-               break;
        }

        return pwrseq_inst;

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to