From patchwork Mon Jan 22 10:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 125392 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1081399ljf; Mon, 22 Jan 2018 02:37:05 -0800 (PST) X-Google-Smtp-Source: AH8x225CwSae8FU1yY7c/CGaFeyuG3dFII66X1VjlwvC4cHFLEi2T6Uaj9pY53Fptsl4aUqBfzHQ X-Received: by 10.101.74.208 with SMTP id c16mr6863807pgu.34.1516617425242; Mon, 22 Jan 2018 02:37:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516617425; cv=none; d=google.com; s=arc-20160816; b=loXloKy1waBweZ/Cyeo3btwq5pTjhzBf8+uTT0mJzA4MIapisoiZYmZXPl2z5JoaLQ BxU4VA4yvW2AFSrl7s6YvPgTNQoUpEkLScfthVSAqMZ+cONb1n/XIFRWTl/gwmUCA4GR arRhWf08wnvQunr5mGy9v5uFH18Y5KNYqzOTXnem4I00SzwV3hjzdDzE5GRWcC6ffqE5 1kRbqyN6eK28AtFPI/bMuBLuRxn5b/o+cSxQJlJ0yEY0qw6m0d1qBuDwlwdQzZJbdd2X OGdVCWLn54B4KD6Ep58dS3a0Ecy6SIK6a06DLiEajIzKCPsAesjlGQFDuKgtLQvzgX1z JDTQ== 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=FP8kVfsuUesImnkXOAa4Bs1pqZ7AYpcWpsZ80GCu0YiNLUZ14zJSqnjCL0/ZnXmNnI NuOakQzzl4WsuMjJb33UxECHym6P+KjSWEBCZxsCIQVkA4T/UuKNxykqZw+hDzVheLS6 Qn0FFUkJAK0zMpdz19Rnp4fJBkqBxKDKTPIiEAVsy2eZeG8edFJN4mOg8f2IzU291rZS cUYacTdfOBB7SKHZVv9grkgSam34Cgo4FwvWxbV/aY7Gi5Fg0F5cReH9AGSpGCl/gq4F J1KlagKgb8r1AwKl1cKUz/4AMDQtP6qup9s/fB4CxxKOxIXCz482kO1fufM8vu5u3vIr pbKg== 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 e68si14364347pfa.298.2018.01.22.02.37.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 02:37:05 -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 83A906E19F; Mon, 22 Jan 2018 10:36:16 +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 9DE606E188 for ; Mon, 22 Jan 2018 10:36:12 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 04E5E20722; Mon, 22 Jan 2018 11:36:12 +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 8F91E20723; Mon, 22 Jan 2018 11:35:55 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org Subject: [PATCH v2 13/19] drm/sun4i: backend: Set a default zpos in our reset hook Date: Mon, 22 Jan 2018 11:35:42 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: linux-arm-kernel@lists.infradead.org, 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; } }