disp: msm: move from drm_mode to msm_mode

Move away from the private and private_flags fields from drm_mode,
as it is being deprecated in latest kernel version. Instead, Add
msm_display_mode as a wrapper to be used in downstream to store these
parameters. Also, store msm_mode in connector_state to be accessed
in commit path.

Change-Id: Ia5bdebe75f00aa15fb7db4dc3a0d50c30894a95c
Signed-off-by: Orion Brody <obrody@codeaurora.org>
This commit is contained in:
orion brody
2020-11-24 14:19:42 -08:00
parent 262099e94a
commit d00d481360
12 changed files with 396 additions and 169 deletions

View File

@@ -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__
@@ -1152,23 +1152,25 @@ static void sde_encoder_phys_vid_handle_post_kickoff(
static void sde_encoder_phys_vid_prepare_for_commit(
struct sde_encoder_phys *phys_enc)
{
struct drm_crtc *crtc;
struct sde_connector_state *c_state;
if (!phys_enc || !phys_enc->parent) {
SDE_ERROR("invalid encoder parameters\n");
return;
}
crtc = phys_enc->parent->crtc;
if (!crtc || !crtc->state) {
SDE_ERROR("invalid crtc state\n");
return;
}
if (phys_enc->connector && phys_enc->connector->state) {
c_state = to_sde_connector_state(phys_enc->connector->state);
if (!c_state) {
SDE_ERROR("invalid connector state\n");
return;
}
if (!msm_is_mode_seamless_vrr(&crtc->state->adjusted_mode)
if (!msm_is_mode_seamless_vrr(&c_state->msm_mode)
&& sde_connector_is_qsync_updated(phys_enc->connector))
_sde_encoder_phys_vid_avr_ctrl(phys_enc);
_sde_encoder_phys_vid_avr_ctrl(phys_enc);
}
}
static void sde_encoder_phys_vid_irq_control(struct sde_encoder_phys *phys_enc,