mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
drm/amd/display: Correct color depth for SelectCRTC_Source
Pass the correct enum values as expected by the VBIOS.
Previously the actual bit depth integer value was passed,
which was a mistake.
Fixes: 7fb4f254c8 ("drm/amd/display: Add SelectCRTC_Source to BIOS parser")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
436d0d22aa
commit
cdf6e4c0cd
|
|
@ -1797,7 +1797,30 @@ static enum bp_result select_crtc_source_v3(
|
|||
¶ms.ucEncodeMode))
|
||||
return BP_RESULT_BADINPUT;
|
||||
|
||||
params.ucDstBpc = bp_params->bit_depth;
|
||||
switch (bp_params->color_depth) {
|
||||
case COLOR_DEPTH_UNDEFINED:
|
||||
params.ucDstBpc = PANEL_BPC_UNDEFINE;
|
||||
break;
|
||||
case COLOR_DEPTH_666:
|
||||
params.ucDstBpc = PANEL_6BIT_PER_COLOR;
|
||||
break;
|
||||
default:
|
||||
case COLOR_DEPTH_888:
|
||||
params.ucDstBpc = PANEL_8BIT_PER_COLOR;
|
||||
break;
|
||||
case COLOR_DEPTH_101010:
|
||||
params.ucDstBpc = PANEL_10BIT_PER_COLOR;
|
||||
break;
|
||||
case COLOR_DEPTH_121212:
|
||||
params.ucDstBpc = PANEL_12BIT_PER_COLOR;
|
||||
break;
|
||||
case COLOR_DEPTH_141414:
|
||||
dm_error("14-bit color not supported by SelectCRTC_Source v3\n");
|
||||
break;
|
||||
case COLOR_DEPTH_161616:
|
||||
params.ucDstBpc = PANEL_16BIT_PER_COLOR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (EXEC_BIOS_CMD_TABLE(SelectCRTC_Source, params))
|
||||
result = BP_RESULT_OK;
|
||||
|
|
|
|||
|
|
@ -1590,38 +1590,12 @@ dce110_select_crtc_source(struct pipe_ctx *pipe_ctx)
|
|||
struct dc_bios *bios = link->ctx->dc_bios;
|
||||
struct bp_crtc_source_select crtc_source_select = {0};
|
||||
enum engine_id engine_id = link->link_enc->preferred_engine;
|
||||
uint8_t bit_depth;
|
||||
|
||||
if (dc_is_rgb_signal(pipe_ctx->stream->signal))
|
||||
engine_id = link->link_enc->analog_engine;
|
||||
|
||||
switch (pipe_ctx->stream->timing.display_color_depth) {
|
||||
case COLOR_DEPTH_UNDEFINED:
|
||||
bit_depth = 0;
|
||||
break;
|
||||
case COLOR_DEPTH_666:
|
||||
bit_depth = 6;
|
||||
break;
|
||||
default:
|
||||
case COLOR_DEPTH_888:
|
||||
bit_depth = 8;
|
||||
break;
|
||||
case COLOR_DEPTH_101010:
|
||||
bit_depth = 10;
|
||||
break;
|
||||
case COLOR_DEPTH_121212:
|
||||
bit_depth = 12;
|
||||
break;
|
||||
case COLOR_DEPTH_141414:
|
||||
bit_depth = 14;
|
||||
break;
|
||||
case COLOR_DEPTH_161616:
|
||||
bit_depth = 16;
|
||||
break;
|
||||
}
|
||||
|
||||
crtc_source_select.controller_id = CONTROLLER_ID_D0 + pipe_ctx->stream_res.tg->inst;
|
||||
crtc_source_select.bit_depth = bit_depth;
|
||||
crtc_source_select.color_depth = pipe_ctx->stream->timing.display_color_depth;
|
||||
crtc_source_select.engine_id = engine_id;
|
||||
crtc_source_select.sink_signal = pipe_ctx->stream->signal;
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ struct bp_crtc_source_select {
|
|||
enum engine_id engine_id;
|
||||
enum controller_id controller_id;
|
||||
enum signal_type sink_signal;
|
||||
uint8_t bit_depth;
|
||||
enum dc_color_depth color_depth;
|
||||
};
|
||||
|
||||
struct bp_transmitter_control {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user