disp: msm: sde: add support for CTL done irq

From Kalama, the HW scheduler abstracts the low level
PP_DONE/WB_DONE interrupts and generates a common
CTL_DONE interrupt per hw ctl. This saves the software
the irq latency delays to process the frame complete
operations when multiple encoders are involved.

If supported, this change enables and waits for the
CTL_DONE interrupt instead of PP_DONE and WB_DONE.

This change adds support to wait for CTL_DONE irq in
only command mode panels as we don't drive two WB blocks
with single CTL.

Change-Id: I084d6bfb6a9fb0b48f912fe5787401c460ec5b56
Signed-off-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com>
This commit is contained in:
Jeykumar Sankaran
2021-06-15 21:25:08 -07:00
parent 4df7bb68dc
commit 39e7775bff
8 changed files with 129 additions and 27 deletions

View File

@@ -1,4 +1,5 @@
/*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
* Copyright (C) 2013 Red Hat
* Author: Rob Clark <robdclark@gmail.com>
@@ -182,6 +183,8 @@ enum sde_enc_rc_states {
* next update is triggered.
* @autorefresh_solver_disable It tracks if solver state is disabled from this
* encoder due to autorefresh concurrency.
* @ctl_done_supported boolean flag to indicate the availability of
* ctl done irq support for the hardware
*/
struct sde_encoder_virt {
struct drm_encoder base;
@@ -248,6 +251,7 @@ struct sde_encoder_virt {
struct msm_mode_info mode_info;
bool delay_kickoff;
bool autorefresh_solver_disable;
bool ctl_done_supported;
};
#define to_sde_encoder_virt(x) container_of(x, struct sde_encoder_virt, base)
@@ -524,6 +528,19 @@ bool sde_encoder_is_primary_display(struct drm_encoder *enc);
*/
bool sde_encoder_is_built_in_display(struct drm_encoder *enc);
/**
* sde_encoder_check_ctl_done_support - checks if ctl_done irq is available
* for the display
* @drm_enc: Pointer to drm encoder structure
* @Return: true if scheduler update is enabled
*/
static inline bool sde_encoder_check_ctl_done_support(struct drm_encoder *drm_enc)
{
struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc);
return sde_enc && sde_enc->ctl_done_supported;
}
/**
* sde_encoder_is_dsi_display - checks if underlying display is DSI
* display or not.