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: 10515357 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 5B729600CA for ; Mon, 9 Jul 2018 17:34:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43E5528DCC for ; Mon, 9 Jul 2018 17:34:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3800928DD3; Mon, 9 Jul 2018 17:34:19 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E15A528DCC for ; Mon, 9 Jul 2018 17:34:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75E466E5AD; Mon, 9 Jul 2018 17:34:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb0-x243.google.com (mail-yb0-x243.google.com [IPv6:2607:f8b0:4002:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 305736E5AD for ; Mon, 9 Jul 2018 17:34:16 +0000 (UTC) Received: by mail-yb0-x243.google.com with SMTP id h127-v6so7492988ybg.12 for ; Mon, 09 Jul 2018 10:34:16 -0700 (PDT) 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=kDITjzq8sCmGlktnKqSuxGZz/kFyY7nEA9qwhxDo0HXxBpA68cL0EijMu+KxwefO3Y VmL1TKSo4Fo7WLtUY32/3CdG52sY7TJFUsOFgVsnC+4ouMzuu3D1ZDF45MDVbZ+tBV9U jVnpKmZjrU0FWSTWi7GH07+8m6M3uDc+rceFeUr0yV5NKf89QvFLgMhfKAPwINX8OHEV /KOGkZIPg9eqiRsLQF7UxFALCetpCddf+TbSv03twNdSdK66eiW9zPgLMp+oe8zQQxuU FXB1ku8Z1rxAonqn1j0QL35j+o/BM5RAm7qebWoJNc4w29cwqlzjn52qu8hs2RYDVEsF 9hDw== X-Gm-Message-State: APt69E0qjDBhLEOOlyb9GvacxR94C37rkg/Gtyp9ZMAssYtk5MX6ccae L7rVLhwqr4dhX3wo9F4ZxQLCsg== 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 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> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Steve Kowalik , Arnd Bergmann , Daniel Vetter , Aishwarya Pant , Ingo Molnar MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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);