mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
disp: msm: sde: disable vsync counter before tear check update
Disable vsync counter before single buffer tear check update. It allows to trigger the resolution switch frame as posted start frame. Change-Id: I2726372fd0e6d14ab0f79e3e3b0731a074158682 Signed-off-by: Dhaval Patel <quic_pdhaval@quicinc.com> Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
This commit is contained in:
parent
d55329a469
commit
d32ac73186
1 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include <linux/iopoll.h>
|
||||
|
|
@ -543,20 +544,20 @@ static int sde_hw_intf_setup_te_config(struct sde_hw_intf *intf,
|
|||
struct sde_hw_tear_check *te)
|
||||
{
|
||||
struct sde_hw_blk_reg_map *c;
|
||||
int cfg;
|
||||
u32 cfg = 0;
|
||||
|
||||
if (!intf)
|
||||
return -EINVAL;
|
||||
|
||||
c = &intf->hw;
|
||||
|
||||
cfg = BIT(19); /* VSYNC_COUNTER_EN */
|
||||
if (te->hw_vsync_mode)
|
||||
cfg |= BIT(20);
|
||||
|
||||
cfg |= te->vsync_count;
|
||||
|
||||
SDE_REG_WRITE(c, INTF_TEAR_SYNC_CONFIG_VSYNC, cfg);
|
||||
wmb(); /* disable vsync counter before updating single buffer registers */
|
||||
SDE_REG_WRITE(c, INTF_TEAR_SYNC_CONFIG_HEIGHT, te->sync_cfg_height);
|
||||
SDE_REG_WRITE(c, INTF_TEAR_VSYNC_INIT_VAL, te->vsync_init_val);
|
||||
SDE_REG_WRITE(c, INTF_TEAR_RD_PTR_IRQ, te->rd_ptr_irq);
|
||||
|
|
@ -567,6 +568,8 @@ static int sde_hw_intf_setup_te_config(struct sde_hw_intf *intf,
|
|||
te->sync_threshold_start));
|
||||
SDE_REG_WRITE(c, INTF_TEAR_SYNC_WRCOUNT,
|
||||
(te->start_pos + te->sync_threshold_start + 1));
|
||||
cfg |= BIT(19); /* VSYNC_COUNTER_EN */
|
||||
SDE_REG_WRITE(c, INTF_TEAR_SYNC_CONFIG_VSYNC, cfg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue