drm/radeon/atom: powergating fixes for DCE6
Subsystems (2)
PATCH 1/1 drm/radeon/atom: powergating fixes for DCE6
From: Alex Deucher <[email protected]>
Power gating is per crtc pair, but the powergating registers should be called individually. The hw handles power up/down properly. The pair is powered up if either crtc in the pair is powered up and the pair is not powered down until both crtcs in the pair are powered down. This simplifies programming and should save power additional power.
--- drivers/gpu/drm/radeon/atombios_crtc.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +2 -20
@@ -258,7 +258,6 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode) radeon_crtc->enabled = true;/* adjust pm to dpms changes BEFORE enabling crtcs */ radeon_pm_compute_clocks (rdev); -/* disable crtc pair power gating before programming */ if (ASIC_IS_DCE6 (rdev) && !radeon_crtc->in_mode_set)atombios_powergate_crtc (crtc,ATOM_DISABLE );atombios_enable_crtc (crtc,ATOM_ENABLE );
@@ -278,25 +277,8 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)atombios_enable_crtc_memreq (crtc,ATOM_DISABLE );atombios_enable_crtc (crtc,ATOM_DISABLE ); radeon_crtc->enabled = false; -/* power gating is per-pair */ -if (ASIC_IS_DCE6 (rdev) && !radeon_crtc->in_mode_set) { -struct drm_crtc *other_crtc; -struct radeon_crtc *other_radeon_crtc; -list_for_each_entry (other_crtc, &rdev->ddev->mode_config.crtc_list, head) { - other_radeon_crtc =to_radeon_crtc (other_crtc); -if (((radeon_crtc->crtc_id ==0 ) && (other_radeon_crtc->crtc_id ==1 )) || - ((radeon_crtc->crtc_id ==1 ) && (other_radeon_crtc->crtc_id ==0 )) || - ((radeon_crtc->crtc_id ==2 ) && (other_radeon_crtc->crtc_id ==3 )) || - ((radeon_crtc->crtc_id ==3 ) && (other_radeon_crtc->crtc_id ==2 )) || - ((radeon_crtc->crtc_id ==4 ) && (other_radeon_crtc->crtc_id ==5 )) || - ((radeon_crtc->crtc_id ==5 ) && (other_radeon_crtc->crtc_id ==4 ))) { -/* if both crtcs in the pair are off, enable power gating */ -if (other_radeon_crtc->enabled == false) -atombios_powergate_crtc (crtc,ATOM_ENABLE ); -break ; - } - } - } +if (ASIC_IS_DCE6 (rdev) && !radeon_crtc->in_mode_set) +atombios_powergate_crtc (crtc,ATOM_ENABLE );/* adjust pm to dpms changes AFTER disabling crtcs */ radeon_pm_compute_clocks (rdev);break ;
Signature · 1 line
1.7.7.5
Quoted 8 lines · On Mon, 2012-08-27 at 16:25 -0400, [email protected] wrote:
From: Alex Deucher <[email protected]>
Power gating is per crtc pair, but the powergating registers should be called individually. The hw handles power up/down properly. The pair is powered up if either crtc in the pair is powered up and the pair is not powered down until both crtcs in the pair are powered down. This simplifies programming and should save power additional power.
Extraneous 'power' in the last sentence.
Quoted 1 line
Signed-off-by Alex Deucher <[email protected]>
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer
Quoted 12 lines · Michel Dänzer
Quoted 8 lines · On Mon, 2012-08-27 at 16:25 -0400, [email protected] wrote:
From: Alex Deucher <[email protected]>
Power gating is per crtc pair, but the powergating registers should be called individually. The hw handles power up/down properly. The pair is powered up if either crtc in the pair is powered up and the pair is not powered down until both crtcs in the pair are powered down. This simplifies programming and should save power additional power.
Extraneous 'power' in the last sentence.
I'll fix that. thanks!
Quoted 8 lines
Quoted 1 line
Signed-off-by Alex Deucher <[email protected]>Reviewed-by Michel Dänzer <[email protected]>--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
Dear Alex,
Am Montag, den 27.08.2012, 16:25 -0400 schrieb [email protected]:
Quoted 8 lines
From: Alex Deucher <[email protected]>
Power gating is per crtc pair, but the powergating registers should be called individually. The hw handles power up/down properly. The pair is powered up if either crtc in the pair is powered up and the pair is not powered down until both crtcs in the pair are powered down. This simplifies programming and should save power additional power.
it would be nice, if you could provide some numbers if the last statement is true.
Quoted 6 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/atombios_crtc.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-)
[…]
Thanks,
Paul
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 13 lines · Paul Menzel
Dear Alex,
Am Montag, den 27.08.2012, 16:25 -0400 schrieb [email protected]:
Quoted 8 lines
From: Alex Deucher <[email protected]>
Power gating is per crtc pair, but the powergating registers should be called individually. The hw handles power up/down properly. The pair is powered up if either crtc in the pair is powered up and the pair is not powered down until both crtcs in the pair are powered down. This simplifies programming and should save power additional power.
Quoted 2 lines
it would be nice, if you could provide some numbers if the last statement is true.
I haven't checked to see how much it saves but the way the previous code worked the pair never actually got power gated.
Alex
Quoted 16 lines
Quoted 7 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/atombios_crtc.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-)[…]
Acked-by Paul Menzel <[email protected]>Thanks,
Paul