From patchwork Thu Feb 28 21:09:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10833739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B90131399 for ; Thu, 28 Feb 2019 21:10:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AACAA2F585 for ; Thu, 28 Feb 2019 21:10:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E7C22F59F; Thu, 28 Feb 2019 21:10:52 +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 4238E2F585 for ; Thu, 28 Feb 2019 21:10:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF0486E240; Thu, 28 Feb 2019 21:10:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id A30DD6E240 for ; Thu, 28 Feb 2019 21:10:48 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id d18so25248462qtg.12 for ; Thu, 28 Feb 2019 13:10:48 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=hRVbJ5t1NGPXZF7C8k/A8BPBG0PDxW4NDDQGCU2QcmI=; b=h0lVVPRtJMwBL3ANSQfCEkoVGVgaTMyEejeY4hrWcAevIfJEFiqqOveFdfJAU7+cud 0E4owYppdVAYFestLXaXLyzaQBMQv9ztROzcJ9xwnGBzpwdH6U5887ypH16SIlHTtBXI 6ldWKWzaID4G+5RzUcNKT1CVWhsYI2n4peojjmiRH1E4usilWToULFTMBj3C1RsWi1P+ KugZRQFtOOY1Hg4UtzNCaH6btjevSvzajBCLGFjlvoiGVg9/ZcLjYv9LeR3nGQ4LwIsr /tFmb7n076+8UE4+gumQCYrOJUsoypL3Z+lWWE1PzyjjpepqeUkJw6gIOpvnzBxsKK01 Qcbg== X-Gm-Message-State: APjAAAUkpZClFKbuihttmQcLoUdtxl5m7m1mR3zftWPLNNMZUECUhRGp 1xhdycMb6CXq2iy2XrNwkWLufRtl6mU= X-Google-Smtp-Source: APXvYqyXpCPmW02oPQW9pI9YyOnRM9tj+uDmWvXn/HubiFjj9hsZT5v9bRgjhRDWRlZNw3jMYWNH5Q== X-Received: by 2002:ac8:2314:: with SMTP id a20mr1155703qta.127.1551388247800; Thu, 28 Feb 2019 13:10:47 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id 70sm23271846qkb.39.2019.02.28.13.10.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 13:10:47 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm/rockchip: Use drm_atomic_helper_commit_tail_rpm Date: Thu, 28 Feb 2019 16:09:34 -0500 Message-Id: <20190228210939.83386-6-sean@poorly.run> X-Mailer: git-send-email 2.21.0.rc2.261.ga7da99ff1b-goog In-Reply-To: <20190228210939.83386-1-sean@poorly.run> References: <20190228210939.83386-1-sean@poorly.run> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hRVbJ5t1NGPXZF7C8k/A8BPBG0PDxW4NDDQGCU2QcmI=; b=HtffZCI7z+uMrIRhdodSAssMSBNwSW/osWZEd9EBqjKgqeGf4iMA445IzzRdn5py2C WiH7trNxbTXKUl+dgN/M2dzz9bV7KOXdvz9CD9t/awHc0QB8uvYRvMULw7Tu4+jlXCFh uZIeU88GEFWFCEV0HkFbIbbYel/28LvnuwRC2uV4O1lZz9tei9zNAvaVLqtPLrlRLxVC 9r6eChh/PmzhjHyJgjrUAZg8XGQ23SFjcbLSSw0iYhQBhaX9Qepe1NY4ttgYAgtb1eO5 /LHLsgXoVcLq2a9D9S/QW5D5MrT8E2/isvwkrf2HNA4VZuVqp/1i4loaFQ6AiQND7bq8 +zEQ== 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: Zain Wang , David Airlie , Tomasz Figa , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Now that we use the drm psr helpers, we no longer need to hand-roll our atomic_commit_tail implementation. So use the helper Cc: Zain Wang Cc: Tomasz Figa Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c index 7e121875e3c9..75198df2b022 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c @@ -115,27 +115,8 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, return ERR_PTR(ret); } -static void -rockchip_atomic_helper_commit_tail_rpm(struct drm_atomic_state *old_state) -{ - struct drm_device *dev = old_state->dev; - - drm_atomic_helper_commit_modeset_disables(dev, old_state); - - drm_atomic_helper_commit_modeset_enables(dev, old_state); - - drm_atomic_helper_commit_planes(dev, old_state, - DRM_PLANE_COMMIT_ACTIVE_ONLY); - - drm_atomic_helper_commit_hw_done(old_state); - - drm_atomic_helper_wait_for_vblanks(dev, old_state); - - drm_atomic_helper_cleanup_planes(dev, old_state); -} - static const struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = { - .atomic_commit_tail = rockchip_atomic_helper_commit_tail_rpm, + .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm, }; static const struct drm_mode_config_funcs rockchip_drm_mode_config_funcs = {