[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 via email to