mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
Merge 9025759e47 on remote branch
Change-Id: I67490e7925b76fea979a3013675e912b11a7b2bf
This commit is contained in:
commit
adfaaeed54
10 changed files with 213 additions and 4036 deletions
|
|
@ -9,5 +9,5 @@ export CONFIG_DRM_SDE_WB=y
|
|||
export CONFIG_DRM_MSM_REGISTER_LOGGING=y
|
||||
export CONFIG_QCOM_MDSS_PLL=y
|
||||
export CONFIG_DRM_SDE_RSC=y
|
||||
export CONFIG_DISPLAY_BUILD=y
|
||||
export CONFIG_DISPLAY_BUILD=m
|
||||
export CONFIG_DRM_SDE_VM=y
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
*
|
||||
|
|
@ -886,13 +886,13 @@ static int msm_drm_component_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
drm_mode_config_reset(ddev);
|
||||
|
||||
ret = drm_dev_register(ddev, 0);
|
||||
if (ret)
|
||||
goto fail;
|
||||
priv->registered = true;
|
||||
|
||||
drm_mode_config_reset(ddev);
|
||||
|
||||
if (kms && kms->funcs && kms->funcs->cont_splash_config) {
|
||||
ret = kms->funcs->cont_splash_config(kms, NULL);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -3637,8 +3637,11 @@ int sde_crtc_reset_hw(struct drm_crtc *crtc, struct drm_crtc_state *old_state,
|
|||
}
|
||||
|
||||
/* Early out if simple ctl reset succeeded */
|
||||
if (i == sde_crtc->num_ctls)
|
||||
if (i == sde_crtc->num_ctls) {
|
||||
sde_kms_update_recovery_mask(_sde_crtc_get_kms(crtc),
|
||||
crtc, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDE_DEBUG("crtc%d: issuing hard reset\n", DRMID(crtc));
|
||||
|
||||
|
|
@ -3696,6 +3699,8 @@ int sde_crtc_reset_hw(struct drm_crtc *crtc, struct drm_crtc_state *old_state,
|
|||
sde_encoder_kickoff(encoder, false, true);
|
||||
}
|
||||
|
||||
sde_kms_update_recovery_mask(_sde_crtc_get_kms(crtc),
|
||||
crtc, false);
|
||||
/* panic the device if VBIF is not in good state */
|
||||
return !recovery_events ? 0 : -EAGAIN;
|
||||
}
|
||||
|
|
@ -3771,6 +3776,8 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
|||
params.recovery_events_enabled))
|
||||
is_error = true;
|
||||
sde_crtc->needs_hw_reset = false;
|
||||
} else {
|
||||
sde_kms_update_recovery_mask(sde_kms, crtc, false);
|
||||
}
|
||||
|
||||
sde_crtc_calc_fps(sde_crtc);
|
||||
|
|
@ -3791,9 +3798,10 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
|||
|
||||
sde_vbif_clear_errors(sde_kms);
|
||||
|
||||
if (is_error) {
|
||||
if (is_error || sde_kms->recovery_mask) {
|
||||
_sde_crtc_remove_pipe_flush(crtc);
|
||||
_sde_crtc_blend_setup(crtc, old_state, false);
|
||||
SDE_EVT32(sde_kms->recovery_mask);
|
||||
}
|
||||
|
||||
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
|
@ -1328,6 +1328,9 @@ static int _sde_encoder_phys_wb_wait_for_commit_done(
|
|||
_sde_encoder_phys_wb_frame_done_helper(wb_enc, false);
|
||||
}
|
||||
|
||||
if (atomic_read(&phys_enc->pending_retire_fence_cnt) > 1)
|
||||
wait_info.count_check = 1;
|
||||
|
||||
wait_info.wq = &phys_enc->pending_kickoff_wq;
|
||||
wait_info.atomic_cnt = &phys_enc->pending_retire_fence_cnt;
|
||||
wait_info.timeout_ms = max_t(u32, wb_enc->wbdone_timeout,
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ void sde_reg_write(struct sde_hw_blk_reg_map *c,
|
|||
if (c->log_mask & sde_hw_util_log_mask)
|
||||
SDE_DEBUG_DRIVER("[%s:0x%X] <= 0x%X\n",
|
||||
name, c->blk_off + reg_off, val);
|
||||
SDE_EVT32_REGWRITE(c->blk_off, reg_off, val);
|
||||
writel_relaxed(val, c->base_off + c->blk_off + reg_off);
|
||||
SDE_REG_LOG(c->log_mask ? ilog2(c->log_mask)+1 : 0,
|
||||
val, c->blk_off + reg_off);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
*
|
||||
|
|
@ -1512,6 +1512,31 @@ static void sde_kms_complete_commit(struct msm_kms *kms,
|
|||
SDE_ATRACE_END("sde_kms_complete_commit");
|
||||
}
|
||||
|
||||
void sde_kms_update_recovery_mask(struct sde_kms *sde_kms,
|
||||
struct drm_crtc *crtc, bool flag)
|
||||
{
|
||||
int i;
|
||||
struct sde_hw_ctl *ctl;
|
||||
struct sde_crtc *sde_crtc;
|
||||
|
||||
if (!crtc || !sde_kms) {
|
||||
SDE_ERROR("invalid params\n");
|
||||
return;
|
||||
}
|
||||
|
||||
sde_crtc = to_sde_crtc(crtc);
|
||||
|
||||
for (i = 0; i < sde_crtc->num_ctls; ++i) {
|
||||
ctl = sde_crtc->mixers[i].hw_ctl;
|
||||
if (!ctl || !ctl->ops.reset)
|
||||
continue;
|
||||
if (flag)
|
||||
sde_kms->recovery_mask |= BIT(ctl->idx - CTL_0);
|
||||
else
|
||||
sde_kms->recovery_mask &= ~BIT(ctl->idx - CTL_0);
|
||||
}
|
||||
}
|
||||
|
||||
static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
|
||||
struct drm_crtc *crtc)
|
||||
{
|
||||
|
|
@ -1561,6 +1586,8 @@ static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
|
|||
ret = sde_encoder_wait_for_event(encoder, MSM_ENC_COMMIT_DONE);
|
||||
if (ret && ret != -EWOULDBLOCK) {
|
||||
SDE_ERROR("wait for commit done returned %d\n", ret);
|
||||
sde_kms_update_recovery_mask(to_sde_kms(kms),
|
||||
crtc, true);
|
||||
sde_crtc_request_frame_reset(crtc);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
*
|
||||
|
|
@ -274,6 +274,7 @@ struct sde_kms {
|
|||
int irq_num; /* mdss irq number */
|
||||
bool irq_enabled;
|
||||
|
||||
int recovery_mask;
|
||||
struct sde_core_perf perf;
|
||||
|
||||
/* saved atomic state during system suspend */
|
||||
|
|
@ -754,4 +755,14 @@ int sde_kms_vm_trusted_prepare_commit(struct sde_kms *sde_kms,
|
|||
*/
|
||||
int sde_kms_vm_primary_prepare_commit(struct sde_kms *sde_kms,
|
||||
struct drm_atomic_state *state);
|
||||
|
||||
/**
|
||||
* sde_kms_update_recovery_mask - function to update recovery ctl mask
|
||||
* during error cases
|
||||
* @sde_kms: pointer to sde_kms
|
||||
* @crtc: pointer to drm_crtc
|
||||
* @flag: to determine whether to clear/set recovery mask
|
||||
*/
|
||||
void sde_kms_update_recovery_mask(struct sde_kms *sde_kms,
|
||||
struct drm_crtc *crtc, bool flag);
|
||||
#endif /* __sde_kms_H__ */
|
||||
|
|
|
|||
4168
msm/sde_dbg.c
4168
msm/sde_dbg.c
File diff suppressed because it is too large
Load diff
|
|
@ -35,6 +35,7 @@ enum sde_dbg_evtlog_flag {
|
|||
SDE_EVTLOG_IRQ = BIT(1),
|
||||
SDE_EVTLOG_VERBOSE = BIT(2),
|
||||
SDE_EVTLOG_EXTERNAL = BIT(3),
|
||||
SDE_EVTLOG_REGWRITE = BIT(4),
|
||||
SDE_EVTLOG_ALWAYS = -1
|
||||
};
|
||||
|
||||
|
|
@ -200,6 +201,13 @@ extern struct sde_dbg_reglog *sde_dbg_base_reglog;
|
|||
#define SDE_EVT32_EXTERNAL(...) sde_evtlog_log(sde_dbg_base_evtlog, __func__, \
|
||||
__LINE__, SDE_EVTLOG_EXTERNAL, ##__VA_ARGS__, \
|
||||
SDE_EVTLOG_DATA_LIMITER)
|
||||
/**
|
||||
* SDE_EVT32_REGWRITE - Write a list of 32bit values for register writes logging
|
||||
* ... - variable arguments
|
||||
*/
|
||||
#define SDE_EVT32_REGWRITE(...) sde_evtlog_log(sde_dbg_base_evtlog, __func__, \
|
||||
__LINE__, SDE_EVTLOG_REGWRITE, ##__VA_ARGS__, \
|
||||
SDE_EVTLOG_DATA_LIMITER)
|
||||
|
||||
/**
|
||||
* SDE_DBG_DUMP - trigger dumping of all sde_dbg facilities
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ void dss_reg_w(struct dss_io_data *io, u32 offset, u32 value, u32 debug)
|
|||
DEV_DBG("[%08x] => %08x [%08x]\n",
|
||||
(u32)(unsigned long)(io->base + offset),
|
||||
value, in_val);
|
||||
SDE_EVT32_REGWRITE(io->base, offset, value, in_val);
|
||||
}
|
||||
SDE_REG_LOG(SDE_REG_LOG_RSCC, value, offset);
|
||||
} /* dss_reg_w */
|
||||
|
|
|
|||
Loading…
Reference in a new issue