mirror of https://gitee.com/openkylin/linux.git
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: Ilya Bakoulin <Ilya.Bakoulin@amd.com> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2b162fd302
commit
2c58cc6dc0
|
@ -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(
|
||||||
|
|
||||||
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(
|
||||||
}
|
}
|
||||||
|
|
||||||
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(
|
||||||
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 {
|
||||||
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 {
|
||||||
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,
|
||||||
|
|
Loading…
Reference in New Issue