From patchwork Tue Jan 9 10:56:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10151781 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 8458F601A1 for ; Tue, 9 Jan 2018 11:24:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CD5128526 for ; Tue, 9 Jan 2018 11:24:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71B7E287A8; Tue, 9 Jan 2018 11:24:53 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFCFA28526 for ; Tue, 9 Jan 2018 11:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DRQUdAju+2TF1Jek1y4grA+OW+KA+YzYaaQ8XZnnjSw=; b=Mlpj5BDu6f/t71xJPtese74ka/ x7uaZWGFSTSL24GjTaVMacX3IerTMvI1WvFaTYCblEafrWgHsvf9/RG4U3udSy0+SZb3QY0dbvyNb C2tgX3du16NoaeKwdi01Tqkk3DFjgnPJ+tgiziTI//+MXumL1T5fneSr22m9AVdSUUbPbJ70GsCws 3EkZqq3r2EZISkjqQTxb2jpcnzlVOvXLYaor0XWY0GmLo7FepNfWW0o1VJeL3XwY3OlofH/5dS5vR q5g1aMyIxsgfaqIQLiQTcB2aeo1R1NFg7Il+ixeE6adL0dfv4X5k/XHZ1w1H1tsHmNEZw5DlykhFP IXJC8dMw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYs1I-0000z2-5d; Tue, 09 Jan 2018 11:24:40 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYrpa-0000j5-GN for linux-arm-kernel@bombadil.infradead.org; Tue, 09 Jan 2018 11:12:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eJ2yt85OclTIAUExgZwTRTosvgTYRmatAqg7L7zldDY=; b=EfTkQrhk5YhUH0dEpHzLfW03X c99wNNEiR8c10FOwNB2Oj+9oNdq3Ww9SHPaRWuv1U6yh86r82oCPsI6SJw43QjKdRzaB6eWqZSqBb jaU9XmGN0o810uaikL64RsjkFNYwazC5W3Ev1mZZT1WOD6MCLCy4uQ8BjMc2gTzt+dz4tcHlrXb7o DUhGiVxkJr2ebHwFU6Ku4RCeu0yeNf1mjsu7jeFLMiCJRu94GBHyYxrIV4dmnYYIs8WLbM1iqsChm Oj4HVv2Yh1uYwGFiMhQa64ljin1Dd5UTiXwn3wZRPOfOjuj/zfKScr/2GFr9fO7/uCYPaAVQBQ/jH ueLitnbYw==; Received: from mail.free-electrons.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYraZ-0000pB-Gm for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2018 10:57:06 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id D52AE2099A; Tue, 9 Jan 2018 11:56:51 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8F2B1203B4; Tue, 9 Jan 2018 11:56:41 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Daniel Vetter , Jani Nikula , Sean Paul Subject: [PATCH 11/19] drm/sun4i: framebuffer: Add a custom atomic_check Date: Tue, 9 Jan 2018 11:56:30 +0100 Message-Id: <74cd1157b24d511b8e81a256c9b029d64558d61d.1515494838.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180109_105703_565891_38256A52 X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, thomas@vitsch.nl MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to support normalized zpos, we need to call drm_atomic_normalize_zpos in our driver's drm_mode_config_funcs' atomic_check. Let's duplicate the definition of drm_atomic_helper_check for now. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c index a01a5b7d46e6..e68004844abe 100644 --- a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c +++ b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c @@ -26,9 +26,21 @@ static void sun4i_de_output_poll_changed(struct drm_device *drm) drm_fbdev_cma_hotplug_event(drv->fbdev); } +static int sun4i_de_atomic_check(struct drm_device *dev, + struct drm_atomic_state *state) +{ + int ret; + + ret = drm_atomic_helper_check_modeset(dev, state); + if (ret) + return ret; + + return drm_atomic_helper_check_planes(dev, state); +} + static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = { .output_poll_changed = sun4i_de_output_poll_changed, - .atomic_check = drm_atomic_helper_check, + .atomic_check = sun4i_de_atomic_check, .atomic_commit = drm_atomic_helper_commit, .fb_create = drm_gem_fb_create, };