Merge "disp: msm: sde: reset plane cache state on plane disable"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
99e41b7489
@@ -3485,6 +3485,17 @@ static int sde_cache_parse_dt(struct device_node *np,
|
||||
struct llcc_slice_desc *slice;
|
||||
struct device_node *llcc_node;
|
||||
int i;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
const u32 sde_sys_cache_usecase_id[SDE_SYS_CACHE_MAX] = {
|
||||
[SDE_SYS_CACHE_DISP] = LLCC_DISP,
|
||||
[SDE_SYS_CACHE_DISP_WB] = LLCC_DISP_WB,
|
||||
};
|
||||
#else
|
||||
const u32 sde_sys_cache_usecase_id[SDE_SYS_CACHE_MAX] = {
|
||||
[SDE_SYS_CACHE_DISP] = LLCC_DISP,
|
||||
[SDE_SYS_CACHE_DISP_WB] = 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
if (!sde_cfg) {
|
||||
SDE_ERROR("invalid argument\n");
|
||||
@@ -3504,23 +3515,12 @@ static int sde_cache_parse_dt(struct device_node *np,
|
||||
if (!sc_cfg->has_sys_cache)
|
||||
continue;
|
||||
|
||||
switch (i) {
|
||||
case SDE_SYS_CACHE_DISP:
|
||||
usecase_id = LLCC_DISP;
|
||||
break;
|
||||
|
||||
case SDE_SYS_CACHE_DISP_WB:
|
||||
usecase_id = LLCC_DISP;
|
||||
break;
|
||||
|
||||
default:
|
||||
usecase_id = 0;
|
||||
SDE_DEBUG("invalid sys cache:%d\n", i);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!usecase_id)
|
||||
usecase_id = sde_sys_cache_usecase_id[i];
|
||||
if (!usecase_id) {
|
||||
sc_cfg->has_sys_cache = false;
|
||||
SDE_DEBUG("invalid usecase-id for sys cache:%d\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
slice = llcc_slice_getd(usecase_id);
|
||||
if (IS_ERR_OR_NULL(slice)) {
|
||||
@@ -5148,6 +5148,7 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
|
||||
set_bit(SDE_FEATURE_CTL_DONE, sde_cfg->features);
|
||||
set_bit(SDE_FEATURE_TRUSTED_VM, sde_cfg->features);
|
||||
sde_cfg->sc_cfg[SDE_SYS_CACHE_DISP].has_sys_cache = true;
|
||||
sde_cfg->sc_cfg[SDE_SYS_CACHE_DISP_WB].has_sys_cache = true;
|
||||
sde_cfg->allowed_dsc_reservation_switch = SDE_DP_DSC_RESERVATION_SWITCH;
|
||||
sde_cfg->autorefresh_disable_seq = AUTOREFRESH_DISABLE_SEQ2;
|
||||
sde_cfg->perf.min_prefill_lines = 40;
|
||||
|
@@ -3495,6 +3495,7 @@ static void _sde_plane_atomic_disable(struct drm_plane *plane,
|
||||
pstate->multirect_mode);
|
||||
|
||||
pstate->pending = true;
|
||||
pstate->static_cache_state = CACHE_STATE_DISABLED;
|
||||
|
||||
if (is_sde_plane_virtual(plane))
|
||||
multirect_index = SDE_SSPP_RECT_1;
|
||||
@@ -4350,6 +4351,8 @@ int sde_plane_helper_reset_custom_properties(struct drm_plane *plane,
|
||||
psde = to_sde_plane(plane);
|
||||
pstate = to_sde_plane_state(plane_state);
|
||||
|
||||
pstate->static_cache_state = CACHE_STATE_DISABLED;
|
||||
|
||||
for (prop_idx = 0; prop_idx < PLANE_PROP_COUNT; prop_idx++) {
|
||||
uint64_t val = pstate->property_values[prop_idx].value;
|
||||
uint64_t def;
|
||||
|
Reference in New Issue
Block a user