Skip to content

Commit

Permalink
drm/amd/display: DCN42 RMCM and MCM 3DLUT support
Browse files Browse the repository at this point in the history
[WHY & HOW]
Providing hardware programming for the RMCM and MCM IPs for 3DLUT in DCN42.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Yihan Zhu <Yihan.Zhu@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Mark Broadworth <mark.broadworth@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Yihan Zhu authored and Alex Deucher committed Apr 21, 2025
1 parent c9646e5 commit 652968d
Show file tree
Hide file tree
Showing 5 changed files with 363 additions and 37 deletions.
9 changes: 8 additions & 1 deletion drivers/gpu/drm/amd/display/dc/dc_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,7 @@ enum dc_cm2_gpu_mem_layout {

enum dc_cm2_gpu_mem_pixel_component_order {
DC_CM2_GPU_MEM_PIXEL_COMPONENT_ORDER_RGBA,
DC_CM2_GPU_MEM_PIXEL_COMPONENT_ORDER_BGRA
};

enum dc_cm2_gpu_mem_format {
Expand All @@ -1276,7 +1277,8 @@ struct dc_cm2_gpu_mem_format_parameters {

enum dc_cm2_gpu_mem_size {
DC_CM2_GPU_MEM_SIZE_171717,
DC_CM2_GPU_MEM_SIZE_TRANSFORMED
DC_CM2_GPU_MEM_SIZE_333333,
DC_CM2_GPU_MEM_SIZE_TRANSFORMED,
};

struct dc_cm2_gpu_mem_parameters {
Expand All @@ -1285,6 +1287,7 @@ struct dc_cm2_gpu_mem_parameters {
struct dc_cm2_gpu_mem_format_parameters format_params;
enum dc_cm2_gpu_mem_pixel_component_order component_order;
enum dc_cm2_gpu_mem_size size;
uint16_t bit_depth;
};

enum dc_cm2_transfer_func_source {
Expand All @@ -1308,6 +1311,10 @@ struct dc_cm2_func_luts {
const struct dc_3dlut *lut3d_func;
struct dc_cm2_gpu_mem_parameters gpu_mem_params;
};
bool rmcm_3dlut_shaper_select;
bool mpc_3dlut_enable;
bool rmcm_3dlut_enable;
bool mpc_mcm_post_blend;
} lut3d_data;
const struct dc_transfer_func *lut1d_func;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,9 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm
case DC_CM2_GPU_MEM_SIZE_171717:
plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube;
break;
case DC_CM2_GPU_MEM_SIZE_333333:
plane->tdlut.tdlut_width_mode = dml2_tdlut_width_33_cube;
break;
case DC_CM2_GPU_MEM_SIZE_TRANSFORMED:
//plane->tdlut.tdlut_width_mode = dml2_tdlut_width_flatten; // dml2_tdlut_width_flatten undefined
break;
Expand Down
Loading

0 comments on commit 652968d

Please sign in to comment.