Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932331AbeAIK5s (ORCPT + 1 other); Tue, 9 Jan 2018 05:57:48 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:51000 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932232AbeAIK5M (ORCPT ); Tue, 9 Jan 2018 05:57:12 -0500 From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Daniel Vetter , Jani Nikula , Sean Paul Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , thomas@vitsch.nl 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: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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; } } -- git-series 0.9.1