summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
diff options
context:
space:
mode:
authorJoshua Aberback <joshua.aberback@amd.com>2024-03-07 05:20:03 -0500
committerAlex Deucher <alexander.deucher@amd.com>2024-04-09 22:04:51 -0400
commite779f4587f6178583930caa87897b1be780d5ac7 (patch)
treeb9933ae5fcdddf0acc228ccdfa8085ae3f7c2a64 /drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
parentcc263c3a0c9f38ea245393daa07eaa8e21ee17ae (diff)
downloadlinux-stable-e779f4587f6178583930caa87897b1be780d5ac7.tar.gz
linux-stable-e779f4587f6178583930caa87897b1be780d5ac7.tar.bz2
linux-stable-e779f4587f6178583930caa87897b1be780d5ac7.zip
drm/amd/display: Add handling for DC power mode
[Why] Future implementations will require a distinction between AC power and DC power (wall power and battery power, respectively). To accomplish this, adding a power mode parameter to certain dc interfaces, and adding a separate DML2 instance for DC mode validation. Default behaviour unchanged. Reviewed-by: Jun Lei <jun.lei@amd.com> Reviewed-by: Aric Cyr <aric.cyr@amd.com> Acked-by: Roman Li <roman.li@amd.com> Signed-off-by: Joshua Aberback <joshua.aberback@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
index e0544484e8c0..25ac450944e7 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
@@ -1734,7 +1734,9 @@ static bool dcn35_validate_bandwidth(struct dc *dc,
{
bool out = false;
- out = dml2_validate(dc, context, context->bw_ctx.dml2, fast_validate);
+ out = dml2_validate(dc, context,
+ context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2,
+ fast_validate);
if (fast_validate)
return out;