From patchwork Wed Aug 5 07:22:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hunter X-Patchwork-Id: 6946761 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C95A9F373 for ; Wed, 5 Aug 2015 07:23:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB89F20481 for ; Wed, 5 Aug 2015 07:23:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D126B20437 for ; Wed, 5 Aug 2015 07:23:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92ED372099; Wed, 5 Aug 2015 00:22:58 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pku.edu.cn (mx13.pku.edu.cn [162.105.129.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 5025972099 for ; Wed, 5 Aug 2015 00:22:56 -0700 (PDT) Received: from debian.localdomain (unknown [59.108.92.109]) by mailfront03 (Coremail) with SMTP id 84FpogD3qGXKucFVsbTDAA--.56129S5; Wed, 05 Aug 2015 15:22:51 +0800 (CST) From: John Hunter To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/7] drm/cirrus: phase 3: atomic updates of planes Date: Wed, 5 Aug 2015 15:22:52 +0800 Message-Id: <1438759376-4509-4-git-send-email-zhjwpku@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1438759376-4509-1-git-send-email-zhjwpku@gmail.com> References: <1438759376-4509-1-git-send-email-zhjwpku@gmail.com> X-CM-TRANSID: 84FpogD3qGXKucFV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fC2KfnxnUUI43ZEXa7IU8uMKJUUUUU== X-CM-SenderInfo: p2km411nx6wzxdlohudrp/ Cc: Daniel Vetter , Matthew Garrett , Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Zhao Junwang Now that phase 1 and 2 are complete we can switch the update/disable_plane callbacks to their atomic version Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Matthew Garrett Cc: Dave Airlie Signed-off-by: Zhao Junwang --- drivers/gpu/drm/cirrus/cirrus_main.c | 3 +++ drivers/gpu/drm/cirrus/cirrus_mode.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c index d95de34..cfa92bc 100644 --- a/drivers/gpu/drm/cirrus/cirrus_main.c +++ b/drivers/gpu/drm/cirrus/cirrus_main.c @@ -10,6 +10,7 @@ */ #include #include +#include #include "cirrus_drv.h" @@ -82,6 +83,8 @@ cirrus_user_framebuffer_create(struct drm_device *dev, static const struct drm_mode_config_funcs cirrus_mode_funcs = { .fb_create = cirrus_user_framebuffer_create, + .atomic_check = drm_atomic_helper_check, + .atomic_commit = drm_atomic_helper_commit, }; /* Unmap the framebuffer from the core and release the memory */ diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 42a4d86..e8f038b 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -431,8 +431,8 @@ static void cirrus_plane_atomic_disable(struct drm_plane *plane, } static const struct drm_plane_funcs cirrus_plane_funcs = { - .update_plane = drm_plane_helper_update, - .disable_plane = drm_plane_helper_disable, + .update_plane = drm_atomic_helper_update_plane, + .disable_plane = drm_atomic_helper_disable_plane, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,