From patchwork Fri Jul 20 20:42:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538311 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 3A3A1604D3 for ; Fri, 20 Jul 2018 20:44:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25DCB28E92 for ; Fri, 20 Jul 2018 20:44:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19AF428ECC; Fri, 20 Jul 2018 20:44:39 +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 B118628E92 for ; Fri, 20 Jul 2018 20:44:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727758AbeGTVed (ORCPT ); Fri, 20 Jul 2018 17:34:33 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:36529 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbeGTVed (ORCPT ); Fri, 20 Jul 2018 17:34:33 -0400 Received: by mail-yb0-f195.google.com with SMTP id s1-v6so5121908ybk.3 for ; Fri, 20 Jul 2018 13:44:37 -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=3Na6T+P6G7VBL8HmXQ8XJSUT4dcUbbKi5acJupmFCso=; b=nGCk06rp6t0QMQVqeqPAEiKW9V6JwE+kWiknvxefbZOGoF4OoKj3kc5YHIh547PjZ8 y9IpDDo1yvIvm11MoXA8jXIB5MA8gnsPMp+ueTJwrBXGeXQhkbAC/yBeC6xO7bUqD+v1 Miglq7fXrXyX9fsBz5slorsbTaFsbanYtyhT8= 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=3Na6T+P6G7VBL8HmXQ8XJSUT4dcUbbKi5acJupmFCso=; b=PPAZFRSrKHwWObSKzE5j9P8AIw7/2SncUj3EkzOsXtlEAmAd8XcfejN9dGkrn221UR jqDjnqKKMiDnp0pr530NwZZqqzGOqrgUTu85XNAFgWa3cG/3oaYcQbTshsV1CKS5E+Xv 11s85RcI+N7N4pCsE0xC9ZaWd2nYI9o2tlA+FWQJPPPpYwv5ufDCIzrPG9pXX8N/oE09 5CY1C5PL8HuP2niQ6QV4NKpjsLrhRKnNv21X09AbOZCcxcZzgBoqbRjMRpDDkZ8kJ4lr N2dPJeT88o9ocxIIOSwYecXI2Mgp382gd6XTdXMNWnkzbztOZez2ev/iZRz8AB83ywfV SE5w== X-Gm-Message-State: AOUpUlHSh80bWmxXJvzaVWUttYBB4TPZAUeM9kVgJbrOsF5bAqxTleZN hw77FD/rJqjO4KGjNHFWZWaWow== X-Google-Smtp-Source: AAOMgpcMUvVPGlUj7eDwpuLk6bFoAEzS4kGBH0PWgHB4TCbY7zfSbxF32cyQQCpU0bZJbMsT/oFKGw== X-Received: by 2002:a25:e6c6:: with SMTP id d189-v6mr1893060ybh.341.1532119476841; Fri, 20 Jul 2018 13:44:36 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id a2-v6sm2453831ywm.7.2018.07.20.13.44.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:44:36 -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: Maarten Lankhorst , Daniel Vetter , Steve Kowalik , Luis de Bethencourt , Aishwarya Pant , Ingo Molnar Subject: [PATCH v3 08/19] drm/msm: Move wait_for_vblanks into mdp complete_commit() hooks Date: Fri, 20 Jul 2018 16:42:59 -0400 Message-Id: <20180720204315.19054-9-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: <20180720204315.19054-1-seanpaul@chromium.org> References: <20180720204315.19054-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. Changes in v3: - None 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);