mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 12:59:33 -04:00
drm/msm/dpu: simplify qos_ctrl handling
After removal of DPU_PLANE_QOS_VBLANK_CTRL, several fields of struct dpu_hw_pipe_qos_cfg are fixed to false/0. Drop them from the structure (and drop the corresponding code from the functions). The DPU_PLANE_QOS_VBLANK_AMORTIZE flag is also removed, since it is now a NOP. Reviewed-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/537909/ Link: https://lore.kernel.org/r/20230518222238.3815293-7-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
@@ -573,16 +573,6 @@ static void dpu_hw_sspp_setup_qos_ctrl(struct dpu_hw_sspp *ctx,
|
||||
if (!ctx)
|
||||
return;
|
||||
|
||||
if (cfg->vblank_en) {
|
||||
qos_ctrl |= ((cfg->creq_vblank &
|
||||
SSPP_QOS_CTRL_CREQ_VBLANK_MASK) <<
|
||||
SSPP_QOS_CTRL_CREQ_VBLANK_OFF);
|
||||
qos_ctrl |= ((cfg->danger_vblank &
|
||||
SSPP_QOS_CTRL_DANGER_VBLANK_MASK) <<
|
||||
SSPP_QOS_CTRL_DANGER_VBLANK_OFF);
|
||||
qos_ctrl |= SSPP_QOS_CTRL_VBLANK_EN;
|
||||
}
|
||||
|
||||
if (cfg->danger_safe_en)
|
||||
qos_ctrl |= SSPP_QOS_CTRL_DANGER_SAFE_EN;
|
||||
|
||||
|
||||
@@ -165,15 +165,9 @@ struct dpu_sw_pipe_cfg {
|
||||
|
||||
/**
|
||||
* struct dpu_hw_pipe_qos_cfg : Source pipe QoS configuration
|
||||
* @creq_vblank: creq value generated to vbif during vertical blanking
|
||||
* @danger_vblank: danger value generated during vertical blanking
|
||||
* @vblank_en: enable creq_vblank and danger_vblank during vblank
|
||||
* @danger_safe_en: enable danger safe generation
|
||||
*/
|
||||
struct dpu_hw_pipe_qos_cfg {
|
||||
u32 creq_vblank;
|
||||
u32 danger_vblank;
|
||||
bool vblank_en;
|
||||
bool danger_safe_en;
|
||||
};
|
||||
|
||||
|
||||
@@ -73,12 +73,9 @@ static const uint32_t qcom_compressed_supported_formats[] = {
|
||||
/**
|
||||
* enum dpu_plane_qos - Different qos configurations for each pipe
|
||||
*
|
||||
* @DPU_PLANE_QOS_VBLANK_AMORTIZE: Enables Amortization within pipe.
|
||||
* this configuration is mutually exclusive from VBLANK_CTRL.
|
||||
* @DPU_PLANE_QOS_PANIC_CTRL: Setup panic for the pipe.
|
||||
*/
|
||||
enum dpu_plane_qos {
|
||||
DPU_PLANE_QOS_VBLANK_AMORTIZE = BIT(1),
|
||||
DPU_PLANE_QOS_PANIC_CTRL = BIT(2),
|
||||
};
|
||||
|
||||
@@ -359,25 +356,15 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane,
|
||||
|
||||
memset(&pipe_qos_cfg, 0, sizeof(pipe_qos_cfg));
|
||||
|
||||
if (flags & DPU_PLANE_QOS_VBLANK_AMORTIZE) {
|
||||
pipe_qos_cfg.vblank_en = false;
|
||||
pipe_qos_cfg.creq_vblank = 0; /* clear vblank bits */
|
||||
}
|
||||
|
||||
if (flags & DPU_PLANE_QOS_PANIC_CTRL)
|
||||
pipe_qos_cfg.danger_safe_en = enable;
|
||||
|
||||
if (!pdpu->is_rt_pipe) {
|
||||
pipe_qos_cfg.vblank_en = false;
|
||||
if (!pdpu->is_rt_pipe)
|
||||
pipe_qos_cfg.danger_safe_en = false;
|
||||
}
|
||||
|
||||
DPU_DEBUG_PLANE(pdpu, "pnum:%d ds:%d vb:%d pri[0x%x, 0x%x] is_rt:%d\n",
|
||||
DPU_DEBUG_PLANE(pdpu, "pnum:%d ds:%d is_rt:%d\n",
|
||||
pdpu->pipe - SSPP_VIG0,
|
||||
pipe_qos_cfg.danger_safe_en,
|
||||
pipe_qos_cfg.vblank_en,
|
||||
pipe_qos_cfg.creq_vblank,
|
||||
pipe_qos_cfg.danger_vblank,
|
||||
pdpu->is_rt_pipe);
|
||||
|
||||
pipe->sspp->ops.setup_qos_ctrl(pipe->sspp,
|
||||
|
||||
Reference in New Issue
Block a user