disp: msm: sde: remove rotator llcc

Rotator llcc is no longer supported. This change removes the
unused code.

Change-Id: Ia1d95e3f4386d25e0d2e06a87802b3f5b694998d
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:
Nilaan Gunabalachandran
2021-03-16 13:19:00 -04:00
parent 97152213d7
commit b9cfa5b37f
4 changed files with 22 additions and 95 deletions

View File

@@ -327,7 +327,7 @@ static int _sde_core_perf_activate_llcc(struct sde_kms *kms,
struct drm_device *drm_dev; struct drm_device *drm_dev;
struct device *dev; struct device *dev;
struct platform_device *pdev; struct platform_device *pdev;
u32 llcc_id[SDE_SYS_CACHE_MAX] = {LLCC_ROTATOR, LLCC_DISP}; u32 llcc_id[SDE_SYS_CACHE_MAX] = {LLCC_DISP};
int rc = 0; int rc = 0;
if (!kms || !kms->dev || !kms->dev->dev) { if (!kms || !kms->dev || !kms->dev->dev) {
@@ -421,7 +421,7 @@ void sde_core_perf_crtc_update_llcc(struct drm_crtc *crtc)
struct sde_kms *kms; struct sde_kms *kms;
struct sde_crtc *sde_crtc; struct sde_crtc *sde_crtc;
struct sde_core_perf_params *old, *new; struct sde_core_perf_params *old, *new;
int update_llcc[SDE_SYS_CACHE_MAX] = {0, 0}; int update_llcc[SDE_SYS_CACHE_MAX] = {0};
int i; int i;
if (!crtc) { if (!crtc) {

View File

@@ -1450,7 +1450,6 @@ static int _sde_sspp_setup_vigs(struct device_node *np,
struct sde_dt_props *props[SSPP_SUBBLK_COUNT_MAX] = {NULL, NULL}; struct sde_dt_props *props[SSPP_SUBBLK_COUNT_MAX] = {NULL, NULL};
struct sde_dt_props *props_tmp = NULL; struct sde_dt_props *props_tmp = NULL;
struct device_node *snp = NULL; struct device_node *snp = NULL;
struct sde_sc_cfg *sc_cfg = sde_cfg->sc_cfg;
int vig_count = 0, vcm_count = 0; int vig_count = 0, vcm_count = 0;
const char *type; const char *type;
@@ -1616,14 +1615,6 @@ static int _sde_sspp_setup_vigs(struct device_node *np,
MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT; MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT;
} }
if (sc_cfg[SDE_SYS_CACHE_ROT].has_sys_cache) {
set_bit(SDE_PERF_SSPP_SYS_CACHE, &sspp->perf_features);
sblk->llcc_scid =
sc_cfg[SDE_SYS_CACHE_ROT].llcc_scid;
sblk->llcc_slice_size =
sc_cfg[SDE_SYS_CACHE_ROT].llcc_slice_size;
}
if (sde_cfg->inline_disable_const_clr) if (sde_cfg->inline_disable_const_clr)
set_bit(SDE_SSPP_INLINE_CONST_CLR, &sspp->features); set_bit(SDE_SSPP_INLINE_CONST_CLR, &sspp->features);
@@ -3477,11 +3468,8 @@ static int sde_cache_parse_dt(struct device_node *np,
struct sde_mdss_cfg *sde_cfg) struct sde_mdss_cfg *sde_cfg)
{ {
struct llcc_slice_desc *slice; struct llcc_slice_desc *slice;
struct platform_device *pdev;
struct of_phandle_args phargs;
struct sde_sc_cfg *sc_cfg = sde_cfg->sc_cfg; struct sde_sc_cfg *sc_cfg = sde_cfg->sc_cfg;
struct device_node *llcc_node; struct device_node *llcc_node;
int rc = 0;
if (!sde_cfg) { if (!sde_cfg) {
SDE_ERROR("invalid argument\n"); SDE_ERROR("invalid argument\n");
@@ -3499,67 +3487,19 @@ static int sde_cache_parse_dt(struct device_node *np,
slice = llcc_slice_getd(LLCC_DISP); slice = llcc_slice_getd(LLCC_DISP);
if (IS_ERR_OR_NULL(slice)) { if (IS_ERR_OR_NULL(slice)) {
SDE_ERROR("failed to get system cache %ld\n", SDE_ERROR("failed to get system cache %ld\n", PTR_ERR(slice));
PTR_ERR(slice)); return -EINVAL;
} else {
sc_cfg[SDE_SYS_CACHE_DISP].has_sys_cache = true;
sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid = llcc_get_slice_id(slice);
sc_cfg[SDE_SYS_CACHE_DISP].llcc_slice_size =
llcc_get_slice_size(slice);
SDE_DEBUG("img cache scid:%d slice_size:%zu kb\n",
sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid,
sc_cfg[SDE_SYS_CACHE_DISP].llcc_slice_size);
llcc_slice_putd(slice);
} }
/* Read inline rot node */ sc_cfg[SDE_SYS_CACHE_DISP].has_sys_cache = true;
rc = of_parse_phandle_with_args(np, sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid = llcc_get_slice_id(slice);
"qcom,sde-inline-rotator", "#list-cells", 0, &phargs); sc_cfg[SDE_SYS_CACHE_DISP].llcc_slice_size = llcc_get_slice_size(slice);
if (rc) { SDE_DEBUG("img cache scid:%d slice_size:%zu kb\n",
/* sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid,
* This is not a fatal error, system cache can be disabled sc_cfg[SDE_SYS_CACHE_DISP].llcc_slice_size);
* in device tree
*/
SDE_DEBUG("sys cache will be disabled rc:%d\n", rc);
rc = 0;
goto end;
}
if (!phargs.np || !phargs.args_count) {
SDE_ERROR("wrong phandle args %d %d\n",
!phargs.np, !phargs.args_count);
rc = -EINVAL;
goto end;
}
pdev = of_find_device_by_node(phargs.np);
if (!pdev) {
SDE_ERROR("invalid sde rotator node\n");
goto end;
}
slice = llcc_slice_getd(LLCC_ROTATOR);
if (IS_ERR_OR_NULL(slice)) {
SDE_ERROR("failed to get rotator slice!\n");
rc = -EINVAL;
goto cleanup;
}
sc_cfg[SDE_SYS_CACHE_ROT].llcc_scid = llcc_get_slice_id(slice);
sc_cfg[SDE_SYS_CACHE_ROT].llcc_slice_size =
llcc_get_slice_size(slice);
llcc_slice_putd(slice); llcc_slice_putd(slice);
sc_cfg[SDE_SYS_CACHE_ROT].has_sys_cache = true; return 0;
SDE_DEBUG("rotator llcc scid:%d slice_size:%zukb\n",
sc_cfg[SDE_SYS_CACHE_ROT].llcc_scid,
sc_cfg[SDE_SYS_CACHE_ROT].llcc_slice_size);
cleanup:
of_node_put(phargs.np);
end:
return rc;
} }
static int _sde_vbif_populate_ot_parsing(struct sde_vbif_cfg *vbif, static int _sde_vbif_populate_ot_parsing(struct sde_vbif_cfg *vbif,

View File

@@ -165,14 +165,14 @@ enum {
/** /**
* sde_sys_cache_type: Types of system cache supported * sde_sys_cache_type: Types of system cache supported
* SDE_SYS_CACHE_ROT: Rotator system cache
* SDE_SYS_CACHE_DISP: Static img system cache * SDE_SYS_CACHE_DISP: Static img system cache
* SDE_SYS_CACHE_MAX: Maximum number of sys cache users
* SDE_SYS_CACHE_NONE: Sys cache not used
*/ */
enum sde_sys_cache_type { enum sde_sys_cache_type {
SDE_SYS_CACHE_ROT,
SDE_SYS_CACHE_DISP, SDE_SYS_CACHE_DISP,
SDE_SYS_CACHE_MAX, SDE_SYS_CACHE_MAX,
SDE_SYS_CACHE_NONE SDE_SYS_CACHE_NONE = SDE_SYS_CACHE_MAX
}; };
/** /**

View File

@@ -2761,19 +2761,18 @@ void sde_plane_set_error(struct drm_plane *plane, bool error)
} }
static void _sde_plane_sspp_setup_sys_cache(struct sde_plane *psde, static void _sde_plane_sspp_setup_sys_cache(struct sde_plane *psde,
struct sde_plane_state *pstate, bool is_tp10) struct sde_plane_state *pstate)
{ {
struct sde_sc_cfg *sc_cfg = psde->catalog->sc_cfg; struct sde_sc_cfg *sc_cfg = psde->catalog->sc_cfg;
bool prev_rd_en; bool prev_rd_en;
if (!psde->pipe_hw->ops.setup_sys_cache || /* Only display system cache is currently supported */
!(psde->perf_features & BIT(SDE_PERF_SSPP_SYS_CACHE))) if (!sc_cfg[SDE_SYS_CACHE_DISP].has_sys_cache)
return; return;
prev_rd_en = pstate->sc_cfg.rd_en; prev_rd_en = pstate->sc_cfg.rd_en;
SDE_DEBUG("features:0x%x rotation:0x%x\n", SDE_DEBUG_PLANE(psde, "features:0x%x\n", psde->features);
psde->features, pstate->rotation);
pstate->sc_cfg.rd_en = false; pstate->sc_cfg.rd_en = false;
pstate->sc_cfg.rd_scid = 0x0; pstate->sc_cfg.rd_scid = 0x0;
@@ -2781,17 +2780,7 @@ static void _sde_plane_sspp_setup_sys_cache(struct sde_plane *psde,
SSPP_SYS_CACHE_SCID; SSPP_SYS_CACHE_SCID;
pstate->sc_cfg.type = SDE_SYS_CACHE_NONE; pstate->sc_cfg.type = SDE_SYS_CACHE_NONE;
if (pstate->rotation & DRM_MODE_ROTATE_90) { if (pstate->static_cache_state == CACHE_STATE_FRAME_WRITE) {
if (is_tp10 && sc_cfg[SDE_SYS_CACHE_ROT].has_sys_cache) {
pstate->sc_cfg.rd_en = true;
pstate->sc_cfg.rd_scid =
sc_cfg[SDE_SYS_CACHE_ROT].llcc_scid;
pstate->sc_cfg.flags = SSPP_SYS_CACHE_EN_FLAG |
SSPP_SYS_CACHE_SCID;
pstate->sc_cfg.type = SDE_SYS_CACHE_ROT;
}
} else if (pstate->static_cache_state == CACHE_STATE_FRAME_WRITE &&
sc_cfg[SDE_SYS_CACHE_DISP].has_sys_cache) {
pstate->sc_cfg.rd_en = true; pstate->sc_cfg.rd_en = true;
pstate->sc_cfg.rd_scid = pstate->sc_cfg.rd_scid =
sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid; sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid;
@@ -2799,8 +2788,7 @@ static void _sde_plane_sspp_setup_sys_cache(struct sde_plane *psde,
pstate->sc_cfg.flags = SSPP_SYS_CACHE_EN_FLAG | pstate->sc_cfg.flags = SSPP_SYS_CACHE_EN_FLAG |
SSPP_SYS_CACHE_SCID | SSPP_SYS_CACHE_NO_ALLOC; SSPP_SYS_CACHE_SCID | SSPP_SYS_CACHE_NO_ALLOC;
pstate->sc_cfg.type = SDE_SYS_CACHE_DISP; pstate->sc_cfg.type = SDE_SYS_CACHE_DISP;
} else if (pstate->static_cache_state == CACHE_STATE_FRAME_READ && } else if (pstate->static_cache_state == CACHE_STATE_FRAME_READ) {
sc_cfg[SDE_SYS_CACHE_DISP].has_sys_cache) {
pstate->sc_cfg.rd_en = true; pstate->sc_cfg.rd_en = true;
pstate->sc_cfg.rd_scid = pstate->sc_cfg.rd_scid =
sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid; sc_cfg[SDE_SYS_CACHE_DISP].llcc_scid;
@@ -2837,7 +2825,7 @@ void sde_plane_static_img_control(struct drm_plane *plane,
pstate->static_cache_state = state; pstate->static_cache_state = state;
if (state == CACHE_STATE_FRAME_WRITE || state == CACHE_STATE_FRAME_READ) if (state == CACHE_STATE_FRAME_WRITE || state == CACHE_STATE_FRAME_READ)
_sde_plane_sspp_setup_sys_cache(psde, pstate, false); _sde_plane_sspp_setup_sys_cache(psde, pstate);
} }
static void _sde_plane_map_prop_to_dirty_bits(void) static void _sde_plane_map_prop_to_dirty_bits(void)
@@ -3121,8 +3109,7 @@ static void _sde_plane_update_format_and_rects(struct sde_plane *psde,
pstate->multirect_index); pstate->multirect_index);
} }
_sde_plane_sspp_setup_sys_cache(psde, pstate, _sde_plane_sspp_setup_sys_cache(psde, pstate);
sde_format_is_tp10_ubwc(fmt));
/* update csc */ /* update csc */
if (SDE_FORMAT_IS_YUV(fmt)) if (SDE_FORMAT_IS_YUV(fmt))