Merge c84b917f06 on remote branch

Change-Id: Ib05d1607188c040afe8553bd8405098bd40dc317
This commit is contained in:
Linux Build Service Account
2023-08-30 22:28:07 -07:00
6 changed files with 26 additions and 16 deletions

View File

@@ -1584,8 +1584,9 @@ static void _sde_crtc_program_lm_output_roi(struct drm_crtc *crtc)
lm_roi = &cstate->lm_roi[lm_idx]; lm_roi = &cstate->lm_roi[lm_idx];
hw_lm = sde_crtc->mixers[lm_idx].hw_lm; hw_lm = sde_crtc->mixers[lm_idx].hw_lm;
if (!sde_crtc->mixers_swapped) right_mixer = lm_idx % MAX_MIXERS_PER_LAYOUT;
right_mixer = lm_idx % MAX_MIXERS_PER_LAYOUT; if (sde_crtc->mixers_swapped)
right_mixer = !right_mixer;
if (lm_roi->w != hw_lm->cfg.out_width || if (lm_roi->w != hw_lm->cfg.out_width ||
lm_roi->h != hw_lm->cfg.out_height || lm_roi->h != hw_lm->cfg.out_height ||

View File

@@ -3385,8 +3385,8 @@ static void sde_encoder_virt_disable(struct drm_encoder *drm_enc)
} }
sde_enc = to_sde_encoder_virt(drm_enc); sde_enc = to_sde_encoder_virt(drm_enc);
if (!sde_enc->cur_master) { if (!sde_enc->cur_master || !sde_enc->cur_master->connector) {
SDE_ERROR("Invalid cur_master\n"); SDE_ERROR("Invalid params\n");
return; return;
} }
sde_conn = to_sde_connector(sde_enc->cur_master->connector); sde_conn = to_sde_connector(sde_enc->cur_master->connector);
@@ -3478,8 +3478,7 @@ static void sde_encoder_virt_disable(struct drm_encoder *drm_enc)
sde_encoder_resource_control(drm_enc, SDE_ENC_RC_EVENT_STOP); sde_encoder_resource_control(drm_enc, SDE_ENC_RC_EVENT_STOP);
/* reset connector topology name property */ /* reset connector topology name property */
if (sde_enc->cur_master && sde_enc->cur_master->connector && if (sde_enc->crtc && sde_enc->crtc->state->active_changed) {
sde_enc->crtc && sde_enc->crtc->state->active_changed) {
ret = sde_rm_update_topology(&sde_kms->rm, ret = sde_rm_update_topology(&sde_kms->rm,
sde_enc->cur_master->connector->state, NULL); sde_enc->cur_master->connector->state, NULL);
if (ret) { if (ret) {

View File

@@ -1949,12 +1949,14 @@ static void _sde_encoder_phys_wb_reset_state(struct sde_encoder_phys *phys_enc)
phys_enc->hw_cdm = NULL; phys_enc->hw_cdm = NULL;
phys_enc->hw_ctl = NULL; phys_enc->hw_ctl = NULL;
phys_enc->in_clone_mode = false; phys_enc->in_clone_mode = false;
kfree(wb_dev->modes);
wb_dev->modes = NULL;
wb_dev->count_modes = 0;
atomic_set(&phys_enc->pending_kickoff_cnt, 0); atomic_set(&phys_enc->pending_kickoff_cnt, 0);
atomic_set(&phys_enc->pending_retire_fence_cnt, 0); atomic_set(&phys_enc->pending_retire_fence_cnt, 0);
atomic_set(&phys_enc->pending_ctl_start_cnt, 0); atomic_set(&phys_enc->pending_ctl_start_cnt, 0);
mutex_lock(&wb_dev->wb_lock);
kfree(wb_dev->modes);
wb_dev->modes = NULL;
wb_dev->count_modes = 0;
mutex_unlock(&wb_dev->wb_lock);
} }
static int _sde_encoder_phys_wb_wait_for_idle(struct sde_encoder_phys *phys_enc, bool force_wait) static int _sde_encoder_phys_wb_wait_for_idle(struct sde_encoder_phys *phys_enc, bool force_wait)

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/ */
@@ -2252,7 +2252,7 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
struct sde_mdss_cfg *cat) struct sde_mdss_cfg *cat)
{ {
struct sde_rm_hw_iter iter_c; struct sde_rm_hw_iter iter_c;
int index = 0, ctl_top_cnt; int index = 0, ctl_top_cnt, splash_disp_count = 0;
struct sde_kms *sde_kms = NULL; struct sde_kms *sde_kms = NULL;
struct sde_hw_mdp *hw_mdp; struct sde_hw_mdp *hw_mdp;
struct sde_splash_display *splash_display; struct sde_splash_display *splash_display;
@@ -2280,7 +2280,7 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
sde_rm_init_hw_iter(&iter_c, 0, SDE_HW_BLK_CTL); sde_rm_init_hw_iter(&iter_c, 0, SDE_HW_BLK_CTL);
while (_sde_rm_get_hw_locked(rm, &iter_c) while (_sde_rm_get_hw_locked(rm, &iter_c)
&& (index < splash_data->num_splash_displays)) { && (splash_disp_count < splash_data->num_splash_displays)) {
struct sde_hw_ctl *ctl = to_sde_hw_ctl(iter_c.blk->hw); struct sde_hw_ctl *ctl = to_sde_hw_ctl(iter_c.blk->hw);
if (!ctl->ops.get_ctl_intf) { if (!ctl->ops.get_ctl_intf) {
@@ -2290,7 +2290,8 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
intf_sel = ctl->ops.get_ctl_intf(ctl); intf_sel = ctl->ops.get_ctl_intf(ctl);
if (intf_sel) { if (intf_sel) {
splash_display = &splash_data->splash_display[index]; splash_display =
&splash_data->splash_display[index ? 1 : 0];
SDE_DEBUG("finding resources for display=%d ctl=%d\n", SDE_DEBUG("finding resources for display=%d ctl=%d\n",
index, iter_c.blk->id - CTL_0); index, iter_c.blk->id - CTL_0);
@@ -2299,6 +2300,7 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
splash_display->cont_splash_enabled = true; splash_display->cont_splash_enabled = true;
splash_display->ctl_ids[splash_display->ctl_cnt++] = splash_display->ctl_ids[splash_display->ctl_cnt++] =
iter_c.blk->id; iter_c.blk->id;
splash_disp_count++;
} }
index++; index++;
} }

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2009-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2009-2021, The Linux Foundation. All rights reserved.
*/ */
@@ -2522,6 +2522,7 @@ int sde_dbg_debugfs_register(struct device *dev)
debugfs_create_file("recovery_reg", 0400, debugfs_root, NULL, &sde_recovery_reg_fops); debugfs_create_file("recovery_reg", 0400, debugfs_root, NULL, &sde_recovery_reg_fops);
debugfs_create_u32("enable", 0600, debugfs_root, &(sde_dbg_base.evtlog->enable)); debugfs_create_u32("enable", 0600, debugfs_root, &(sde_dbg_base.evtlog->enable));
debugfs_create_u32("reglog_enable", 0600, debugfs_root, &(sde_dbg_base.reglog->enable));
debugfs_create_u32("panic", 0600, debugfs_root, &sde_dbg_base.panic_on_err); debugfs_create_u32("panic", 0600, debugfs_root, &sde_dbg_base.panic_on_err);
debugfs_create_u32("dump_mode", 0600, debugfs_root, &sde_dbg_base.dump_option); debugfs_create_u32("dump_mode", 0600, debugfs_root, &sde_dbg_base.dump_option);
debugfs_create_u64("reg_dump_blk_mask", 0600, debugfs_root, &sde_dbg_base.dump_blk_mask); debugfs_create_u64("reg_dump_blk_mask", 0600, debugfs_root, &sde_dbg_base.dump_blk_mask);

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/ */
@@ -100,7 +100,7 @@ void sde_reglog_log(u8 blk_id, u32 val, u32 addr)
struct sde_dbg_reglog *reglog = sde_dbg_base_reglog; struct sde_dbg_reglog *reglog = sde_dbg_base_reglog;
int index; int index;
if (!reglog) if (!reglog || !reglog->enable)
return; return;
index = abs(atomic64_inc_return(&reglog->curr) % SDE_REGLOG_ENTRY); index = abs(atomic64_inc_return(&reglog->curr) % SDE_REGLOG_ENTRY);
@@ -250,6 +250,11 @@ struct sde_dbg_reglog *sde_reglog_init(void)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
atomic64_set(&reglog->curr, 0); atomic64_set(&reglog->curr, 0);
#if IS_ENABLED(CONFIG_DEBUG_FS)
reglog->enable = true;
#else
reglog->enable = false;
#endif
return reglog; return reglog;
} }