|
@@ -250,10 +250,11 @@ static void sde_encoder_phys_cmd_autorefresh_done_irq(void *arg, int irq_idx)
|
|
|
new_cnt = atomic_add_unless(&cmd_enc->autorefresh.kickoff_cnt, -1, 0);
|
|
|
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
|
|
|
|
|
|
- SDE_EVT32_IRQ(DRMID(phys_enc->parent),
|
|
|
- phys_enc->hw_pp->idx - PINGPONG_0,
|
|
|
- phys_enc->hw_intf->idx - INTF_0,
|
|
|
- new_cnt);
|
|
|
+ SDE_EVT32_IRQ(DRMID(phys_enc->parent), phys_enc->hw_pp->idx - PINGPONG_0,
|
|
|
+ phys_enc->hw_intf->idx - INTF_0, new_cnt);
|
|
|
+
|
|
|
+ if (new_cnt)
|
|
|
+ _sde_encoder_phys_signal_frame_done(phys_enc);
|
|
|
|
|
|
/* Signal any waiting atomic commit thread */
|
|
|
wake_up_all(&cmd_enc->autorefresh.kickoff_wq);
|
|
@@ -1858,9 +1859,7 @@ static void _sde_encoder_autorefresh_disable_seq2(
|
|
|
tear_status.write_count);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-static void sde_encoder_phys_cmd_prepare_commit(
|
|
|
- struct sde_encoder_phys *phys_enc)
|
|
|
+static void _sde_encoder_phys_disable_autorefresh(struct sde_encoder_phys *phys_enc)
|
|
|
{
|
|
|
struct sde_encoder_phys_cmd *cmd_enc = to_sde_encoder_phys_cmd(phys_enc);
|
|
|
struct sde_kms *sde_kms;
|
|
@@ -1868,13 +1867,13 @@ static void sde_encoder_phys_cmd_prepare_commit(
|
|
|
if (!phys_enc || !sde_encoder_phys_cmd_is_master(phys_enc))
|
|
|
return;
|
|
|
|
|
|
- sde_kms = phys_enc->sde_kms;
|
|
|
+ if (!sde_encoder_phys_cmd_is_autorefresh_enabled(phys_enc))
|
|
|
+ return;
|
|
|
|
|
|
SDE_EVT32(DRMID(phys_enc->parent), phys_enc->intf_idx - INTF_0,
|
|
|
cmd_enc->autorefresh.cfg.enable);
|
|
|
|
|
|
- if (!sde_encoder_phys_cmd_is_autorefresh_enabled(phys_enc))
|
|
|
- return;
|
|
|
+ sde_kms = phys_enc->sde_kms;
|
|
|
|
|
|
sde_encoder_phys_cmd_connect_te(phys_enc, false);
|
|
|
_sde_encoder_phys_cmd_config_autorefresh(phys_enc, 0);
|
|
@@ -1888,6 +1887,11 @@ static void sde_encoder_phys_cmd_prepare_commit(
|
|
|
SDE_DEBUG_CMDENC(cmd_enc, "autorefresh disabled successfully\n");
|
|
|
}
|
|
|
|
|
|
+static void sde_encoder_phys_cmd_prepare_commit(struct sde_encoder_phys *phys_enc)
|
|
|
+{
|
|
|
+ return _sde_encoder_phys_disable_autorefresh(phys_enc);
|
|
|
+}
|
|
|
+
|
|
|
static void sde_encoder_phys_cmd_trigger_start(
|
|
|
struct sde_encoder_phys *phys_enc)
|
|
|
{
|
|
@@ -2009,6 +2013,7 @@ static void sde_encoder_phys_cmd_init_ops(struct sde_encoder_phys_ops *ops)
|
|
|
ops->setup_misr = sde_encoder_helper_setup_misr;
|
|
|
ops->collect_misr = sde_encoder_helper_collect_misr;
|
|
|
ops->add_to_minidump = sde_encoder_phys_cmd_add_enc_to_minidump;
|
|
|
+ ops->disable_autorefresh = _sde_encoder_phys_disable_autorefresh;
|
|
|
}
|
|
|
|
|
|
static inline bool sde_encoder_phys_cmd_intf_te_supported(
|