Merge "disp: msm: sde: update syscache properties only if supported"

This commit is contained in:
qctecmdr 2020-09-09 09:11:53 -07:00 • committed by Gerrit - the friendly Code Review server
commit 89d84e6da6

View file

@ -5381,7 +5381,8 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
ARRAY_SIZE(e_secure_level), 0,
CRTC_PROP_SECURITY_LEVEL);
msm_property_install_enum(&sde_crtc->property_info, "cache_state",
if (catalog->syscache_supported)
msm_property_install_enum(&sde_crtc->property_info, "cache_state",
0x0, 0, e_cache_state,
ARRAY_SIZE(e_cache_state), 0,
CRTC_PROP_CACHE_STATE);
@ -6351,10 +6352,22 @@ void sde_crtc_static_img_control(struct drm_crtc *crtc,
{
struct drm_plane *plane;
struct sde_crtc *sde_crtc;
struct sde_kms *sde_kms;
if (!crtc || !crtc->dev)
return;
sde_kms = _sde_crtc_get_kms(crtc);
if (!sde_kms || !sde_kms->catalog) {
SDE_ERROR("invalid params\n");
return;
}
if (!sde_kms->catalog->syscache_supported) {
SDE_DEBUG("syscache not supported\n");
return;
}
sde_crtc = to_sde_crtc(crtc);
if (sde_crtc->cache_state == state)
return;