disp: msm: sde: avoid seamless crtc transition when CWB is enabled
Add changes to avoid primary crtc seamless transition when CWB is enabled in bootup first commit. This ensures atomic_enable gets called for primary crtc in splash handoff commit and software states get updated. Change-Id: I7faab3e4839ab6a69023790ee2874250091f32f0 Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This commit is contained in:
parent
c93cae7d78
commit
a799d5f7b6
@ -34,13 +34,17 @@ struct msm_commit {
|
||||
struct kthread_work commit_work;
|
||||
};
|
||||
|
||||
static inline bool _msm_seamless_for_crtc(struct drm_atomic_state *state,
|
||||
static inline bool _msm_seamless_for_crtc(struct drm_device *dev,
|
||||
struct drm_atomic_state *state,
|
||||
struct drm_crtc_state *crtc_state, bool enable)
|
||||
{
|
||||
struct drm_connector *connector = NULL;
|
||||
struct drm_connector_state *conn_state = NULL;
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct msm_kms *kms = priv->kms;
|
||||
int i = 0;
|
||||
int conn_cnt = 0;
|
||||
bool splash_en = false;
|
||||
|
||||
if (msm_is_mode_seamless(&crtc_state->mode) ||
|
||||
msm_is_mode_seamless_vrr(&crtc_state->adjusted_mode) ||
|
||||
@ -59,7 +63,11 @@ static inline bool _msm_seamless_for_crtc(struct drm_atomic_state *state,
|
||||
crtc_state->crtc))
|
||||
conn_cnt++;
|
||||
|
||||
if (MULTIPLE_CONN_DETECTED(conn_cnt))
|
||||
if (kms && kms->funcs && kms->funcs->check_for_splash)
|
||||
splash_en = kms->funcs->check_for_splash(kms,
|
||||
crtc_state->crtc);
|
||||
|
||||
if (MULTIPLE_CONN_DETECTED(conn_cnt) && !splash_en)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -214,7 +222,7 @@ msm_disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
|
||||
if (!old_crtc_state->active)
|
||||
continue;
|
||||
|
||||
if (_msm_seamless_for_crtc(old_state, crtc->state, false))
|
||||
if (_msm_seamless_for_crtc(dev, old_state, crtc->state, false))
|
||||
continue;
|
||||
|
||||
funcs = crtc->helper_private;
|
||||
@ -362,7 +370,7 @@ static void msm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
if (!new_crtc_state->active)
|
||||
continue;
|
||||
|
||||
if (_msm_seamless_for_crtc(old_state, crtc->state, true))
|
||||
if (_msm_seamless_for_crtc(dev, old_state, crtc->state, true))
|
||||
continue;
|
||||
|
||||
funcs = crtc->helper_private;
|
||||
|
@ -1030,7 +1030,7 @@ static void msm_lastclose(struct drm_device *dev)
|
||||
* commit then ignore the last close call
|
||||
*/
|
||||
if (kms->funcs && kms->funcs->check_for_splash
|
||||
&& kms->funcs->check_for_splash(kms))
|
||||
&& kms->funcs->check_for_splash(kms, NULL))
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@ -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>
|
||||
*
|
||||
@ -124,7 +124,7 @@ struct msm_kms_funcs {
|
||||
int (*cont_splash_config)(struct msm_kms *kms,
|
||||
struct drm_atomic_state *state);
|
||||
/* check for continuous splash status */
|
||||
bool (*check_for_splash)(struct msm_kms *kms);
|
||||
bool (*check_for_splash)(struct msm_kms *kms, struct drm_crtc *crtc);
|
||||
/* topology lm information */
|
||||
int (*get_mixer_count)(const struct msm_kms *kms,
|
||||
const struct drm_display_mode *mode,
|
||||
|
@ -3253,9 +3253,10 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static bool sde_kms_check_for_splash(struct msm_kms *kms)
|
||||
static bool sde_kms_check_for_splash(struct msm_kms *kms, struct drm_crtc *crtc)
|
||||
{
|
||||
struct sde_kms *sde_kms;
|
||||
struct drm_encoder *encoder;
|
||||
|
||||
if (!kms) {
|
||||
SDE_ERROR("invalid kms\n");
|
||||
@ -3263,7 +3264,16 @@ static bool sde_kms_check_for_splash(struct msm_kms *kms)
|
||||
}
|
||||
|
||||
sde_kms = to_sde_kms(kms);
|
||||
return sde_kms->splash_data.num_splash_displays;
|
||||
if (!crtc || !sde_kms->splash_data.num_splash_displays)
|
||||
return sde_kms->splash_data.num_splash_displays;
|
||||
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev,
|
||||
crtc->state->encoder_mask) {
|
||||
if (sde_encoder_in_cont_splash(encoder))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int sde_kms_get_mixer_count(const struct msm_kms *kms,
|
||||
|
Loading…
Reference in New Issue
Block a user