drm/amd/display: correct idle_power_optimizations disablement return value
PATCH 1/1 drm/amd/display: correct idle_power_optimizations disablement return value
[Why]
The return value indicates whether the operation(disable/enable) succeeded or not. The existing logic reports wrong result even if the disablement was performed successfully. That will make succeeding reenablement abandoned as dc->idle_optimizations_allowed is always true.
[How]
Correct the return value to reflect the real result of disablement.
--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +1 -1
@@ -373,7 +373,7 @@ bool dcn32_apply_idle_power_optimizations(struct dc *dc, bool enable)dc_dmub_srv_cmd_execute (dc->ctx->dmub_srv);dc_dmub_srv_wait_idle (dc->ctx->dmub_srv); -return false; +return true; }/* Send DMCUB message with SubVP pipe info
Signature · 1 line
2.29.0
Quoted 11 lines · Evan Quan
[Why]
The return value indicates whether the operation(disable/enable) succeeded or not. The existing logic reports wrong result even if the disablement was performed successfully. That will make succeeding reenablement abandoned asdc->idle_optimizations_allowedis always true.[How]
Correct the return value to reflect the real result of disablement.Fixes e40fcd4a ("drm/amd/display: add DCN32/321 specific files for Display Core")
Need 12 places for the git hash:
for Display Core")
Quoted 1 line
Cc <[email protected]>
This doesn't need to go to stable. These changes are queued up for 5.20.
Patch is:
Quoted 22 lines
Signed-off-by Evan Quan <[email protected]>Change-Id If87d4cf76f6cfb36d607f051ff32f9c7870b4d6d--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +1
-2@@ -373,7 +373,7 @@ bool dcn32_apply_idle_power_optimizations(struct dc *dc, bool enable)dc_dmub_srv_cmd_execute (dc->ctx->dmub_srv);dc_dmub_srv_wait_idle (dc->ctx->dmub_srv); -return false; +return true; }/* Send DMCUB message with SubVP pipe info -- 2.29.0
[AMD Official Use Only - General]
Quoted 25 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, July 7, 2022 11:01 AM
To: Quan, Evan <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>; Pillai, Aurabindo <[email protected]>; for 3.8 <[email protected]>
Subject: Re: [PATCH] drm/amd/display: correctidle_power_optimizationsdisablement return valueQuoted 6 lines · Evan Quan
[Why]
The return value indicates whether the operation(disable/enable) succeeded or not. The existing logic reports wrong result even if the disablement was performed successfully. That will make succeeding reenablement abandoned asdc->idle_optimizations_allowedis alwaystrue.
Quoted 6 lines
[How]
Correct the return value to reflect the real result of disablement.Fixes e40fcd4a ("drm/amd/display: add DCN32/321 specific files forDisplay Core")
Quoted 7 lines
Need 12 places for the git hash:
Fixes 235c67634230 ("drm/amd/display: add DCN32/321 specific files forDisplay Core")
Quoted 1 line
Cc <[email protected]>This doesn't need to go to stable. These changes are queued up for 5.20.
Thanks. Fixed in V2.
Evan
Quoted 28 lines
Patch is:
Acked-by Alex Deucher <[email protected]>drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c bool dcn32_apply_idle_power_optimizations(struct
Quoted 12 lines
Signed-off-by Evan Quan <[email protected]>Change-Id If87d4cf76f6cfb36d607f051ff32f9c7870b4d6d--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +0
-0@@ -373,7 +373,7 @@ bool dcn32_apply_idle_power_optimizations(structdc *dc, bool enable)
Quoted 11 lines
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +1
-2dc_dmub_srv_cmd_execute (dc->ctx->dmub_srv);dc_dmub_srv_wait_idle (dc->ctx->dmub_srv); -return false; +return true; }/* Send DMCUB message with SubVP pipe info -- 2.29.0