]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: prepare dml 2.1 for new asic
authorDmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Wed, 11 Jun 2025 20:51:21 +0000 (16:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Sep 2025 20:57:15 +0000 (16:57 -0400)
[Why&How]
prepare dml 2.1 for new asic

Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_state.c
drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_types.h
drivers/gpu/drm/amd/display/dc/inc/resource.h

index 883054bb18e76c0e42cd746f0bded7261a80dce3..c61300a7cb1c9901e144859e5131b46dc7e691ee 100644 (file)
@@ -211,7 +211,7 @@ struct dc_state *dc_state_create(struct dc *dc, struct dc_state_create_params *p
                        return NULL;
                }
 
-               if (!dml2_create(dc, &dc->dml2_dc_power_options, &state->bw_ctx.dml2_dc_power_source)) {
+               if (dc->caps.dcmode_power_limits_present && !dml2_create(dc, &dc->dml2_dc_power_options, &state->bw_ctx.dml2_dc_power_source)) {
                        dc_state_release(state);
                        return NULL;
                }
index 7de10a95cfdb1d3a868748745cc384cc771f91c7..41adb1104d0fd41a3c08531975c4a7548e1bbd73 100644 (file)
@@ -16,9 +16,9 @@ struct dml2_instance;
 
 enum dml2_project_id {
        dml2_project_invalid = 0,
-       dml2_project_dcn4x_stage1 = 1,
-       dml2_project_dcn4x_stage2 = 2,
-       dml2_project_dcn4x_stage2_auto_drr_svp = 3,
+       dml2_project_dcn4x_stage1,
+       dml2_project_dcn4x_stage2,
+       dml2_project_dcn4x_stage2_auto_drr_svp,
 };
 
 enum dml2_pstate_change_support {
index a890f581f4e897ddc94ad56a537d3ac6d4269a2e..4e26a16a8743f994447718f32722db8f39db3619 100644 (file)
@@ -45,6 +45,7 @@ enum dce_version resource_parse_asic_id(
 struct resource_caps {
        int num_timing_generator;
        int num_opp;
+       int num_dpp;
        int num_video_plane;
        int num_audio;
        int num_stream_encoder;