All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Limonciello, Mario" <Mario.Limonciello@amd.com>
To: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Zhuo, Qingqing \(Lillian\)" <Qingqing.Zhuo@amd.com>,
	Scott Bruce <smbruce@gmail.com>,
	"spasswolf@web.de" <spasswolf@web.de>,
	Chris Hixon <linux-kernel-bugs@hixontech.com>
Subject: RE: [PATCH v5] drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21
Date: Fri, 7 Jan 2022 18:51:40 +0000	[thread overview]
Message-ID: <BL1PR12MB5157D5DC6BE941A1C1294DFDE24D9@BL1PR12MB5157.namprd12.prod.outlook.com> (raw)
In-Reply-To: <DM4PR12MB51821C74C0F9C8254A8CE048EC4D9@DM4PR12MB5182.namprd12.prod.outlook.com>

[AMD Official Use Only]


> I think the revert is fine once we figure out where we're missing calls to:
> 
>         .optimize_pwr_state = dcn21_optimize_pwr_state,
>         .exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state,
> 
> These are already part of dc_link_detect, so I suspect there's another interface
> in DC that should be using these.
> 
> I think the best way to debug this is to revert the patch locally and add a stack
> dump when DMCUB hangs our times out.

OK so I did this on top of amd-staging-drm-next with my v5 patch (this revert in place)

diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
index 9280f2abd973..0bd32f82f3db 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
@@ -789,8 +789,10 @@ enum dmub_status dmub_srv_cmd_with_reply_data(struct dmub_srv *dmub,
        // Execute command
        status = dmub_srv_cmd_execute(dmub);

-       if (status != DMUB_STATUS_OK)
+       if (status != DMUB_STATUS_OK) {
+               ASSERT(0);
                return status;
+       }

        // Wait for DMUB to process command
        status = dmub_srv_wait_for_idle(dmub, 100000);

> 
> That way you can know where the PHY was trying to be accessed without the
> refclk being on.
> 
> We had a similar issue in DCN31 which didn't require a W/A like DCN21.
> 
> I'd like to hold off on merging this until that hang is verified as gone.
> 

Then I took a RN laptop running DMUB 0x01010019 and disabled eDP, and confirmed
no CRTC was configured but plugged in an HDMI cable:

connector[78]: eDP-1
        crtc=(null)
        self_refresh_aware=0
connector[85]: HDMI-A-1
        crtc=crtc-1
        self_refresh_aware=0

I triggered 100 hotplugs like this:

#!/bin/bash
for i in {0..100..1}
do
    echo 1 | tee /sys/kernel/debug/dri/0/HDMI-A-1/trigger_hotplug
    sleep 3
done

Unfortunately, no hang or traceback to be seen (and HDMI continues to work).
I also manually pulled the plug a handful of times I don't know the specifics that Lillian had the
failure though, so this might not be a good enough check.

I'll try to upgrade DMUB to 0x101001c (the latest version) and double check that as well.

  reply	other threads:[~2022-01-07 18:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 16:49 [PATCH v5] drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21 Mario Limonciello
2022-01-07 16:55 ` Kazlauskas, Nicholas
2022-01-07 18:51   ` Limonciello, Mario [this message]
2022-01-14 12:24     ` Chris Hixon
2022-01-14 15:38       ` Limonciello, Mario
2022-01-14 16:48         ` Kazlauskas, Nicholas
2022-01-14 18:47           ` Limonciello, Mario
2022-01-14 20:30             ` Alex Deucher
2022-01-12  1:11 Bert Karwatzki
2022-01-12  2:08 ` Limonciello, Mario
2022-01-13  9:16   ` Bert Karwatzki
2022-01-13 14:55     ` Limonciello, Mario
2022-01-15  1:10   ` Bert Karwatzki

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=BL1PR12MB5157D5DC6BE941A1C1294DFDE24D9@BL1PR12MB5157.namprd12.prod.outlook.com \
    --to=mario.limonciello@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Qingqing.Zhuo@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=linux-kernel-bugs@hixontech.com \
    --cc=smbruce@gmail.com \
    --cc=spasswolf@web.de \
    /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.