diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-06-03 21:24:41 +0300 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-06-03 21:24:41 +0300 |
| commit | 978414b66805b23c93560db9cdacd4fd83f8cc52 (patch) | |
| tree | 000bce4252e88a1b8c235b6c27c49f06f366d35e /drivers/video/fbdev/msm | |
| parent | f05944bc5ffdc717beddc54424cad99778542803 (diff) | |
| parent | d794dfa8278ba221a5a658f8ae02883bdb58d602 (diff) | |
Merge tag 'LA.UM.8.4.r1-05500-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-17.1-caf-msm8998
* tag 'LA.UM.8.4.r1-05500-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4:
ARM: convert to generated system call tables
ARM: remove indirection of asm/mach-types.h
mm/zsmalloc.c: change stat type parameter to int
msm: sde: fix mem access of sde rotator regdma ram
soc: qcom: Fix strlcpy compilation error with clang
sysmon-qmi: Fix compilation error while using LLVM
mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
sched/sysctl: Fix attributes of some extern declarations
ion: Fix typecasting of msm_ion_heap_types
soc: qcom: glink_debugfs: Fix compilation error with clang
msm: ipa3: Fix compilation errors after enabling LLVM
msm: ipa: Fix assignment warning with clang
mmc: host: sdhci-msm-ice: Fix clang warning with NOT operator usage
driver : Fix warnings and errors with llvm
soc: qcom: access smp2p_smem structure with I/O function
Makefile: Disable undefined-optimized and tautological features
ANDROID_BUILD_TOP is deprecated.
AndroidKernel: Update the LLVM path
AndroidKernel: Add configuration for the LLVM path
AndroidKernel: Add LLVM support for Kernel
drivers: hwmon: Fix compilation errors in ADC for kernel 4.9
msm: camera: Fix warnings and errors with llvm
f_qc_rndis: Remove unused structure
crypto: qcedev: Fix out of memory issue
crypto: msm: update QTI crypto drivers for msm-4.4
fbdev: msm: wait for frame complete before triggering dma cmd
msm: mdss: hdmi: don't reset CEC while triggering message send
fbdev: msm: Fix race condition during te_irq calls
msm: camera: Fix OOB issue in IR CUT driver
Change-Id: Ib371d4baa8840eabda4bd825d3abcd86e79d5c7a
Diffstat (limited to 'drivers/video/fbdev/msm')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi.c | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_cmd.h | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_host.c | 14 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_panel.c | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_cec.c | 9 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c | 7 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_panel.h | 4 |
8 files changed, 27 insertions, 19 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index 3871f58280c8..a201e272acbc 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -3689,6 +3689,7 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev) pdata = &ctrl_pdata->panel_data; init_completion(&pdata->te_done); + mutex_init(&pdata->te_mutex); if (pdata->panel_info.type == MIPI_CMD_PANEL) { if (!te_irq_registered) { rc = devm_request_irq(&pdev->dev, diff --git a/drivers/video/fbdev/msm/mdss_dsi_cmd.h b/drivers/video/fbdev/msm/mdss_dsi_cmd.h index 0ca968a00460..f323a2b665b6 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_cmd.h +++ b/drivers/video/fbdev/msm/mdss_dsi_cmd.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2016, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -101,6 +101,7 @@ struct dsi_cmd_desc { #define CMD_CLK_CTRL 0x0004 #define CMD_REQ_UNICAST 0x0008 #define CMD_REQ_DMA_TPG 0x0040 +#define CMD_REQ_DCS 0x0080 #define CMD_REQ_NO_MAX_PKT_SIZE 0x0008 #define CMD_REQ_LP_MODE 0x0010 #define CMD_REQ_HS_MODE 0x0020 diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c index 34cedaaa5864..a34a3424d990 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_host.c +++ b/drivers/video/fbdev/msm/mdss_dsi_host.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2668,7 +2668,7 @@ int mdss_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, } static inline bool mdss_dsi_delay_cmd(struct mdss_dsi_ctrl_pdata *ctrl, - bool from_mdp) + bool from_mdp, struct dcs_cmd_req *req) { unsigned long flags; bool mdp_busy = false; @@ -2678,9 +2678,9 @@ static inline bool mdss_dsi_delay_cmd(struct mdss_dsi_ctrl_pdata *ctrl, goto exit; /* delay only for split dsi, cmd mode and burst mode enabled cases */ - if (!mdss_dsi_is_hw_config_split(ctrl->shared_data) || + if ((!mdss_dsi_is_hw_config_split(ctrl->shared_data) || !(ctrl->panel_mode == DSI_CMD_MODE) || - !ctrl->burst_mode_enabled) + !ctrl->burst_mode_enabled) && !(req->flags & CMD_REQ_DCS)) goto exit; /* delay only if cmd is not from mdp and panel has been initialized */ @@ -2689,8 +2689,10 @@ static inline bool mdss_dsi_delay_cmd(struct mdss_dsi_ctrl_pdata *ctrl, /* if broadcast enabled, apply delay only if this is the ctrl trigger */ if (mdss_dsi_sync_wait_enable(ctrl) && - !mdss_dsi_sync_wait_trigger(ctrl)) + (!mdss_dsi_sync_wait_trigger(ctrl) && !(req->flags & CMD_REQ_DCS))) goto exit; + else + need_wait = true; spin_lock_irqsave(&ctrl->mdp_lock, flags); if (ctrl->mdp_busy == true) @@ -2830,7 +2832,7 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) * mdp path */ mutex_lock(&ctrl->mutex); - if (mdss_dsi_delay_cmd(ctrl, from_mdp)) + if (mdss_dsi_delay_cmd(ctrl, from_mdp, req)) ctrl->mdp_callback->fxn(ctrl->mdp_callback->data, MDP_INTF_CALLBACK_DSI_WAIT); mutex_unlock(&ctrl->mutex); diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c index 2480e342ed44..1ab256cd08af 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_panel.c +++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -235,7 +235,7 @@ static void mdss_dsi_panel_bklt_dcs(struct mdss_dsi_ctrl_pdata *ctrl, int level) memset(&cmdreq, 0, sizeof(cmdreq)); cmdreq.cmds = &backlight_cmd; cmdreq.cmds_cnt = 1; - cmdreq.flags = CMD_REQ_COMMIT | CMD_CLK_CTRL; + cmdreq.flags = CMD_REQ_COMMIT | CMD_CLK_CTRL | CMD_REQ_DCS; cmdreq.rlen = 0; cmdreq.cb = NULL; diff --git a/drivers/video/fbdev/msm/mdss_hdmi_cec.c b/drivers/video/fbdev/msm/mdss_hdmi_cec.c index 3eda29edff4d..12a9267f3749 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_cec.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_cec.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2017, 2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2010-2017, 2020 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -90,10 +90,6 @@ static int hdmi_cec_msg_send(void *data, struct cec_msg *msg) if (msg->retransmit > 0 && msg->retransmit < RETRANSMIT_MAX_NUM) frame_retransmit = msg->retransmit; - /* toggle cec in order to flush out bad hw state, if any */ - DSS_REG_W(io, HDMI_CEC_CTRL, 0); - DSS_REG_W(io, HDMI_CEC_CTRL, BIT(0)); - frame_retransmit = (frame_retransmit & 0xF) << 4; DSS_REG_W(io, HDMI_CEC_RETRANSMIT, BIT(0) | frame_retransmit); @@ -360,6 +356,9 @@ int hdmi_cec_isr(void *input) if ((cec_intr & BIT(2)) && (cec_intr & BIT(3))) { DEV_DBG("%s: CEC_IRQ_FRAME_ERROR\n", __func__); DSS_REG_W(io, HDMI_CEC_INT, cec_intr | BIT(2)); + /* toggle cec in order to flush out bad hw state, if any */ + DSS_REG_W(io, HDMI_CEC_CTRL, 0); + DSS_REG_W(io, HDMI_CEC_CTRL, BIT(0)); spin_lock_irqsave(&cec_ctrl->lock, flags); cec_ctrl->cec_msg_wr_status |= CEC_STATUS_WR_ERROR; diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c index b46e955f280b..fea8f0917dee 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c @@ -1228,11 +1228,12 @@ static int mdss_mdp_cmd_intf_callback(void *data, int event) __func__, atomic_read(&ctx->rdptr_cnt), event); /* - * if we are going to suspended or pp split is not enabled, - * just return + * if we are going to suspended, just return */ - if (ctx->intf_stopped || !is_pingpong_split(ctx->ctl->mfd)) + if (ctx->intf_stopped) { + pr_debug("%s: Intf stopped\n", __func__); return -EINVAL; + } atomic_inc(&ctx->rdptr_cnt); /* enable clks and rd_ptr interrupt */ diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c index 34591c84d5c3..f2afd04eaf29 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -3417,7 +3417,7 @@ static int pp_ad_calc_bl(struct msm_fb_data_type *mfd, int bl_in, int *bl_out, } if (!ad->bl_mfd || !ad->bl_mfd->panel_info || - !ad->bl_att_lut) { + ad->bl_att_lut == NULL) { pr_err("Invalid ad info: bl_mfd = 0x%pK, ad->bl_mfd->panel_info = 0x%pK, bl_att_lut = 0x%pK\n", ad->bl_mfd, (!ad->bl_mfd) ? NULL : ad->bl_mfd->panel_info, @@ -6970,7 +6970,7 @@ static int is_valid_calib_dspp_addr(char __iomem *ptr) ret = MDP_PP_OPS_READ | MDP_PP_OPS_WRITE; break; /* Dither enable/disable */ - } else if ((ptr == base + MDSS_MDP_REG_DSPP_DITHER_DEPTH)) { + } else if (ptr == base + MDSS_MDP_REG_DSPP_DITHER_DEPTH) { ret = MDP_PP_OPS_READ | MDP_PP_OPS_WRITE; break; /* Six zone and mem color */ diff --git a/drivers/video/fbdev/msm/mdss_panel.h b/drivers/video/fbdev/msm/mdss_panel.h index 2dcd038aa393..059bc6ba4a76 100644 --- a/drivers/video/fbdev/msm/mdss_panel.h +++ b/drivers/video/fbdev/msm/mdss_panel.h @@ -1019,6 +1019,7 @@ struct mdss_panel_data { int panel_te_gpio; bool is_te_irq_enabled; + struct mutex te_mutex; struct completion te_done; }; @@ -1038,6 +1039,7 @@ static inline void panel_update_te_irq(struct mdss_panel_data *pdata, return; } + mutex_lock(&pdata->te_mutex); if (enable && !pdata->is_te_irq_enabled) { enable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = true; @@ -1045,6 +1047,8 @@ static inline void panel_update_te_irq(struct mdss_panel_data *pdata, disable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = false; } + mutex_unlock(&pdata->te_mutex); + } /** |
