File tree Expand file tree Collapse file tree
drivers/gpu/drm/amd/display Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1797,7 +1797,30 @@ static enum bp_result select_crtc_source_v3(
17971797 & params .ucEncodeMode ))
17981798 return BP_RESULT_BADINPUT ;
17991799
1800- params .ucDstBpc = bp_params -> bit_depth ;
1800+ switch (bp_params -> color_depth ) {
1801+ case COLOR_DEPTH_UNDEFINED :
1802+ params .ucDstBpc = PANEL_BPC_UNDEFINE ;
1803+ break ;
1804+ case COLOR_DEPTH_666 :
1805+ params .ucDstBpc = PANEL_6BIT_PER_COLOR ;
1806+ break ;
1807+ default :
1808+ case COLOR_DEPTH_888 :
1809+ params .ucDstBpc = PANEL_8BIT_PER_COLOR ;
1810+ break ;
1811+ case COLOR_DEPTH_101010 :
1812+ params .ucDstBpc = PANEL_10BIT_PER_COLOR ;
1813+ break ;
1814+ case COLOR_DEPTH_121212 :
1815+ params .ucDstBpc = PANEL_12BIT_PER_COLOR ;
1816+ break ;
1817+ case COLOR_DEPTH_141414 :
1818+ dm_error ("14-bit color not supported by SelectCRTC_Source v3\n" );
1819+ break ;
1820+ case COLOR_DEPTH_161616 :
1821+ params .ucDstBpc = PANEL_16BIT_PER_COLOR ;
1822+ break ;
1823+ }
18011824
18021825 if (EXEC_BIOS_CMD_TABLE (SelectCRTC_Source , params ))
18031826 result = BP_RESULT_OK ;
Original file line number Diff line number Diff line change @@ -1610,38 +1610,12 @@ dce110_select_crtc_source(struct pipe_ctx *pipe_ctx)
16101610 struct dc_bios * bios = link -> ctx -> dc_bios ;
16111611 struct bp_crtc_source_select crtc_source_select = {0 };
16121612 enum engine_id engine_id = link -> link_enc -> preferred_engine ;
1613- uint8_t bit_depth ;
16141613
16151614 if (dc_is_rgb_signal (pipe_ctx -> stream -> signal ))
16161615 engine_id = link -> link_enc -> analog_engine ;
16171616
1618- switch (pipe_ctx -> stream -> timing .display_color_depth ) {
1619- case COLOR_DEPTH_UNDEFINED :
1620- bit_depth = 0 ;
1621- break ;
1622- case COLOR_DEPTH_666 :
1623- bit_depth = 6 ;
1624- break ;
1625- default :
1626- case COLOR_DEPTH_888 :
1627- bit_depth = 8 ;
1628- break ;
1629- case COLOR_DEPTH_101010 :
1630- bit_depth = 10 ;
1631- break ;
1632- case COLOR_DEPTH_121212 :
1633- bit_depth = 12 ;
1634- break ;
1635- case COLOR_DEPTH_141414 :
1636- bit_depth = 14 ;
1637- break ;
1638- case COLOR_DEPTH_161616 :
1639- bit_depth = 16 ;
1640- break ;
1641- }
1642-
16431617 crtc_source_select .controller_id = CONTROLLER_ID_D0 + pipe_ctx -> stream_res .tg -> inst ;
1644- crtc_source_select .bit_depth = bit_depth ;
1618+ crtc_source_select .color_depth = pipe_ctx -> stream -> timing . display_color_depth ;
16451619 crtc_source_select .engine_id = engine_id ;
16461620 crtc_source_select .sink_signal = pipe_ctx -> stream -> signal ;
16471621
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ struct bp_crtc_source_select {
136136 enum engine_id engine_id ;
137137 enum controller_id controller_id ;
138138 enum signal_type sink_signal ;
139- uint8_t bit_depth ;
139+ enum dc_color_depth color_depth ;
140140};
141141
142142struct bp_transmitter_control {
You can’t perform that action at this time.
0 commit comments