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: 123887 Delivered-To: patch@linaro.org Received: by 10.80.140.226 with SMTP id r31csp306878edr; Tue, 9 Jan 2018 02:58:48 -0800 (PST) X-Google-Smtp-Source: ACJfBot+QSJ2GIFGPTAmGXu8ZmZcURyohvhvL+R3i3otcFxCnwqT4LcP2fn+IS7EG7gncELwFk9Y X-Received: by 10.84.231.22 with SMTP id f22mr15159126plk.442.1515495528475; Tue, 09 Jan 2018 02:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515495528; cv=none; d=google.com; s=arc-20160816; b=YJXP8zTYf5Jy0OZGvuOk6WMRcB9cqLXTpkQ6rJdACIjau1yWHs4VfBP6kkFWJrvx0m Iiw4axLuvuM8mQFyXKTOVosCKn5ug62qneAjZ29UbhbbV2iOzXalT6cJghSd9BdZBh7r XtBKHmRB+L6gxsExMNdbL64sJewT3qDs2psEIh0I6quVubdIINEcj9w1NMXgfKyPNXnn z4SAMgmegCBP7V3P+eyq9zcBDwMjeI+Pvtg46cunqBXOaCavygytwZv8IvcFTnSvg7bV oHPnmwM68AARZRWPI+rI0tYeReDYLnlDROnQtziQ093ZywB5hUmu5A1MiLAjVElhDa20 I4YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=RwZllol2Ak2yfMl6xuEo/JOS0jN28m4Bpx2FwLQ4xwA=; b=taLHz9jJRrBI2z3Kj+YBFilPcvjem7ApYIoiHQFdwvksRW0q9yAdUqyJrV+pXoDbTs qMN8ZZJjuVzpZ0pRbXWrY4WBbY/SaH+a6QczFdsXVU47Ny8M0gwUiaNfniiFfF56ZHgz 2mYoo2FO+PIR1Qg5XZX+nYnXfkEruQsSp96iZqrIR+GzALsJCVexO0S35gwsWRDaucuv NWplk1o8oUOWzvPj2t/xV0HAbK260G/7DbZgjp42tbCvVu8ktGTzrHjHm4PomAMFS4Rl 2cPPD6DeW6yoldyy6ZHtvZiL0Az9eHRE4FPuDc6SbdiAQC/FzGlUHxrRTqDsFC55GrRg ta3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o13si8865661pgd.463.2018.01.09.02.58.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 02:58:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A5206E0CD; Tue, 9 Jan 2018 10:57:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 80D2F6E0C6 for ; Tue, 9 Jan 2018 10:57:12 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 0542320974; Tue, 9 Jan 2018 11:57:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 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: Cc: linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, thomas@vitsch.nl 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" 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; } }