|
@@ -647,10 +647,11 @@ static int _sde_encoder_phys_cmd_wait_for_idle(
|
|
{
|
|
{
|
|
struct sde_encoder_phys_cmd *cmd_enc =
|
|
struct sde_encoder_phys_cmd *cmd_enc =
|
|
to_sde_encoder_phys_cmd(phys_enc);
|
|
to_sde_encoder_phys_cmd(phys_enc);
|
|
- struct sde_encoder_wait_info wait_info;
|
|
|
|
|
|
+ struct sde_encoder_wait_info wait_info = {0};
|
|
bool recovery_events;
|
|
bool recovery_events;
|
|
int ret;
|
|
int ret;
|
|
struct sde_hw_ctl *ctl;
|
|
struct sde_hw_ctl *ctl;
|
|
|
|
+ bool wr_ptr_wait_success = true;
|
|
|
|
|
|
if (!phys_enc) {
|
|
if (!phys_enc) {
|
|
SDE_ERROR("invalid encoder\n");
|
|
SDE_ERROR("invalid encoder\n");
|
|
@@ -658,7 +659,11 @@ static int _sde_encoder_phys_cmd_wait_for_idle(
|
|
}
|
|
}
|
|
|
|
|
|
ctl = phys_enc->hw_ctl;
|
|
ctl = phys_enc->hw_ctl;
|
|
- if (cmd_enc->wr_ptr_wait_success &&
|
|
|
|
|
|
+
|
|
|
|
+ if (sde_encoder_phys_cmd_is_master(phys_enc))
|
|
|
|
+ wr_ptr_wait_success = cmd_enc->wr_ptr_wait_success;
|
|
|
|
+
|
|
|
|
+ if (wr_ptr_wait_success &&
|
|
(phys_enc->frame_trigger_mode == FRAME_DONE_WAIT_POSTED_START) &&
|
|
(phys_enc->frame_trigger_mode == FRAME_DONE_WAIT_POSTED_START) &&
|
|
ctl->ops.get_scheduler_status &&
|
|
ctl->ops.get_scheduler_status &&
|
|
(ctl->ops.get_scheduler_status(ctl) & BIT(0)) &&
|
|
(ctl->ops.get_scheduler_status(ctl) & BIT(0)) &&
|
|
@@ -672,6 +677,9 @@ static int _sde_encoder_phys_cmd_wait_for_idle(
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (atomic_read(&phys_enc->pending_kickoff_cnt) > 1)
|
|
|
|
+ wait_info.count_check = 1;
|
|
|
|
+
|
|
wait_info.wq = &phys_enc->pending_kickoff_wq;
|
|
wait_info.wq = &phys_enc->pending_kickoff_wq;
|
|
wait_info.atomic_cnt = &phys_enc->pending_kickoff_cnt;
|
|
wait_info.atomic_cnt = &phys_enc->pending_kickoff_cnt;
|
|
wait_info.timeout_ms = KICKOFF_TIMEOUT_MS;
|
|
wait_info.timeout_ms = KICKOFF_TIMEOUT_MS;
|
|
@@ -707,7 +715,7 @@ static int _sde_encoder_phys_cmd_wait_for_autorefresh_done(
|
|
{
|
|
{
|
|
struct sde_encoder_phys_cmd *cmd_enc =
|
|
struct sde_encoder_phys_cmd *cmd_enc =
|
|
to_sde_encoder_phys_cmd(phys_enc);
|
|
to_sde_encoder_phys_cmd(phys_enc);
|
|
- struct sde_encoder_wait_info wait_info;
|
|
|
|
|
|
+ struct sde_encoder_wait_info wait_info = {0};
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
if (!phys_enc) {
|
|
if (!phys_enc) {
|
|
@@ -1334,7 +1342,7 @@ static int _sde_encoder_phys_cmd_wait_for_wr_ptr(
|
|
{
|
|
{
|
|
struct sde_encoder_phys_cmd *cmd_enc =
|
|
struct sde_encoder_phys_cmd *cmd_enc =
|
|
to_sde_encoder_phys_cmd(phys_enc);
|
|
to_sde_encoder_phys_cmd(phys_enc);
|
|
- struct sde_encoder_wait_info wait_info;
|
|
|
|
|
|
+ struct sde_encoder_wait_info wait_info = {0};
|
|
int ret;
|
|
int ret;
|
|
bool frame_pending = true;
|
|
bool frame_pending = true;
|
|
struct sde_hw_ctl *ctl;
|
|
struct sde_hw_ctl *ctl;
|
|
@@ -1383,6 +1391,7 @@ static int _sde_encoder_phys_cmd_wait_for_wr_ptr(
|
|
}
|
|
}
|
|
|
|
|
|
cmd_enc->wr_ptr_wait_success = (ret == 0) ? true : false;
|
|
cmd_enc->wr_ptr_wait_success = (ret == 0) ? true : false;
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1461,7 +1470,7 @@ static int sde_encoder_phys_cmd_wait_for_vblank(
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|
|
struct sde_encoder_phys_cmd *cmd_enc;
|
|
struct sde_encoder_phys_cmd *cmd_enc;
|
|
- struct sde_encoder_wait_info wait_info;
|
|
|
|
|
|
+ struct sde_encoder_wait_info wait_info = {0};
|
|
|
|
|
|
if (!phys_enc)
|
|
if (!phys_enc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|