drm/amd/display: do not need otg lock if otg is not active
[todo] need find caller bug. tempooariy fix Signed-off-by: hersen wu <hersenxs.wu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -584,6 +584,13 @@ uint32_t optc1_get_vblank_counter(struct timing_generator *optc)
|
|||||||
void optc1_lock(struct timing_generator *optc)
|
void optc1_lock(struct timing_generator *optc)
|
||||||
{
|
{
|
||||||
struct optc *optc1 = DCN10TG_FROM_TG(optc);
|
struct optc *optc1 = DCN10TG_FROM_TG(optc);
|
||||||
|
uint32_t regval = 0;
|
||||||
|
|
||||||
|
regval = REG_READ(OTG_CONTROL);
|
||||||
|
|
||||||
|
/* otg is not running, do not need to be locked */
|
||||||
|
if ((regval & 0x1) == 0x0)
|
||||||
|
return;
|
||||||
|
|
||||||
REG_SET(OTG_GLOBAL_CONTROL0, 0,
|
REG_SET(OTG_GLOBAL_CONTROL0, 0,
|
||||||
OTG_MASTER_UPDATE_LOCK_SEL, optc->inst);
|
OTG_MASTER_UPDATE_LOCK_SEL, optc->inst);
|
||||||
@@ -591,11 +598,13 @@ void optc1_lock(struct timing_generator *optc)
|
|||||||
OTG_MASTER_UPDATE_LOCK, 1);
|
OTG_MASTER_UPDATE_LOCK, 1);
|
||||||
|
|
||||||
/* Should be fast, status does not update on maximus */
|
/* Should be fast, status does not update on maximus */
|
||||||
if (optc->ctx->dce_environment != DCE_ENV_FPGA_MAXIMUS)
|
if (optc->ctx->dce_environment != DCE_ENV_FPGA_MAXIMUS) {
|
||||||
|
|
||||||
REG_WAIT(OTG_MASTER_UPDATE_LOCK,
|
REG_WAIT(OTG_MASTER_UPDATE_LOCK,
|
||||||
UPDATE_LOCK_STATUS, 1,
|
UPDATE_LOCK_STATUS, 1,
|
||||||
1, 10);
|
1, 10);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void optc1_unlock(struct timing_generator *optc)
|
void optc1_unlock(struct timing_generator *optc)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user