Commit 2c58cc6d authored by Ilya Bakoulin's avatar Ilya Bakoulin Committed by Alex Deucher

drm/amd/display: HUBP/HUBBUB register programming fixes

[Why]
- Need to change interface function signature / add an enum
  to reflect the available register field values

[How]
- Add a new enum and modify existing functions to use it instead
  of bool
Signed-off-by: default avatarIlya Bakoulin <Ilya.Bakoulin@amd.com>
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2b162fd3
...@@ -509,7 +509,7 @@ bool hubp1_program_surface_flip_and_addr( ...@@ -509,7 +509,7 @@ bool hubp1_program_surface_flip_and_addr(
} }
void hubp1_dcc_control(struct hubp *hubp, bool enable, void hubp1_dcc_control(struct hubp *hubp, bool enable,
bool independent_64b_blks) enum hubp_ind_block_size independent_64b_blks)
{ {
uint32_t dcc_en = enable ? 1 : 0; uint32_t dcc_en = enable ? 1 : 0;
uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0; uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0;
......
...@@ -698,7 +698,7 @@ void hubp1_program_tiling( ...@@ -698,7 +698,7 @@ void hubp1_program_tiling(
void hubp1_dcc_control(struct hubp *hubp, void hubp1_dcc_control(struct hubp *hubp,
bool enable, bool enable,
bool independent_64b_blks); enum hubp_ind_block_size independent_64b_blks);
#ifdef CONFIG_DRM_AMD_DC_DCN2_0 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
bool hubp1_program_surface_flip_and_addr( bool hubp1_program_surface_flip_and_addr(
......
...@@ -397,7 +397,7 @@ void hubp2_program_rotation( ...@@ -397,7 +397,7 @@ void hubp2_program_rotation(
} }
void hubp2_dcc_control(struct hubp *hubp, bool enable, void hubp2_dcc_control(struct hubp *hubp, bool enable,
bool independent_64b_blks) enum hubp_ind_block_size independent_64b_blks)
{ {
uint32_t dcc_en = enable ? 1 : 0; uint32_t dcc_en = enable ? 1 : 0;
uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0; uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0;
......
...@@ -252,7 +252,7 @@ bool hubp2_program_surface_flip_and_addr( ...@@ -252,7 +252,7 @@ bool hubp2_program_surface_flip_and_addr(
bool flip_immediate); bool flip_immediate);
void hubp2_dcc_control(struct hubp *hubp, bool enable, void hubp2_dcc_control(struct hubp *hubp, bool enable,
bool independent_64b_blks); enum hubp_ind_block_size independent_64b_blks);
void hubp2_program_size( void hubp2_program_size(
struct hubp *hubp, struct hubp *hubp,
......
...@@ -47,6 +47,11 @@ enum cursor_lines_per_chunk { ...@@ -47,6 +47,11 @@ enum cursor_lines_per_chunk {
CURSOR_LINE_PER_CHUNK_16 CURSOR_LINE_PER_CHUNK_16
}; };
enum hubp_ind_block_size {
hubp_ind_block_unconstrained = 0,
hubp_ind_block_64b,
};
struct hubp { struct hubp {
const struct hubp_funcs *funcs; const struct hubp_funcs *funcs;
struct dc_context *ctx; struct dc_context *ctx;
...@@ -74,7 +79,8 @@ struct hubp_funcs { ...@@ -74,7 +79,8 @@ struct hubp_funcs {
struct _vcs_dpi_display_ttu_regs_st *ttu_regs); struct _vcs_dpi_display_ttu_regs_st *ttu_regs);
void (*dcc_control)(struct hubp *hubp, bool enable, void (*dcc_control)(struct hubp *hubp, bool enable,
bool independent_64b_blks); enum hubp_ind_block_size blk_size);
void (*mem_program_viewport)( void (*mem_program_viewport)(
struct hubp *hubp, struct hubp *hubp,
const struct rect *viewport, const struct rect *viewport,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment