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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ bool hubp1_program_surface_flip_and_addr(
}

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_ind_64b_blk = independent_64b_blks ? 1 : 0;
+1 −1
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ void hubp1_program_tiling(

void hubp1_dcc_control(struct hubp *hubp,
		bool enable,
		bool independent_64b_blks);
		enum hubp_ind_block_size independent_64b_blks);

#ifdef CONFIG_DRM_AMD_DC_DCN2_0
bool hubp1_program_surface_flip_and_addr(
+1 −1
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ void hubp2_program_rotation(
}

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_ind_64b_blk = independent_64b_blks ? 1 : 0;
+1 −1
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ bool hubp2_program_surface_flip_and_addr(
	bool flip_immediate);

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(
	struct hubp *hubp,
+7 −1
Original line number Diff line number Diff line
@@ -47,6 +47,11 @@ enum cursor_lines_per_chunk {
	CURSOR_LINE_PER_CHUNK_16
};

enum hubp_ind_block_size {
	hubp_ind_block_unconstrained = 0,
	hubp_ind_block_64b,
};

struct hubp {
	const struct hubp_funcs *funcs;
	struct dc_context *ctx;
@@ -74,7 +79,8 @@ struct hubp_funcs {
			struct _vcs_dpi_display_ttu_regs_st *ttu_regs);

	void (*dcc_control)(struct hubp *hubp, bool enable,
			bool independent_64b_blks);
			enum hubp_ind_block_size blk_size);

	void (*mem_program_viewport)(
			struct hubp *hubp,
			const struct rect *viewport,