From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04BDEC433DF for ; Fri, 21 Aug 2020 07:12:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFB20214F1 for ; Fri, 21 Aug 2020 07:12:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="LtgwUm8b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFB20214F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=crapouillou.net Authentication-Results: mail.kernel.org; spf=none 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 3177B6EAAE; Fri, 21 Aug 2020 07:12:05 +0000 (UTC) Received: from crapouillou.net (crapouillou.net [89.234.176.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 56EC06E941 for ; Thu, 20 Aug 2020 12:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1597925583; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cvfqokvJjJRDHqpcvn1CFRGBXyq8hxfGePqgX0+Z6F4=; b=LtgwUm8buWv6hWZGys+DG4WS+MDEUISCg4IkvO42mHToB8Om6L8FH1GoNE7FiVHQz5OE64 83BvSojIvNK8F6W7nWrV0e4fCRN/HZFgrQZWfwRf9yWYoIYbWISJLCTeesCeqTrhfrYUSB KCj7cQB361s8B6qI4s6KzFYDvTo9tkc= From: Paul Cercueil To: Thierry Reding , Sam Ravnborg Subject: [PATCH v2 1/2] drm/panel: novatek,nt39016: Reorder calls in probe Date: Thu, 20 Aug 2020 14:12:55 +0200 Message-Id: <20200820121256.32037-2-paul@crapouillou.net> In-Reply-To: <20200820121256.32037-1-paul@crapouillou.net> References: <20200820121256.32037-1-paul@crapouillou.net> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 21 Aug 2020 07:11:07 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Cercueil , od@zcrc.me, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The drm_panel_of_backlight() function must be called after drm_panel_init(), according to the function's documentation; otherwise the backlight won't be properly initialized. v2: New patch Signed-off-by: Paul Cercueil --- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt39016.c b/drivers/gpu/drm/panel/panel-novatek-nt39016.c index 39f7be679da5..daa583030246 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt39016.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt39016.c @@ -285,6 +285,9 @@ static int nt39016_probe(struct spi_device *spi) return PTR_ERR(panel->map); } + drm_panel_init(&panel->drm_panel, dev, &nt39016_funcs, + DRM_MODE_CONNECTOR_DPI); + err = drm_panel_of_backlight(&panel->drm_panel); if (err) { if (err != -EPROBE_DEFER) @@ -292,9 +295,6 @@ static int nt39016_probe(struct spi_device *spi) return err; } - drm_panel_init(&panel->drm_panel, dev, &nt39016_funcs, - DRM_MODE_CONNECTOR_DPI); - drm_panel_add(&panel->drm_panel); return 0; -- 2.28.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel