From patchwork Fri Jul 20 20:43:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538343 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 1615E6029B for ; Fri, 20 Jul 2018 20:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03EFF1FF7F for ; Fri, 20 Jul 2018 20:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBAF728EDD; Fri, 20 Jul 2018 20:46:04 +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 82DE41FF7F for ; Fri, 20 Jul 2018 20:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728242AbeGTVf7 (ORCPT ); Fri, 20 Jul 2018 17:35:59 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:33125 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728088AbeGTVf7 (ORCPT ); Fri, 20 Jul 2018 17:35:59 -0400 Received: by mail-yw0-f195.google.com with SMTP id c135-v6so4821087ywa.0 for ; Fri, 20 Jul 2018 13:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=1zp5BSzj0FfP6fN/gkCkCEKFY4kq+i5n2/hHazl/TpA=; b=VbE6+cczh3gFkYrKOeAjy8+vn73Z+t4JM7tc4kfhnrshxtCCU6t6S6oPyVsToCVbKm OD0uZ9wFDQZ7f7wwJ2yCUTLOFDJ71/M2UKS5uJ0rgaqhkCCTepLNscyXqSv64BoApdHG /YG/+Ig1A9xAzJWjU5soUm3mRlfDlmuPjRGCI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=1zp5BSzj0FfP6fN/gkCkCEKFY4kq+i5n2/hHazl/TpA=; b=MTVqaD+esDpBVlCagruepdHgMYJaL/R0Xmgb4hh1B+gFcOCt/lvTOAZsuwCcBaDxzI U/Yc1947s46uO+E0OoJNLnce0UN2DQmTzlmbh973KY/WB0VLfQRuWVoPATbfENR1u1Of +j5YymmvO1kKmEUBCYBYVPbO35XmPYRO68czYIzY8IFMY7LOoBxpvZffYmQNJpzJpGJ2 0HXcRfm7sp+fUu3FJksyN4xk7B1EjdVQJFl8vI5UeUvXZl0W7I6ftX+A76PI6Dkr0tqv ZJ/iUA9Mj9iYHutIVc36Nh0LBgnj1X3pILTQwWgGq6hihOABNBXPAzhl/PBaFrU1vAek mxBQ== X-Gm-Message-State: AOUpUlEI6JUHUMDh3ankEhHy+CNtYD6nOgk0jeivk+fek/wjzYu6Jkuk pmZOdpyZAl5CvwxUY7VKKP5j6g== X-Google-Smtp-Source: AAOMgpffGrsoFvGJn7nRlnn55a06uw0+fNUEXmAmDSs25Ea1Ur9h37xJcm7DKGLbdB6kv+sZHmk70Q== X-Received: by 2002:a0d:c744:: with SMTP id j65-v6mr1824062ywd.484.1532119563074; Fri, 20 Jul 2018 13:46:03 -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.46.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:46:02 -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 v3 16/19] drm/msm: Add .commit() callback to msm_kms functions Date: Fri, 20 Jul 2018 16:43:07 -0400 Message-Id: <20180720204315.19054-17-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 From: Jeykumar Sankaran Called right before wait_for_commit_done() to perform kickoff for active crtcs. Changes in v3: - None Signed-off-by: Jeykumar Sankaran [seanpaul split this out of the megapatch] Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_atomic.c | 5 +++++ drivers/gpu/drm/msm/msm_kms.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index e6f1e25c60af..c1f1779c980f 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -71,6 +71,11 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state) drm_atomic_helper_commit_modeset_enables(dev, state); + if (kms->funcs->commit) { + DRM_DEBUG_ATOMIC("triggering commit\n"); + kms->funcs->commit(kms, state); + } + msm_atomic_wait_for_commit_done(dev, state); kms->funcs->complete_commit(kms, state); diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h index 76c14221ffdf..761bb07cd7bf 100644 --- a/drivers/gpu/drm/msm/msm_kms.h +++ b/drivers/gpu/drm/msm/msm_kms.h @@ -42,6 +42,7 @@ struct msm_kms_funcs { void (*disable_vblank)(struct msm_kms *kms, struct drm_crtc *crtc); /* modeset, bracketing atomic_commit(): */ void (*prepare_commit)(struct msm_kms *kms, struct drm_atomic_state *state); + void (*commit)(struct msm_kms *kms, struct drm_atomic_state *state); void (*complete_commit)(struct msm_kms *kms, struct drm_atomic_state *state); /* functions to wait for atomic commit completed on each CRTC */ void (*wait_for_crtc_commit_done)(struct msm_kms *kms,