From patchwork Tue Jan 9 10:56:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10151771 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 0DDB9603ED for ; Tue, 9 Jan 2018 11:14:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EECA287C0 for ; Tue, 9 Jan 2018 11:14:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0317C28885; Tue, 9 Jan 2018 11:14:47 +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 705F2287C0 for ; Tue, 9 Jan 2018 11:14:47 +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=EjVNatzWn3bFX4yhqP44CGjbmOW3POvKpqMhHnkihkc=; b=MmaFBXAmrvaA/8YvCWsuuR9Yd7 5jFiUt8+YxHCjS2plQe6ObeTrIrbUecZLhzVX1/C0iJNLIoU1jtZIF8CYsxB11xiE+sBXcXSLapOC 3EP5iKDJaTx477Rrw86tbHbEmeS7AQrDcQEdYPd2tX4RNNI0k5TC4fVi9QbpVgHCbh0LUNODJ4scE rAXgfPAchWIG33Cp0zVfXzCUhatdhHiajGtQLZbzwJ4u9TO1vIhhw+L9iowyk9esnE1OyfrdTCVXN 3EYLlHToNOiCatHHqJoH5S+S2shFA2JFPfWhYECJh3b6J/aW+vTFKa7XxovZTSNbTNOLIQACizCuJ A7jPwhYw==; 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 1eYrre-0002dR-A8; Tue, 09 Jan 2018 11:14:42 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYrpY-0000p8-9g for linux-arm-kernel@bombadil.infradead.org; Tue, 09 Jan 2018 11:12:32 +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=N1Tm0EfYZ+cUe26C3MoGRvWyvpG5biO8BRXf86diirY=; b=pQpNzzZrtD5wNb2xn/QIi9SEG T8xcLw7M1RYtGFHFX7JUTGZz+xgLYpQsJHhlvq6V3v3h7YAIuAVcYkI7Cpd0jWkmSPBOtoFtOtgjG qpw7VnQ3l6xLqf53IPssQhN1SkUGRLvC1XfB5iCM7ddqybAgBdAT0O6xfl945vXwHXzncMn7cDOkJ IwCKnVMlsbvDjfbx8XVPR4dnlAI9YooI3b6Fkjs+kKsV9xjJ3FVSLZWkX2XwttosV0d/hS8/R4859 Ruo/QU5UH+y/hBN/CWWr6pSsOZCYcbvwWBTmxKZZI3bh6+hDR2qrNoNE1J+R2YdpASabK0w0OdQ3D bGHJrHUdg==; Received: from mail.free-electrons.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYrao-0000qT-6T for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2018 10:57:19 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 0542320974; Tue, 9 Jan 2018 11:57:11 +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 4F36F20993; Tue, 9 Jan 2018 11:56:48 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Daniel Vetter , Jani Nikula , Sean Paul Subject: [PATCH 13/19] drm/sun4i: backend: Set a default zpos in our reset hook Date: Tue, 9 Jan 2018 11:56:32 +0100 Message-Id: <63f77d84e998ae7b9a1a583de94c1a5c13cb10cb.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_105718_252492_21AD5369 X-CRM114-Status: GOOD ( 13.58 ) 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 The our plane state zpos value will be set only if there's an existing state attached to the plane when creating the property. However, this is not the case during the probe, and we therefore need to put our default value in our reset hook. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_layer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index c448cb6b9fa9..03549646528a 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c @@ -28,6 +28,7 @@ struct sun4i_plane_desc { static void sun4i_backend_layer_reset(struct drm_plane *plane) { + struct sun4i_layer *layer = plane_to_sun4i_layer(plane); struct sun4i_layer_state *state; if (plane->state) { @@ -43,6 +44,7 @@ static void sun4i_backend_layer_reset(struct drm_plane *plane) if (state) { plane->state = &state->state; plane->state->plane = plane; + plane->state->zpos = layer->id; } }