From 842e86013ec5a3523dc22ddced613376f25444a2 Mon Sep 17 00:00:00 2001 From: Abhijit Kulkarni Date: Tue, 2 Jun 2020 16:04:20 -0700 Subject: [PATCH] disp: msm: sde: allow rect1 only configuration This change allows the configuration where virtual plane is staged without staging the corresponding master plane. Hw allows such configuration and additionally during shell stop cases, framework removes each staged plane one by one which requires this configuration to be supported. Change-Id: I85ce571dbbc148c069c2cf35cba55ad740d52b5d Signed-off-by: Abhijit Kulkarni --- msm/sde/sde_crtc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index 83e3935ab723..19d9f3c741ca 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -4650,13 +4650,18 @@ static int _sde_crtc_check_get_pstates(struct drm_crtc *crtc, for (i = 1; i < SSPP_MAX; i++) { if (pipe_staged[i]) { - if (is_sde_plane_virtual(pipe_staged[i]->plane)) { - SDE_ERROR( - "r1 only virt plane:%d not supported\n", - pipe_staged[i]->plane->base.id); - return -EINVAL; - } sde_plane_clear_multirect(pipe_staged[i]); + if (is_sde_plane_virtual(pipe_staged[i]->plane)) { + struct sde_plane_state *psde_state; + + SDE_DEBUG("r1 only virt plane:%d staged\n", + pipe_staged[i]->plane->base.id); + + psde_state = to_sde_plane_state( + pipe_staged[i]); + + psde_state->multirect_index = SDE_SSPP_RECT_1; + } } }