Skip to contentSkip to conversation

radeon: insert 10ms sleep in dce5_crtc_load_lut

PATCH In review Daniel Vetter 3 participants 4 messages Jan 28, 2020 – Jan 29, 2020

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

PATCH 1/1 radeon: insert 10ms sleep in dce5_crtc_load_lut

Per at least one tester this is enough magic to recover the regression introduced for some people (but not all) in

commit b8e2b0199cc377617dc238f5106352c06dcd3fa2

Author: Peter Rosin <[email protected]>
Date:   Tue Jul 4 12:36:57 2017 +0200

drm/fb-helper: factor out pseudo-palette

which for radeon had the side-effect of refactoring out a seemingly redudant writing of the color palette.

10ms in a fairly slow modeset path feels like an acceptable form of duct-tape, so maybe worth a shot and see what sticks.

Cc: Alex Deucher <[email protected]>
Cc: Michel Dänzer <[email protected]>
References: https://bugzilla.kernel.org/show_bug.cgi?id=198123

---
 drivers/gpu/drm/radeon/radeon_display.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/radeon/radeon_display.c +2 -0
index 354756e00fe1..d07c7db0c815 100644
@@ -127,6 +127,8 @@ static void dce5_crtc_load_lut(struct drm_crtc *crtc)
 
 	DRM_DEBUG_KMS("%d\n", radeon_crtc->crtc_id);
 
+	msleep(10);
+
 	WREG32(NI_INPUT_CSC_CONTROL + radeon_crtc->crtc_offset,
 	       (NI_INPUT_CSC_GRPH_MODE(NI_INPUT_CSC_BYPASS) |
 		NI_INPUT_CSC_OVL_MODE(NI_INPUT_CSC_BYPASS)));
Signature · 6 lines
2.24.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 13 lines · Daniel Vetter

Per at least one tester this is enough magic to recover the regression introduced for some people (but not all) in

commit b8e2b0199cc377617dc238f5106352c06dcd3fa2

Author: Peter Rosin <[email protected]>
Date:   Tue Jul 4 12:36:57 2017 +0200

drm/fb-helper: factor out pseudo-palette

which for radeon had the side-effect of refactoring out a seemingly redudant writing of the color palette.

Quoted 7 lines

10ms in a fairly slow modeset path feels like an acceptable form of duct-tape, so maybe worth a shot and see what sticks.

Cc: Alex Deucher <[email protected]>
Cc: Michel Dänzer <[email protected]>
References: https://bugzilla.kernel.org/show_bug.cgi?id=198123

Works for me. Applied. Thanks!

Alex

Quoted 20 lines
---
 drivers/gpu/drm/radeon/radeon_display.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/radeon/radeon_display.c +2 -1
index 354756e00fe1..d07c7db0c815 100644
@@ -127,6 +127,8 @@ static void dce5_crtc_load_lut(struct drm_crtc *crtc)
 
        DRM_DEBUG_KMS("%d\n", radeon_crtc->crtc_id);
 
+       msleep(10);
+
        WREG32(NI_INPUT_CSC_CONTROL + radeon_crtc->crtc_offset,
               (NI_INPUT_CSC_GRPH_MODE(NI_INPUT_CSC_BYPASS) |
                NI_INPUT_CSC_OVL_MODE(NI_INPUT_CSC_BYPASS)));
--

2.24.1

Quoted 4 lines

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

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

#2 lore raw
Quoted 18 lines · Alex Deucher
Quoted 16 lines · Daniel Vetter

Per at least one tester this is enough magic to recover the regression introduced for some people (but not all) in

commit b8e2b0199cc377617dc238f5106352c06dcd3fa2

Author: Peter Rosin <[email protected]>
Date:   Tue Jul 4 12:36:57 2017 +0200

drm/fb-helper: factor out pseudo-palette

which for radeon had the side-effect of refactoring out a seemingly redudant writing of the color palette.

10ms in a fairly slow modeset path feels like an acceptable form of duct-tape, so maybe worth a shot and see what sticks.

Quoted 6 lines
Quoted 4 lines

Cc: Alex Deucher <[email protected]>
Cc: Michel Dänzer <[email protected]>
References: https://bugzilla.kernel.org/show_bug.cgi?id=198123

Works for me. Applied. Thanks!

Actually, thinking about this more, I wonder if this will have adverse affects on stuff that messes with the LUT like various fade effects in compositors. I guess we can cross that bridge when we get to it.

Alex

Quoted 24 lines

Alex

Quoted 20 lines
---
 drivers/gpu/drm/radeon/radeon_display.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/radeon/radeon_display.c +2 -1
index 354756e00fe1..d07c7db0c815 100644
@@ -127,6 +127,8 @@ static void dce5_crtc_load_lut(struct drm_crtc *crtc)
 
        DRM_DEBUG_KMS("%d\n", radeon_crtc->crtc_id);
 
+       msleep(10);
+
        WREG32(NI_INPUT_CSC_CONTROL + radeon_crtc->crtc_offset,
               (NI_INPUT_CSC_GRPH_MODE(NI_INPUT_CSC_BYPASS) |
                NI_INPUT_CSC_OVL_MODE(NI_INPUT_CSC_BYPASS)));
--

2.24.1

Quoted 4 lines
Quoted 4 lines

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

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

#3 lore raw
Quoted 24 lines · Alex Deucher
Quoted 23 lines · Alex Deucher
Quoted 20 lines · Daniel Vetter

Per at least one tester this is enough magic to recover the regression introduced for some people (but not all) in

commit b8e2b0199cc377617dc238f5106352c06dcd3fa2

Author: Peter Rosin <[email protected]>
Date:   Tue Jul 4 12:36:57 2017 +0200

drm/fb-helper: factor out pseudo-palette

which for radeon had the side-effect of refactoring out a seemingly redudant writing of the color palette.

10ms in a fairly slow modeset path feels like an acceptable form of duct-tape, so maybe worth a shot and see what sticks.

Cc: Alex Deucher <[email protected]>
Cc: Michel Dänzer <[email protected]>
References: https://bugzilla.kernel.org/show_bug.cgi?id=198123

Quoted 5 lines
Quoted 1 line

Works for me. Applied. Thanks!

Actually, thinking about this more, I wonder if this will have adverse affects on stuff that messes with the LUT like various fade effects in compositors. I guess we can cross that bridge when we get to it.

With atomic and the new color manager stuff the legacy gamma table things go through a full atomic commit for at least some drivers already. So ratelimited to vblank.

So for the overall ecosystem I think we crossed that bridge already, but yeah good point might be someone with an older stack on radeon being upset.
-Daniel

Quoted 32 lines

Alex

Quoted 28 lines

Alex

Quoted 24 lines
---
 drivers/gpu/drm/radeon/radeon_display.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/radeon/radeon_display.c +2 -1
index 354756e00fe1..d07c7db0c815 100644
@@ -127,6 +127,8 @@ static void dce5_crtc_load_lut(struct drm_crtc *crtc)
 
        DRM_DEBUG_KMS("%d\n", radeon_crtc->crtc_id);
 
+       msleep(10);
+
        WREG32(NI_INPUT_CSC_CONTROL + radeon_crtc->crtc_offset,
               (NI_INPUT_CSC_GRPH_MODE(NI_INPUT_CSC_BYPASS) |
                NI_INPUT_CSC_OVL_MODE(NI_INPUT_CSC_BYPASS)));
--

2.24.1

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

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel