From patchwork Mon Jul 9 17:31:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10515355 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0E4626032A for ; Mon, 9 Jul 2018 17:34:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E89DC28DCC for ; Mon, 9 Jul 2018 17:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAC4128DD3; Mon, 9 Jul 2018 17:34:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79BE328DCC for ; Mon, 9 Jul 2018 17:34:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933771AbeGIReQ (ORCPT ); Mon, 9 Jul 2018 13:34:16 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:39056 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933537AbeGIReP (ORCPT ); Mon, 9 Jul 2018 13:34:15 -0400 Received: by mail-yb0-f193.google.com with SMTP id k127-v6so7499099ybk.6 for ; Mon, 09 Jul 2018 10:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4qaYfsXO3TOT5zG0FzBfGuytvjQbk3IEd/ByAVSSpN8=; b=CcgsF3LridMb0qMdhpEDegDaRvQ6izg1Vbje+n0h8CON88OV5CfVfP2ltIlyBQR/uL MWzFH8dx6lURM5UM4+7yO1s6PNl08eCcmuaNWiQyAW7ywX9DcfzYwu2bw32qASH1rVMz vn67ImNP560rFRDKN1O6/gwbeaGarOmhfm/6A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4qaYfsXO3TOT5zG0FzBfGuytvjQbk3IEd/ByAVSSpN8=; b=BjjVM7Mh5ju0A5AGcLwbJvKkM/4wfnGUiMBlt7r6jCow5dFp63/1IT+GO7vbqxbU4B ZvJ5qAQtLPDZvDFjv+wz/hIJlBWbunBi8Wv3Z6oPlGgBnI1SMrr4Gzbe2chJXglYF/Ot YQFBgX04a8WPTPeSrKMCMtFx3nTPWN8bmLuCUJ9uMXBYCZ9Sdja3PKJy5xutnFklKEBl ZDr4N3PNcuWN8+NPPM45Yf3xRgUcTaBDn36sQGfEmFZCaaaLamhZpJulZZbD1KjGqMVv md5jhT7KmmOQY5DC8ShPopHBQYVzGg5aL6TfbqBTZCm3BIZ98hJB1cdA20QKePfOUZ1K k9TA== X-Gm-Message-State: APt69E13jut81uJIGjaeSq/3hbEBQTNHSQwXrCktNYrfcRzwZegrOowL Pn6z9xj2zYf9YjqbZdT+a0T/6w== X-Google-Smtp-Source: AAOMgpdNUtuIz2LWOQgMUyWnse9zCHGFgAQiCo2P+jEgyckUyjFSreB962RlIHBNib9zYjqFhE0UKA== X-Received: by 2002:a25:ad05:: with SMTP id y5-v6mr11237913ybi.49.1531157655452; Mon, 09 Jul 2018 10:34:15 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id s206-v6sm5885495ywc.55.2018.07.09.10.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:34:15 -0700 (PDT) From: Sean Paul To: abhinavk@codeaurora.org, architt@codeaurora.org, chandanu@codeaurora.org, jsanka@codeaurora.org, jcrouse@codeaurora.org, ryadav@codeaurora.org, seanpaul@chromium.org, skolluku@codeaurora.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, airlied@linux.ie, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, nganji@codeaurora.org, hoegsberg@chromium.org, dovizu@chromium.org, robh+dt@kernel.org Cc: Daniel Vetter , Steve Kowalik , Maarten Lankhorst , Aishwarya Pant , Ingo Molnar , Arnd Bergmann Subject: [PATCH 08/21] drm/msm: Move wait_for_vblanks into mdp complete_commit() hooks Date: Mon, 9 Jul 2018 13:31:44 -0400 Message-Id: <20180709173200.238457-9-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180709173200.238457-1-seanpaul@chromium.org> References: <20180709173200.238457-1-seanpaul@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DPU doesn't use this, so push it into the mdp drivers. Signed-off-by: Sean Paul Signed-off-by: Rajesh Yadav --- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 ++ drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 ++ drivers/gpu/drm/msm/msm_atomic.c | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c index 4b646bf9c214..44d1cda56974 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c @@ -125,6 +125,8 @@ static void mdp4_complete_commit(struct msm_kms *kms, struct drm_atomic_state *s struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; + drm_atomic_helper_wait_for_vblanks(mdp4_kms->dev, state); + /* see 119ecb7fd */ for_each_new_crtc_in_state(state, crtc, crtc_state, i) drm_crtc_vblank_put(crtc); diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 6e12e275deba..bddd625ab91b 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -170,6 +170,8 @@ static void mdp5_complete_commit(struct msm_kms *kms, struct drm_atomic_state *s struct device *dev = &mdp5_kms->pdev->dev; struct mdp5_global_state *global_state; + drm_atomic_helper_wait_for_vblanks(mdp5_kms->dev, state); + global_state = mdp5_get_existing_global_state(mdp5_kms); if (mdp5_kms->smp) diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index f0635c3da7f4..e6f1e25c60af 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -75,8 +75,6 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state) kms->funcs->complete_commit(kms, state); - drm_atomic_helper_wait_for_vblanks(dev, state); - drm_atomic_helper_commit_hw_done(state); drm_atomic_helper_cleanup_planes(dev, state);