drm/amd/display: Interfaces for hubp blank and soft reset
[WHY] HUBP blanking sequence on DCN30 requires us to check if HUBP is in blank and also toggle HUBP_DISABLE, which should instead be called HUBP_SOFT_RESET for what it does in HW. Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com> Acked-by: Bindu Ramamurthy <bindu.r@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ea96b12aa4
commit
2da94e2808
@ -1241,6 +1241,22 @@ void hubp1_vtg_sel(struct hubp *hubp, uint32_t otg_inst)
|
||||
REG_UPDATE(DCHUBP_CNTL, HUBP_VTG_SEL, otg_inst);
|
||||
}
|
||||
|
||||
bool hubp1_in_blank(struct hubp *hubp)
|
||||
{
|
||||
uint32_t in_blank;
|
||||
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
|
||||
|
||||
REG_GET(DCHUBP_CNTL, HUBP_IN_BLANK, &in_blank);
|
||||
return in_blank ? true : false;
|
||||
}
|
||||
|
||||
void hubp1_soft_reset(struct hubp *hubp, bool reset)
|
||||
{
|
||||
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
|
||||
|
||||
REG_UPDATE(DCHUBP_CNTL, HUBP_DISABLE, reset ? 1 : 0);
|
||||
}
|
||||
|
||||
void hubp1_init(struct hubp *hubp)
|
||||
{
|
||||
//do nothing
|
||||
@ -1272,6 +1288,8 @@ static const struct hubp_funcs dcn10_hubp_funcs = {
|
||||
|
||||
.dmdata_set_attributes = NULL,
|
||||
.dmdata_load = NULL,
|
||||
.hubp_soft_reset = hubp1_soft_reset,
|
||||
.hubp_in_blank = hubp1_in_blank,
|
||||
};
|
||||
|
||||
/*****************************************/
|
||||
|
@ -260,6 +260,7 @@
|
||||
HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_NO_OUTSTANDING_REQ, mask_sh),\
|
||||
HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_VTG_SEL, mask_sh),\
|
||||
HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_DISABLE, mask_sh),\
|
||||
HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_IN_BLANK, mask_sh),\
|
||||
HUBP_SF(HUBP0_DCSURF_ADDR_CONFIG, NUM_PIPES, mask_sh),\
|
||||
HUBP_SF(HUBP0_DCSURF_ADDR_CONFIG, NUM_BANKS, mask_sh),\
|
||||
HUBP_SF(HUBP0_DCSURF_ADDR_CONFIG, PIPE_INTERLEAVE, mask_sh),\
|
||||
@ -455,6 +456,7 @@
|
||||
type HUBP_VTG_SEL;\
|
||||
type HUBP_UNDERFLOW_STATUS;\
|
||||
type HUBP_UNDERFLOW_CLEAR;\
|
||||
type HUBP_IN_BLANK;\
|
||||
type NUM_PIPES;\
|
||||
type NUM_BANKS;\
|
||||
type PIPE_INTERLEAVE;\
|
||||
@ -772,5 +774,7 @@ void hubp1_vready_workaround(struct hubp *hubp,
|
||||
|
||||
void hubp1_init(struct hubp *hubp);
|
||||
void hubp1_read_state_common(struct hubp *hubp);
|
||||
bool hubp1_in_blank(struct hubp *hubp);
|
||||
void hubp1_soft_reset(struct hubp *hubp, bool reset);
|
||||
|
||||
#endif
|
||||
|
@ -1595,6 +1595,8 @@ static struct hubp_funcs dcn20_hubp_funcs = {
|
||||
.hubp_set_flip_control_surface_gsl = hubp2_set_flip_control_surface_gsl,
|
||||
.hubp_init = hubp1_init,
|
||||
.validate_dml_output = hubp2_validate_dml_output,
|
||||
.hubp_in_blank = hubp1_in_blank,
|
||||
.hubp_soft_reset = hubp1_soft_reset,
|
||||
};
|
||||
|
||||
|
||||
|
@ -509,6 +509,8 @@ static struct hubp_funcs dcn30_hubp_funcs = {
|
||||
.hubp_clear_underflow = hubp2_clear_underflow,
|
||||
.hubp_set_flip_control_surface_gsl = hubp2_set_flip_control_surface_gsl,
|
||||
.hubp_init = hubp3_init,
|
||||
.hubp_in_blank = hubp1_in_blank,
|
||||
.hubp_soft_reset = hubp1_soft_reset,
|
||||
};
|
||||
|
||||
bool hubp3_construct(
|
||||
|
@ -188,6 +188,8 @@ struct hubp_funcs {
|
||||
void (*set_unbounded_requesting)(
|
||||
struct hubp *hubp,
|
||||
bool enable);
|
||||
bool (*hubp_in_blank)(struct hubp *hubp);
|
||||
void (*hubp_soft_reset)(struct hubp *hubp, bool reset);
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user