Merge 862239a2f3 on remote branch

Change-Id: I3818f310ff14bc4d559a34bd4e639758ff046631
This commit is contained in:
Linux Build Service Account 2021-09-11 12:31:01 -07:00
commit 8a70e5e5b8
7 changed files with 431 additions and 699 deletions

View file

@ -266,7 +266,6 @@ static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
{
int rc = 0;
struct dentry *dir, *state_file, *reg_dump, *cmd_dma_logs;
char dbg_name[DSI_DEBUG_NAME_LEN];
if (!dsi_ctrl || !parent) {
DSI_CTRL_ERR(dsi_ctrl, "Invalid params\n");
@ -329,10 +328,6 @@ static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
dsi_ctrl->debugfs_root = dir;
snprintf(dbg_name, DSI_DEBUG_NAME_LEN, "dsi%d_ctrl",
dsi_ctrl->cell_index);
sde_dbg_reg_register_base(dbg_name, dsi_ctrl->hw.base,
msm_iomap_size(dsi_ctrl->pdev, "dsi_ctrl"));
error_remove_dir:
debugfs_remove(dir);
error:
@ -345,16 +340,8 @@ static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
return 0;
}
#else
static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
struct dentry *parent)
static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent)
{
char dbg_name[DSI_DEBUG_NAME_LEN];
snprintf(dbg_name, DSI_DEBUG_NAME_LEN, "dsi%d_ctrl",
dsi_ctrl->cell_index);
sde_dbg_reg_register_base(dbg_name,
dsi_ctrl->hw.base,
msm_iomap_size(dsi_ctrl->pdev, "dsi_ctrl"));
return 0;
}
static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
@ -2350,6 +2337,7 @@ void dsi_ctrl_put(struct dsi_ctrl *dsi_ctrl)
*/
int dsi_ctrl_drv_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent)
{
char dbg_name[DSI_DEBUG_NAME_LEN];
int rc = 0;
if (!dsi_ctrl) {
@ -2371,6 +2359,10 @@ int dsi_ctrl_drv_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent)
goto error;
}
snprintf(dbg_name, DSI_DEBUG_NAME_LEN, "dsi%d_ctrl", dsi_ctrl->cell_index);
sde_dbg_reg_register_base(dbg_name, dsi_ctrl->hw.base,
msm_iomap_size(dsi_ctrl->pdev, "dsi_ctrl"));
error:
mutex_unlock(&dsi_ctrl->ctrl_lock);
return rc;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
* Copyright (C) 2013 Red Hat
* Author: Rob Clark <robdclark@gmail.com>
*
@ -275,6 +275,8 @@ vm_fault_t msm_gem_fault(struct vm_fault *vmf)
return VM_FAULT_SIGBUS;
}
msm_obj->aspace = msm_gem_smmu_address_space_get(obj->dev,
MSM_SMMU_DOMAIN_UNSECURE);
/* make sure we have pages attached now */
pages = get_pages(obj);
if (IS_ERR(pages)) {

View file

@ -4286,24 +4286,6 @@ void sde_encoder_helper_get_pp_line_count(struct drm_encoder *drm_enc,
}
}
void sde_encoder_helper_get_transfer_time(struct drm_encoder *drm_enc,
u32 *transfer_time_us)
{
struct sde_encoder_virt *sde_enc;
struct msm_mode_info *info;
if (!drm_enc || !transfer_time_us) {
SDE_ERROR("bad arg: encoder:%d transfer_time:%d\n", !drm_enc,
!transfer_time_us);
return;
}
sde_enc = to_sde_encoder_virt(drm_enc);
info = &sde_enc->mode_info;
*transfer_time_us = info->mdp_transfer_time_us;
}
int sde_encoder_helper_reset_mixers(struct sde_encoder_phys *phys_enc,
struct drm_framebuffer *fb)
{

View file

@ -541,14 +541,6 @@ void sde_encoder_phys_setup_cdm(struct sde_encoder_phys *phys_enc,
void sde_encoder_helper_get_pp_line_count(struct drm_encoder *drm_enc,
struct sde_hw_pp_vsync_info *info);
/**
* sde_encoder_helper_get_transfer_time - get the mdp transfer time in usecs
* @drm_enc: Pointer to drm encoder structure
* @transfer_time_us: Pointer to store the output value
*/
void sde_encoder_helper_get_transfer_time(struct drm_encoder *drm_enc,
u32 *transfer_time_us);
/**
* sde_encoder_helper_trigger_flush - control flush helper function
* This helper function may be optionally specified by physical

View file

@ -963,8 +963,6 @@ static int _get_tearcheck_threshold(struct sde_encoder_phys *phys_enc)
u32 default_time_ns;
u32 extra_time_ns;
u32 default_line_time_ns;
u32 idle_time_ns = 0;
u32 transfer_time_us = 0;
if (phys_enc->parent_ops.get_qsync_fps)
phys_enc->parent_ops.get_qsync_fps(
@ -985,28 +983,26 @@ static int _get_tearcheck_threshold(struct sde_encoder_phys *phys_enc)
}
/* Calculate the number of extra lines*/
slow_time_ns = (1 * 1000000000) / qsync_min_fps;
default_time_ns = (1 * 1000000000) / default_fps;
sde_encoder_helper_get_transfer_time(phys_enc->parent,
&transfer_time_us);
if (transfer_time_us)
idle_time_ns = default_time_ns -
(1000 * transfer_time_us);
extra_time_ns = slow_time_ns - default_time_ns + idle_time_ns;
default_line_time_ns = (1 * 1000000000) / (default_fps * yres);
slow_time_ns = 1000000000 / qsync_min_fps;
default_time_ns = 1000000000 / default_fps;
extra_time_ns = slow_time_ns - default_time_ns;
default_line_time_ns = default_time_ns / yres;
threshold_lines = extra_time_ns / default_line_time_ns;
/* round down to nearest multiple of 4 to compensate for rounding in DDIC */
threshold_lines &= ~(4 - 1);
/* additional compensation for latency */
if (threshold_lines - 2 > DEFAULT_TEARCHECK_SYNC_THRESH_START)
threshold_lines -= 2;
SDE_DEBUG_CMDENC(cmd_enc, "slow:%d default:%d extra:%d(ns)\n",
slow_time_ns, default_time_ns, extra_time_ns);
SDE_DEBUG_CMDENC(cmd_enc, "xfer:%d(us) idle:%d(ns) lines:%d\n",
transfer_time_us, idle_time_ns, threshold_lines);
SDE_DEBUG_CMDENC(cmd_enc, "min_fps:%d fps:%d yres:%d\n",
qsync_min_fps, default_fps, yres);
SDE_DEBUG_CMDENC(cmd_enc, "min_fps:%d fps:%d yres:%d lines:%d\n",
qsync_min_fps, default_fps, yres, threshold_lines);
SDE_EVT32(qsync_mode, qsync_min_fps, extra_time_ns, default_fps,
yres, transfer_time_us, threshold_lines);
yres, threshold_lines);
}
exit:

File diff suppressed because it is too large Load diff

View file

@ -43,6 +43,7 @@ enum sde_dbg_evtlog_flag {
enum sde_dbg_dump_flag {
SDE_DBG_DUMP_IN_LOG = BIT(0),
SDE_DBG_DUMP_IN_MEM = BIT(1),
SDE_DBG_DUMP_IN_LOG_LIMITED = BIT(2),
};
enum sde_dbg_dump_context {