Skip to content

Commit 652968d

Browse files
Yihan Zhualexdeucher
authored andcommitted
drm/amd/display: DCN42 RMCM and MCM 3DLUT support
[WHY & HOW] Providing hardware programming for the RMCM and MCM IPs for 3DLUT in DCN42. Reviewed-by: Charlene Liu <[email protected]> Signed-off-by: Yihan Zhu <[email protected]> Signed-off-by: Zaeem Mohamed <[email protected]> Tested-by: Mark Broadworth <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent c9646e5 commit 652968d

File tree

5 files changed

+363
-37
lines changed

5 files changed

+363
-37
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,7 @@ enum dc_cm2_gpu_mem_layout {
12551255

12561256
enum dc_cm2_gpu_mem_pixel_component_order {
12571257
DC_CM2_GPU_MEM_PIXEL_COMPONENT_ORDER_RGBA,
1258+
DC_CM2_GPU_MEM_PIXEL_COMPONENT_ORDER_BGRA
12581259
};
12591260

12601261
enum dc_cm2_gpu_mem_format {
@@ -1276,7 +1277,8 @@ struct dc_cm2_gpu_mem_format_parameters {
12761277

12771278
enum dc_cm2_gpu_mem_size {
12781279
DC_CM2_GPU_MEM_SIZE_171717,
1279-
DC_CM2_GPU_MEM_SIZE_TRANSFORMED
1280+
DC_CM2_GPU_MEM_SIZE_333333,
1281+
DC_CM2_GPU_MEM_SIZE_TRANSFORMED,
12801282
};
12811283

12821284
struct dc_cm2_gpu_mem_parameters {
@@ -1285,6 +1287,7 @@ struct dc_cm2_gpu_mem_parameters {
12851287
struct dc_cm2_gpu_mem_format_parameters format_params;
12861288
enum dc_cm2_gpu_mem_pixel_component_order component_order;
12871289
enum dc_cm2_gpu_mem_size size;
1290+
uint16_t bit_depth;
12881291
};
12891292

12901293
enum dc_cm2_transfer_func_source {
@@ -1308,6 +1311,10 @@ struct dc_cm2_func_luts {
13081311
const struct dc_3dlut *lut3d_func;
13091312
struct dc_cm2_gpu_mem_parameters gpu_mem_params;
13101313
};
1314+
bool rmcm_3dlut_shaper_select;
1315+
bool mpc_3dlut_enable;
1316+
bool rmcm_3dlut_enable;
1317+
bool mpc_mcm_post_blend;
13111318
} lut3d_data;
13121319
const struct dc_transfer_func *lut1d_func;
13131320
};

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,9 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm
885885
case DC_CM2_GPU_MEM_SIZE_171717:
886886
plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube;
887887
break;
888+
case DC_CM2_GPU_MEM_SIZE_333333:
889+
plane->tdlut.tdlut_width_mode = dml2_tdlut_width_33_cube;
890+
break;
888891
case DC_CM2_GPU_MEM_SIZE_TRANSFORMED:
889892
//plane->tdlut.tdlut_width_mode = dml2_tdlut_width_flatten; // dml2_tdlut_width_flatten undefined
890893
break;

0 commit comments

Comments
 (0)