mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: Add debugfs interface for ODM combine info
[Why] For use with IGT tests in userspace, the number of ODM segments in use is required to be exposed to userspace to verify that ODM Combine is working as expected when special timings are committed. [How] Add a connector specific debugfs entry that prints the number of ODM segments in use. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
d755ce6465
commit
07926ba8a4
@@ -98,6 +98,30 @@ static void optc32_set_odm_combine(struct timing_generator *optc, int *opp_id, i
|
||||
optc1->opp_count = opp_cnt;
|
||||
}
|
||||
|
||||
void optc32_get_odm_combine_segments(struct timing_generator *tg, int *odm_combine_segments)
|
||||
{
|
||||
struct optc *optc1 = DCN10TG_FROM_TG(tg);
|
||||
int segments;
|
||||
|
||||
REG_GET(OPTC_DATA_SOURCE_SELECT, OPTC_NUM_OF_INPUT_SEGMENT, &segments);
|
||||
|
||||
switch (segments) {
|
||||
case 0:
|
||||
*odm_combine_segments = 1;
|
||||
break;
|
||||
case 1:
|
||||
*odm_combine_segments = 2;
|
||||
break;
|
||||
case 3:
|
||||
*odm_combine_segments = 4;
|
||||
break;
|
||||
/* 2 is reserved */
|
||||
case 2:
|
||||
default:
|
||||
*odm_combine_segments = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void optc32_set_h_timing_div_manual_mode(struct timing_generator *optc, bool manual_mode)
|
||||
{
|
||||
struct optc *optc1 = DCN10TG_FROM_TG(optc);
|
||||
@@ -303,6 +327,7 @@ static struct timing_generator_funcs dcn32_tg_funcs = {
|
||||
.set_dwb_source = NULL,
|
||||
.set_odm_bypass = optc32_set_odm_bypass,
|
||||
.set_odm_combine = optc32_set_odm_combine,
|
||||
.get_odm_combine_segments = optc32_get_odm_combine_segments,
|
||||
.set_h_timing_div_manual_mode = optc32_set_h_timing_div_manual_mode,
|
||||
.get_optc_source = optc2_get_optc_source,
|
||||
.set_out_mux = optc3_set_out_mux,
|
||||
|
||||
Reference in New Issue
Block a user