Loading arch/arm64/boot/dts/qcom/sa8195p-adp-star-display.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -302,5 +302,9 @@ }; &mdss_mdp { qcom,sde-ctl-display-pref = "primary", "none", "none", "none", "none"; qcom,sde-mixer-display-pref = "primary", "none", "none", "none", "none", "none"; connectors = <&dsi_dp1 &dsi_dp2 &sde_dp &sde_wb>; }; drivers/gpu/drm/msm/dp/dp_debug.c +16 −2 Original line number Diff line number Diff line Loading @@ -200,8 +200,7 @@ static ssize_t dp_debug_write_dpcd(struct file *file, goto bail; size = min_t(size_t, count, SZ_2K); if (size <= char_to_nib) if (size < 4) goto bail; buf = kzalloc(size, GFP_KERNEL); Loading Loading @@ -231,6 +230,8 @@ static ssize_t dp_debug_write_dpcd(struct file *file, } size -= 4; if (size == 0) goto bail; dpcd_size = size / char_to_nib; data_len = dpcd_size; Loading Loading @@ -316,6 +317,7 @@ static ssize_t dp_debug_read_dpcd(struct file *file, debug->aux->dpcd_updated(debug->aux); } len = min_t(size_t, count, len); if (!copy_to_user(user_buff, buf, len)) *ppos += len; Loading Loading @@ -647,6 +649,7 @@ static ssize_t dp_debug_max_pclk_khz_read(struct file *file, debug->dp_debug.max_pclk_khz, debug->parser->max_pclk_khz); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); return -EFAULT; Loading Loading @@ -808,6 +811,7 @@ static ssize_t dp_debug_read_connected(struct file *file, len += snprintf(buf, SZ_8, "%d\n", debug->hpd->hpd_high); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) return -EFAULT; Loading Loading @@ -858,6 +862,7 @@ static ssize_t dp_debug_read_hdcp(struct file *file, len = sizeof(debug->dp_debug.hdcp_status); len = min_t(size_t, count, len); if (copy_to_user(user_buff, debug->dp_debug.hdcp_status, len)) return -EFAULT; Loading Loading @@ -921,6 +926,7 @@ static ssize_t dp_debug_read_edid_modes(struct file *file, } mutex_unlock(&connector->dev->mode_config.mutex); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -996,6 +1002,7 @@ static ssize_t dp_debug_read_edid_modes_mst(struct file *file, } mutex_unlock(&connector->dev->mode_config.mutex); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1036,6 +1043,7 @@ static ssize_t dp_debug_read_mst_con_id(struct file *file, ret = snprintf(buf, max_size, "%u\n", debug->mst_con_id); len += ret; len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1099,6 +1107,7 @@ static ssize_t dp_debug_read_mst_conn_info(struct file *file, } mutex_unlock(&debug->dp_debug.dp_mst_connector_list.lock); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1188,6 +1197,7 @@ static ssize_t dp_debug_read_info(struct file *file, char __user *user_buff, if (dp_debug_check_buffer_overflow(rc, &max_size, &len)) goto error; len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) goto error; Loading Loading @@ -1220,6 +1230,7 @@ static ssize_t dp_debug_bw_code_read(struct file *file, len += snprintf(buf + len, (SZ_4K - len), "max_bw_code = %d\n", debug->panel->max_bw_code); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); return -EFAULT; Loading @@ -1245,6 +1256,7 @@ static ssize_t dp_debug_tpg_read(struct file *file, len += snprintf(buf, SZ_8, "%d\n", debug->dp_debug.tpg_state); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) return -EFAULT; Loading Loading @@ -1435,6 +1447,7 @@ static ssize_t dp_debug_read_hdr(struct file *file, goto error; } len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1612,6 +1625,7 @@ static ssize_t dp_debug_read_dump(struct file *file, print_hex_dump(KERN_DEBUG, prefix, DUMP_PREFIX_NONE, 16, 4, buf, len, false); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) return -EFAULT; Loading drivers/gpu/drm/msm/dsi-staging/dsi_drm.c +3 −3 Original line number Diff line number Diff line Loading @@ -186,14 +186,15 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge) return; } SDE_ATRACE_BEGIN("dsi_bridge_pre_enable"); SDE_ATRACE_BEGIN("dsi_display_prepare"); rc = dsi_display_prepare(c_bridge->display); if (rc) { pr_err("[%d] DSI display prepare failed, rc=%d\n", c_bridge->id, rc); SDE_ATRACE_END("dsi_bridge_pre_enable"); SDE_ATRACE_END("dsi_display_prepare"); return; } SDE_ATRACE_END("dsi_display_prepare"); SDE_ATRACE_BEGIN("dsi_display_enable"); rc = dsi_display_enable(c_bridge->display); Loading @@ -203,7 +204,6 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge) (void)dsi_display_unprepare(c_bridge->display); } SDE_ATRACE_END("dsi_display_enable"); SDE_ATRACE_END("dsi_bridge_pre_enable"); rc = dsi_display_splash_res_cleanup(c_bridge->display); if (rc) Loading drivers/gpu/drm/msm/sde/sde_encoder.c +23 −3 Original line number Diff line number Diff line Loading @@ -371,6 +371,24 @@ static int _sde_encoder_get_mode_info(struct drm_encoder *drm_enc, return sde_connector_get_mode_info(conn_state, mode_info); } static bool _sde_encoder_is_autorefresh_enabled( struct sde_encoder_virt *sde_enc) { struct drm_connector *drm_conn; if (!sde_enc->cur_master || !(sde_enc->disp_info.capabilities & MSM_DISPLAY_CAP_CMD_MODE)) return false; drm_conn = sde_enc->cur_master->connector; if (!drm_conn || !drm_conn->state) return false; return sde_connector_get_property(drm_conn->state, CONNECTOR_PROP_AUTOREFRESH) ? true : false; } static bool _sde_encoder_is_dsc_enabled(struct drm_encoder *drm_enc) { struct msm_compression_info *comp_info; Loading Loading @@ -3865,7 +3883,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) u32 pending_kickoff_cnt; struct msm_drm_private *priv = NULL; struct sde_kms *sde_kms = NULL; bool is_vid_mode = false; bool is_regdma_blocking = false, is_vid_mode = false; if (!sde_enc) { SDE_ERROR("invalid encoder\n"); Loading @@ -3874,6 +3892,8 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) is_vid_mode = sde_enc->disp_info.capabilities & MSM_DISPLAY_CAP_VID_MODE; is_regdma_blocking = (is_vid_mode || _sde_encoder_is_autorefresh_enabled(sde_enc)); /* don't perform flush/start operations for slave encoders */ for (i = 0; i < sde_enc->num_phys_encs; i++) { Loading Loading @@ -3902,7 +3922,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) if (!phys->ops.needs_single_flush || !phys->ops.needs_single_flush(phys)) { if (ctl->ops.reg_dma_flush) ctl->ops.reg_dma_flush(ctl, is_vid_mode); ctl->ops.reg_dma_flush(ctl, is_regdma_blocking); _sde_encoder_trigger_flush(&sde_enc->base, phys, 0x0); } else if (ctl->ops.get_pending_flush) { ctl->ops.get_pending_flush(ctl, &pending_flush); Loading @@ -3913,7 +3933,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) if (pending_flush.pending_flush_mask && sde_enc->cur_master) { ctl = sde_enc->cur_master->hw_ctl; if (ctl->ops.reg_dma_flush) ctl->ops.reg_dma_flush(ctl, is_vid_mode); ctl->ops.reg_dma_flush(ctl, is_regdma_blocking); _sde_encoder_trigger_flush(&sde_enc->base, sde_enc->cur_master, &pending_flush); } Loading drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c +2 −0 Original line number Diff line number Diff line Loading @@ -1594,6 +1594,8 @@ static void sde_encoder_phys_wb_disable(struct sde_encoder_phys *phys_enc) exit: phys_enc->enable_state = SDE_ENC_DISABLED; wb_enc->crtc = NULL; phys_enc->hw_cdm = NULL; phys_enc->hw_ctl = NULL; } /** Loading Loading
arch/arm64/boot/dts/qcom/sa8195p-adp-star-display.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -302,5 +302,9 @@ }; &mdss_mdp { qcom,sde-ctl-display-pref = "primary", "none", "none", "none", "none"; qcom,sde-mixer-display-pref = "primary", "none", "none", "none", "none", "none"; connectors = <&dsi_dp1 &dsi_dp2 &sde_dp &sde_wb>; };
drivers/gpu/drm/msm/dp/dp_debug.c +16 −2 Original line number Diff line number Diff line Loading @@ -200,8 +200,7 @@ static ssize_t dp_debug_write_dpcd(struct file *file, goto bail; size = min_t(size_t, count, SZ_2K); if (size <= char_to_nib) if (size < 4) goto bail; buf = kzalloc(size, GFP_KERNEL); Loading Loading @@ -231,6 +230,8 @@ static ssize_t dp_debug_write_dpcd(struct file *file, } size -= 4; if (size == 0) goto bail; dpcd_size = size / char_to_nib; data_len = dpcd_size; Loading Loading @@ -316,6 +317,7 @@ static ssize_t dp_debug_read_dpcd(struct file *file, debug->aux->dpcd_updated(debug->aux); } len = min_t(size_t, count, len); if (!copy_to_user(user_buff, buf, len)) *ppos += len; Loading Loading @@ -647,6 +649,7 @@ static ssize_t dp_debug_max_pclk_khz_read(struct file *file, debug->dp_debug.max_pclk_khz, debug->parser->max_pclk_khz); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); return -EFAULT; Loading Loading @@ -808,6 +811,7 @@ static ssize_t dp_debug_read_connected(struct file *file, len += snprintf(buf, SZ_8, "%d\n", debug->hpd->hpd_high); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) return -EFAULT; Loading Loading @@ -858,6 +862,7 @@ static ssize_t dp_debug_read_hdcp(struct file *file, len = sizeof(debug->dp_debug.hdcp_status); len = min_t(size_t, count, len); if (copy_to_user(user_buff, debug->dp_debug.hdcp_status, len)) return -EFAULT; Loading Loading @@ -921,6 +926,7 @@ static ssize_t dp_debug_read_edid_modes(struct file *file, } mutex_unlock(&connector->dev->mode_config.mutex); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -996,6 +1002,7 @@ static ssize_t dp_debug_read_edid_modes_mst(struct file *file, } mutex_unlock(&connector->dev->mode_config.mutex); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1036,6 +1043,7 @@ static ssize_t dp_debug_read_mst_con_id(struct file *file, ret = snprintf(buf, max_size, "%u\n", debug->mst_con_id); len += ret; len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1099,6 +1107,7 @@ static ssize_t dp_debug_read_mst_conn_info(struct file *file, } mutex_unlock(&debug->dp_debug.dp_mst_connector_list.lock); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1188,6 +1197,7 @@ static ssize_t dp_debug_read_info(struct file *file, char __user *user_buff, if (dp_debug_check_buffer_overflow(rc, &max_size, &len)) goto error; len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) goto error; Loading Loading @@ -1220,6 +1230,7 @@ static ssize_t dp_debug_bw_code_read(struct file *file, len += snprintf(buf + len, (SZ_4K - len), "max_bw_code = %d\n", debug->panel->max_bw_code); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); return -EFAULT; Loading @@ -1245,6 +1256,7 @@ static ssize_t dp_debug_tpg_read(struct file *file, len += snprintf(buf, SZ_8, "%d\n", debug->dp_debug.tpg_state); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) return -EFAULT; Loading Loading @@ -1435,6 +1447,7 @@ static ssize_t dp_debug_read_hdr(struct file *file, goto error; } len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) { kfree(buf); rc = -EFAULT; Loading Loading @@ -1612,6 +1625,7 @@ static ssize_t dp_debug_read_dump(struct file *file, print_hex_dump(KERN_DEBUG, prefix, DUMP_PREFIX_NONE, 16, 4, buf, len, false); len = min_t(size_t, count, len); if (copy_to_user(user_buff, buf, len)) return -EFAULT; Loading
drivers/gpu/drm/msm/dsi-staging/dsi_drm.c +3 −3 Original line number Diff line number Diff line Loading @@ -186,14 +186,15 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge) return; } SDE_ATRACE_BEGIN("dsi_bridge_pre_enable"); SDE_ATRACE_BEGIN("dsi_display_prepare"); rc = dsi_display_prepare(c_bridge->display); if (rc) { pr_err("[%d] DSI display prepare failed, rc=%d\n", c_bridge->id, rc); SDE_ATRACE_END("dsi_bridge_pre_enable"); SDE_ATRACE_END("dsi_display_prepare"); return; } SDE_ATRACE_END("dsi_display_prepare"); SDE_ATRACE_BEGIN("dsi_display_enable"); rc = dsi_display_enable(c_bridge->display); Loading @@ -203,7 +204,6 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge) (void)dsi_display_unprepare(c_bridge->display); } SDE_ATRACE_END("dsi_display_enable"); SDE_ATRACE_END("dsi_bridge_pre_enable"); rc = dsi_display_splash_res_cleanup(c_bridge->display); if (rc) Loading
drivers/gpu/drm/msm/sde/sde_encoder.c +23 −3 Original line number Diff line number Diff line Loading @@ -371,6 +371,24 @@ static int _sde_encoder_get_mode_info(struct drm_encoder *drm_enc, return sde_connector_get_mode_info(conn_state, mode_info); } static bool _sde_encoder_is_autorefresh_enabled( struct sde_encoder_virt *sde_enc) { struct drm_connector *drm_conn; if (!sde_enc->cur_master || !(sde_enc->disp_info.capabilities & MSM_DISPLAY_CAP_CMD_MODE)) return false; drm_conn = sde_enc->cur_master->connector; if (!drm_conn || !drm_conn->state) return false; return sde_connector_get_property(drm_conn->state, CONNECTOR_PROP_AUTOREFRESH) ? true : false; } static bool _sde_encoder_is_dsc_enabled(struct drm_encoder *drm_enc) { struct msm_compression_info *comp_info; Loading Loading @@ -3865,7 +3883,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) u32 pending_kickoff_cnt; struct msm_drm_private *priv = NULL; struct sde_kms *sde_kms = NULL; bool is_vid_mode = false; bool is_regdma_blocking = false, is_vid_mode = false; if (!sde_enc) { SDE_ERROR("invalid encoder\n"); Loading @@ -3874,6 +3892,8 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) is_vid_mode = sde_enc->disp_info.capabilities & MSM_DISPLAY_CAP_VID_MODE; is_regdma_blocking = (is_vid_mode || _sde_encoder_is_autorefresh_enabled(sde_enc)); /* don't perform flush/start operations for slave encoders */ for (i = 0; i < sde_enc->num_phys_encs; i++) { Loading Loading @@ -3902,7 +3922,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) if (!phys->ops.needs_single_flush || !phys->ops.needs_single_flush(phys)) { if (ctl->ops.reg_dma_flush) ctl->ops.reg_dma_flush(ctl, is_vid_mode); ctl->ops.reg_dma_flush(ctl, is_regdma_blocking); _sde_encoder_trigger_flush(&sde_enc->base, phys, 0x0); } else if (ctl->ops.get_pending_flush) { ctl->ops.get_pending_flush(ctl, &pending_flush); Loading @@ -3913,7 +3933,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc) if (pending_flush.pending_flush_mask && sde_enc->cur_master) { ctl = sde_enc->cur_master->hw_ctl; if (ctl->ops.reg_dma_flush) ctl->ops.reg_dma_flush(ctl, is_vid_mode); ctl->ops.reg_dma_flush(ctl, is_regdma_blocking); _sde_encoder_trigger_flush(&sde_enc->base, sde_enc->cur_master, &pending_flush); } Loading
drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c +2 −0 Original line number Diff line number Diff line Loading @@ -1594,6 +1594,8 @@ static void sde_encoder_phys_wb_disable(struct sde_encoder_phys *phys_enc) exit: phys_enc->enable_state = SDE_ENC_DISABLED; wb_enc->crtc = NULL; phys_enc->hw_cdm = NULL; phys_enc->hw_ctl = NULL; } /** Loading