Merge remote-tracking branch 'quic/dev/msm-4.14-display' into msm-4.14

* quic/dev/msm-4.14-display:
  drm/msm/sde: update plane scaler configs when disabled
  msm: sde: delimit the va_arg list in smmu fault handler
  drm/msm/dsi-staging: move misr caching to pre clk_off
  ARM: dts: msm: add PA dither DT entry for SM8150

Change-Id: I5d204f546677c7e185510222a66e8cf188d7d118
Signed-off-by: Namratha Siddappa <namratha@codeaurora.org>
This commit is contained in:
Namratha Siddappa 2018-05-30 17:21:10 -07:00
commit 603598fd37
6 changed files with 31 additions and 14 deletions

View File

@ -239,6 +239,7 @@
qcom,sde-dspp-gamut = <0x1000 0x00040001>;
qcom,sde-dspp-pcc = <0x1700 0x00040000>;
qcom,sde-dspp-gc = <0x17c0 0x00010008>;
qcom,sde-dspp-dither = <0x82c 0x00010007>;
};
qcom,platform-supply-entries {

View File

@ -2851,10 +2851,10 @@ int dsi_ctrl_cmd_tx_trigger(struct dsi_ctrl *dsi_ctrl, u32 flags)
}
/**
* _dsi_ctrl_cache_misr - Cache frame MISR value
* dsi_ctrl_cache_misr - Cache frame MISR value
* @dsi_ctrl: Pointer to associated dsi_ctrl structure
*/
static void _dsi_ctrl_cache_misr(struct dsi_ctrl *dsi_ctrl)
void dsi_ctrl_cache_misr(struct dsi_ctrl *dsi_ctrl)
{
u32 misr;
@ -2869,8 +2869,8 @@ static void _dsi_ctrl_cache_misr(struct dsi_ctrl *dsi_ctrl)
pr_debug("DSI_%d misr_cache = %x\n", dsi_ctrl->cell_index,
dsi_ctrl->misr_cache);
}
/**
* dsi_ctrl_get_host_engine_init_state() - Return host init state
* @dsi_ctrl: DSI controller handle.
@ -2968,9 +2968,6 @@ int dsi_ctrl_set_power_state(struct dsi_ctrl *dsi_ctrl,
goto error;
}
} else if (state == DSI_CTRL_POWER_VREG_OFF) {
if (dsi_ctrl->misr_enable)
_dsi_ctrl_cache_misr(dsi_ctrl);
rc = dsi_ctrl_enable_supplies(dsi_ctrl, false);
if (rc) {
pr_err("[%d]failed to disable vreg supplies, rc=%d\n",

View File

@ -667,6 +667,12 @@ int dsi_ctrl_setup_misr(struct dsi_ctrl *dsi_ctrl,
*/
u32 dsi_ctrl_collect_misr(struct dsi_ctrl *dsi_ctrl);
/**
* dsi_ctrl_cache_misr - Cache frame MISR value
* @dsi_ctrl: DSI controller handle.
*/
void dsi_ctrl_cache_misr(struct dsi_ctrl *dsi_ctrl);
/**
* dsi_ctrl_drv_register() - register platform driver for dsi controller
*/

View File

@ -2885,8 +2885,9 @@ int dsi_pre_clkoff_cb(void *priv,
enum dsi_clk_type clk,
enum dsi_clk_state new_state)
{
int rc = 0;
int rc = 0, i;
struct dsi_display *display = priv;
struct dsi_display_ctrl *ctrl;
if ((clk & DSI_LINK_CLK) && (new_state == DSI_CLK_OFF)) {
/*
@ -2933,6 +2934,15 @@ int dsi_pre_clkoff_cb(void *priv,
}
/* dsi will not be able to serve irqs from here on */
dsi_display_ctrl_irq_update(display, false);
/* cache the MISR values */
for (i = 0; i < display->ctrl_count; i++) {
ctrl = &display->ctrl[i];
if (!ctrl->ctrl)
continue;
dsi_ctrl_cache_misr(ctrl->ctrl);
}
}
return rc;

View File

@ -4590,7 +4590,8 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
pstate->scaler_check_state = SDE_PLANE_SCLCHECK_NONE;
if (!usr) {
SDE_DEBUG_PLANE(psde, "scale data removed\n");
return;
cfg->enable = 0;
goto end;
}
if (copy_from_user(&scale_v2, usr, sizeof(scale_v2))) {
@ -4601,13 +4602,10 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
/* detach/ignore user data if 'disabled' */
if (!scale_v2.enable) {
SDE_DEBUG_PLANE(psde, "scale data removed\n");
return;
cfg->enable = 0;
goto end;
}
/* force property to be dirty, even if the pointer didn't change */
msm_property_set_dirty(&psde->property_info,
&pstate->property_state, PLANE_PROP_SCALER_V2);
/* populate from user space */
sde_set_scaler_v2(cfg, &scale_v2);
@ -4629,6 +4627,11 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
}
pstate->scaler_check_state = SDE_PLANE_SCLCHECK_SCALER_V2_CHECK;
end:
/* force property to be dirty, even if the pointer didn't change */
msm_property_set_dirty(&psde->property_info,
&pstate->property_state, PLANE_PROP_SCALER_V2);
SDE_EVT32_VERBOSE(DRMID(&psde->base), cfg->enable, cfg->de.enable,
cfg->src_width[0], cfg->src_height[0],
cfg->dst_width, cfg->dst_height);

View File

@ -485,7 +485,7 @@ static int sde_smmu_fault_handler(struct iommu_domain *domain,
SDEROT_ERR("SMMU device:%s", sde_smmu->dev->kobj.name);
/* generate dump, but no panic */
sde_rot_evtlog_tout_handler(false, __func__, "rot", "vbif_dbg_bus");
SDEROT_EVTLOG_TOUT_HANDLER("rot", "rot_dbg_bus", "vbif_dbg_bus");
/*
* return -ENOSYS to allow smmu driver to dump out useful