Skip to contentSkip to conversation

vga handover for raven

DISCUSSION Tom St Denis 3 participants 5 messages Mar 14, 2018 4 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,

In the original version of the patch we had:

@@ -358,7 +360,9 @@ struct dce_hwseq_registers {

        HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\
        HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL, 

PHYPLL_PIXEL_RATE_SOURCE, mask_sh), \
HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL,
DCHUBBUB_GLOBAL_TIMER_ENABLE, mask_sh), \
- HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh)

+ HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh),\

+ HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\

+ HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

Which somehow changed into

@@ -404,7 +406,9 @@ struct dce_hwseq_registers {

        HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \
        HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
        HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
-       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh)
+       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh), \
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\ 

+ HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

And the net result is the display doesn't work (same glitches as before) on a raven1 device.

Tom
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 88d196cc-2f72-30e9-7d3c-9e893b3556ca-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 22 lines · Tom St Denis

Hi,

In the original version of the patch we had:

(quoted diff) +3 -1
@@ -358,7 +360,9 @@ struct dce_hwseq_registers {
 
         HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\
         HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL, PHYPLL_PIXEL_RATE_SOURCE, mask_sh), \
         HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBBUB_GLOBAL_TIMER_ENABLE, mask_sh), \
-       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh)
 
+       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

Which somehow changed into

Review struct dce_hwseq_registers { · line 412

Quoted 8 lines
(quoted diff) +3 -1
@@ -404,7 +406,9 @@ struct dce_hwseq_registers {
         HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \
         HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
         HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
-       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh)
+       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh), \
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)
 

This is just defining the VGA_TEST registers for use by DC. It shouldn't have an impact on that patch.

Quoted 2 lines

And the net result is the display doesn't work (same glitches as before) on a raven1 device.

Can you see if reverting this commit fixes it?
1b0ff66bc0bf drm/amd/display: early return if not in vga mode in disable_vga

If introduced a check to see if we're actually in VGA mode and only then applied the workaround. I believe it's to avoid problems resuming from S3.

Harry

Quoted 1 line

Tom

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 0d69d418-e6fe-d6fe-5480-44bfa2e25813-5C7GfCeVMHo@public.gmane.org

#4 lore raw

Hi Harry,

Reverting that on top of the current amd-staging-drm-next seems to have fixed the issue.

Thanks,
Tom

Quoted 37 lines · Harry Wentland
Quoted 22 lines · Tom St Denis

Hi,

In the original version of the patch we had:

(quoted diff) +3 -1
@@ -358,7 +360,9 @@ struct dce_hwseq_registers {
 
         HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\
         HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL, PHYPLL_PIXEL_RATE_SOURCE, mask_sh), \
         HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBBUB_GLOBAL_TIMER_ENABLE, mask_sh), \
-       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh)
 
+       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

Which somehow changed into

Review struct dce_hwseq_registers { · line 412

Quoted 8 lines
(quoted diff) +3 -1
@@ -404,7 +406,9 @@ struct dce_hwseq_registers {
         HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \
         HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
         HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
-       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh)
+       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh), \
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)
 

This is just defining the VGA_TEST registers for use by DC. It shouldn't have an impact on that patch.

Quoted 2 lines

And the net result is the display doesn't work (same glitches as before) on a raven1 device.

Quoted 8 lines

Can you see if reverting this commit fixes it?
1b0ff66bc0bf drm/amd/display: early return if not in vga mode in disable_vga

If introduced a check to see if we're actually in VGA mode and only then applied the workaround. I believe it's to avoid problems resuming from S3.

Harry

Quoted 1 line

Tom

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 60f6563b-317d-1bdb-0911-c48ff0727cba-5C7GfCeVMHo@public.gmane.org

#6 lore raw

If there is no VGA hand over, the change should make no difference. In the VGA hand over case, the difference introduced is the following, we can try to revert this part of the commit, which should not break S3.

        REG_WRITE(D1VGA_CONTROL, 0);
-       REG_WRITE(D2VGA_CONTROL, 0);
-       REG_WRITE(D3VGA_CONTROL, 0);
-       REG_WRITE(D4VGA_CONTROL, 0);

-----Original Message-----
From: StDenis, Tom
Sent: Wednesday, March 14, 2018 10:12 AM
To: Wentland, Harry <[email protected]>; Lakha, Bhawanpreet <[email protected]>
Cc: [email protected]; Cheng, Tony <[email protected]>; Yang, Eric <[email protected]>
Subject: Re: vga handover for raven

Hi Harry,

Reverting that on top of the current amd-staging-drm-next seems to have fixed the issue.

Thanks,
Tom

Quoted 42 lines · Harry Wentland
Quoted 25 lines · Tom St Denis

Hi,

In the original version of the patch we had:

(quoted diff) +3 -1
@@ -358,7 +360,9 @@ struct dce_hwseq_registers {
 
         HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\
         HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL, 
 PHYPLL_PIXEL_RATE_SOURCE, mask_sh), \
         HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL, 
 DCHUBBUB_GLOBAL_TIMER_ENABLE, mask_sh), \
-       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh)
 
+       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

Which somehow changed into

Review struct dce_hwseq_registers { · line 414

Quoted 10 lines
(quoted diff) +4 -1
@@ -404,7 +406,9 @@ struct dce_hwseq_registers {
         HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, 
 mask_sh), \
         HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
         HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
-       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, 
 mask_sh)
+       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, 
+mask_sh), \
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

This is just defining the VGA_TEST registers for use by DC. It shouldn't have an impact on that patch.

Quoted 2 lines

And the net result is the display doesn't work (same glitches as before) on a raven1 device.

Quoted 9 lines

Can you see if reverting this commit fixes it?
1b0ff66bc0bf drm/amd/display: early return if not in vga mode in
disable_vga

If introduced a check to see if we're actually in VGA mode and only then applied the workaround. I believe it's to avoid problems resuming from S3.

Harry

Quoted 1 line

Tom

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): DM5PR1201MB013900ED845EBA9FBB8A0F06CDD10-grEf7a3NxMCNejYrQpXuzmrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]

#8 lore raw

This diff on top of drm-next works fine

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +3 -0
index 4365906b14ee..7688ed5724b9 100644
@@ -228,6 +228,9 @@ static void disable_vga(
                return;
 
        REG_WRITE(D1VGA_CONTROL, 0);
+       REG_WRITE(D2VGA_CONTROL, 0);
+       REG_WRITE(D3VGA_CONTROL, 0);
+       REG_WRITE(D4VGA_CONTROL, 0);
 
        /* HW Engineer's Notes:
         *  During switch from vga->extended, if we set the 

VGA_TEST_ENABLE and

I can't test suspend/resume right now since I don't have the gfxoff branch handy.

Tom

Quoted 14 lines · Eric

If there is no VGA hand over, the change should make no difference. In the VGA hand over case, the difference introduced is the following, we can try to revert this part of the commit, which should not break S3.

         REG_WRITE(D1VGA_CONTROL, 0);
(quoted diff) +0 -4
-       REG_WRITE(D2VGA_CONTROL, 0);
-       REG_WRITE(D3VGA_CONTROL, 0);
-       REG_WRITE(D4VGA_CONTROL, 0);
 
-----Original Message-----

From: StDenis, Tom
Sent: Wednesday, March 14, 2018 10:12 AM
To: Wentland, Harry <[email protected]>; Lakha, Bhawanpreet <[email protected]>
Cc: [email protected]; Cheng, Tony <[email protected]>; Yang, Eric <[email protected]>
Subject: Re: vga handover for raven

Quoted 59 lines

Hi Harry,

Reverting that on top of the current amd-staging-drm-next seems to have fixed the issue.

Thanks,
Tom

Quoted 51 lines · Harry Wentland
Quoted 25 lines · Tom St Denis

Hi,

In the original version of the patch we had:

(quoted diff) +3 -1
@@ -358,7 +360,9 @@ struct dce_hwseq_registers {
 
          HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\
          HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL,
 PHYPLL_PIXEL_RATE_SOURCE, mask_sh), \
          HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL,
 DCHUBBUB_GLOBAL_TIMER_ENABLE, mask_sh), \
-       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh)
 
+       HWS_SF(, DCFCLK_CNTL, DCFCLK_GATE_DIS, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
 
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

Which somehow changed into

Review struct dce_hwseq_registers { · line 414

Quoted 10 lines
(quoted diff) +4 -1
@@ -404,7 +406,9 @@ struct dce_hwseq_registers {
          HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS,
 mask_sh), \
          HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
          HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
-       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R,
 mask_sh)
+       HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R,
+mask_sh), \
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
+       HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)

This is just defining the VGA_TEST registers for use by DC. It shouldn't have an impact on that patch.

Quoted 2 lines

And the net result is the display doesn't work (same glitches as before) on a raven1 device.

Can you see if reverting this commit fixes it?
1b0ff66bc0bf drm/amd/display: early return if not in vga mode in
disable_vga

If introduced a check to see if we're actually in VGA mode and only then applied the workaround. I believe it's to avoid problems resuming from S3.

Harry

Quoted 1 line

Tom

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx