From patchwork Mon Jul 9 17:31:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10515387 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 091A5600CA for ; Mon, 9 Jul 2018 17:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6EDC28D0D for ; Mon, 9 Jul 2018 17:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB3E028DD3; Mon, 9 Jul 2018 17:35:09 +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 7EC5428D0D for ; Mon, 9 Jul 2018 17:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933759AbeGIRfI (ORCPT ); Mon, 9 Jul 2018 13:35:08 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:34009 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933489AbeGIRfI (ORCPT ); Mon, 9 Jul 2018 13:35:08 -0400 Received: by mail-yw0-f193.google.com with SMTP id j68-v6so6830624ywg.1 for ; Mon, 09 Jul 2018 10:35:08 -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=5RjY9IeJzlI74g6jGTFdAaONgDAI1XXlHTsS8uGiFPE=; b=AtQY17FJyKN012NbUd+geGO/pKwb+W3kGmhAjmFOuGF5L36kCORfG4qhUhxsfriiZj qBXgbCogDM5Sfb0qgSIeuWMsS3HksQkfL09e1ESohhRDP8SB1DhR1/NQ7Tl3mrPKWVh6 DgXVZJAUpXFhUa1NdyWlyJbgNYBtlpBpkNwAQ= 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=5RjY9IeJzlI74g6jGTFdAaONgDAI1XXlHTsS8uGiFPE=; b=sXYeBBMnETcZQRjx617pn+fqSOPVLZJbfH9BioLqpygSlJbmsMDya9SvLagPVoU9Od UL0k0BUTjO+HmYxfcwEFpDaEiwoUMuBEFYgM3WRc+YmhaUmt/0WmlzIdGhcxsH2zLJN9 VAmiBT/dql/Cu3nHKMhEszx656KaVZNq7aBVoK/8hOUs+eU41ZE3fePzBXtExfMZ8HUA jkwDsQRHWxMXDbbLp7XRyWh6zZVtTDI23Ob50sLd44jxMNYbLkvztDwmAjKbQhFsuLGQ haW09M6st3lsaOFhD056PsoBc9LuSUc3V9oL2Y8AwRn3yVq4T9WEvSdq8h+w9tgkzjAj 3h8w== X-Gm-Message-State: APt69E3JBQhvkx607B7KxzbGUbujxLroKX4ErsQTypAuaYKwHKYvV/tN HVayYHEEyAD432HTT+3n24fMPg== X-Google-Smtp-Source: AAOMgpfQfAx23jj/g1/4fCU2UBBvGcm/FcMNbcns/pzmWLjjJE/2/Nkag9LQLa5s6nbipSi3W63rtA== X-Received: by 2002:a81:7895:: with SMTP id t143-v6mr10383801ywc.305.1531157707738; Mon, 09 Jul 2018 10:35:07 -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.35.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:35:07 -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 16/21] drm/msm: Add .commit() callback to msm_kms functions Date: Mon, 9 Jul 2018 13:31:52 -0400 Message-Id: <20180709173200.238457-17-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 From: Jeykumar Sankaran Called right before wait_for_commit_done() to perform kickoff for active crtcs. 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,