Skip to content

Commit 670da29

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
drm/amd/display: add interface to query SubVP status
[Why&How] To enable automated testing through IGT, expose an API that is accessible through debugfs to query current status of SubVP feature. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Acked-by: Roman Li <roman.li@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b231933 commit 670da29

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3645,14 +3645,18 @@ static int capabilities_show(struct seq_file *m, void *unused)
36453645
struct amdgpu_device *adev = (struct amdgpu_device *)m->private;
36463646
struct dc *dc = adev->dm.dc;
36473647
bool mall_supported = dc->caps.mall_size_total;
3648+
bool subvp_supported = dc->caps.subvp_fw_processing_delay_us;
36483649
unsigned int mall_in_use = false;
3650+
unsigned int subvp_in_use = dc->cap_funcs.get_subvp_en(dc, dc->current_state);
36493651
struct hubbub *hubbub = dc->res_pool->hubbub;
36503652

36513653
if (hubbub->funcs->get_mall_en)
36523654
hubbub->funcs->get_mall_en(hubbub, &mall_in_use);
36533655

36543656
seq_printf(m, "mall supported: %s, enabled: %s\n",
36553657
mall_supported ? "yes" : "no", mall_in_use ? "yes" : "no");
3658+
seq_printf(m, "sub-viewport supported: %s, enabled: %s\n",
3659+
subvp_supported ? "yes" : "no", subvp_in_use ? "yes" : "no");
36563660

36573661
return 0;
36583662
}

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ struct dc_cap_funcs {
382382
bool (*get_dcc_compression_cap)(const struct dc *dc,
383383
const struct dc_dcc_surface_param *input,
384384
struct dc_surface_dcc_cap *output);
385+
bool (*get_subvp_en)(struct dc *dc, struct dc_state *context);
385386
};
386387

387388
struct link_training_settings;

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,8 @@ int dcn32_populate_dml_pipes_from_context(
19931993
}
19941994

19951995
static struct dc_cap_funcs cap_funcs = {
1996-
.get_dcc_compression_cap = dcn20_get_dcc_compression_cap
1996+
.get_dcc_compression_cap = dcn20_get_dcc_compression_cap,
1997+
.get_subvp_en = dcn32_subvp_in_use,
19971998
};
19981999

19992000
void dcn32_calculate_wm_and_dlg(struct dc *dc, struct dc_state *context,

drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,8 @@ static void dcn321_destroy_resource_pool(struct resource_pool **pool)
15711571
}
15721572

15731573
static struct dc_cap_funcs cap_funcs = {
1574-
.get_dcc_compression_cap = dcn20_get_dcc_compression_cap
1574+
.get_dcc_compression_cap = dcn20_get_dcc_compression_cap,
1575+
.get_subvp_en = dcn32_subvp_in_use,
15751576
};
15761577

15771578
static void dcn321_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)

0 commit comments

Comments
 (0)