From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F8E3606A31A for ; Tue, 1 Dec 2026 09:23:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OlB+HJ+H Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E805710F6B3; Tue, 1 Dec 2026 09:23:14 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 81D2410F6C7 for ; Tue, 1 Dec 2026 09:23:09 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 82C7D623FA; Tue, 1 Dec 2026 09:23:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D81001F0089C; Tue, 1 Dec 2026 09:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796116988; bh=RxWZj7FbeAGJzpHkc5zBlCuqIEck4W0Ge0D9tC2a3yo=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=OlB+HJ+HRm6AWEkjOhWtbOvwGX24nOE4ImSNaDiGfCQ7ztBD8aHSSrLi6AHVVzZ4N o23y4x/y4OLqD85k6FvYJsdmBEV5Ztp+42n2xPnEYwBNQb6nBsfWssOzxdq9GUlX9T 5maGdV+9BX6OKVh+X8ggak+gR55BTYmqYRWIbqUIBLp3TemH8kd2pd/lnMLe1Oe+J2 RM2ah2WytKC3L3Qx4h2R2zymDaRLwE0p5nG3LAvHSaaQ05g8L2m8KDbp9EuwXc1fY9 4gFUtRnx8U69jDXDTYyH7upVA8lOHOsxzOOyvcC8MRZnC5vRhagXxeuDcL41fJt8Qq aJA2xEazMS5og== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 4/4] drm/panel: novatek-nt36536: reject enable when prepare failed To: "Qianhui Xu" , dri-devel@lists.freedesktop.org In-Reply-To: <20261201091454.153619-5-xiaqinghuan@mail.ustc.edu.cn> References: <20261201091454.153619-1-xiaqinghuan@mail.ustc.edu.cn> <20261201091454.153619-5-xiaqinghuan@mail.ustc.edu.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 09:23:07 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Low] drm/panel: novatek_enable() reaches into drm_panel core panel->prepared state - [Low] drm/panel: missing Fixes trailer in commit message -- commit bda58794a2620a7efd289beb14b6a30327dba914 Author: Qianhui Xu > drm/panel: novatek-nt36536: reject enable when prepare failed > > drm_panel_prepare() cannot report a failure to its caller, so the enable > part of the bridge chain still runs with panel->prepared unset. Provide an > enable() callback that returns -EIO in that case, so the panel is not > marked as enabled and the backlight stays off. > > Signed-off-by: Qianhui Xu [Severity: Low] Should this include a Fixes tag for the commit that introduced the driver? Fixes: 75a5dbd1f4f7 ("drm/panel: Add Novatek NT36536 panel driver") > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36536.c b/drivers/gpu/= drm/panel/panel-novatek-nt36536.c > index 88a003f5a9441..698e7b85a8a76 100644 > --- a/drivers/gpu/drm/panel/panel-novatek-nt36536.c > +++ b/drivers/gpu/drm/panel/panel-novatek-nt36536.c > @@ -123,6 +123,12 @@ static int novatek_prepare(struct drm_panel *panel) > return ret; > } > =20 > +static int novatek_enable(struct drm_panel *panel) > +{ > + /* The bridge enable chain can continue after a failed prepare callback= . */ > + return panel->prepared ? 0 : -EIO; > +} [Severity: Low] Should panel->prepared be checked in drm_panel_enable() instead of in a driver-specific enable() callback? Commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel") centralized panel->prepared and panel->enabled tracking in drivers/gpu/drm/drm_panel.c so individual panel drivers do not inspect it, and drm_panel_funcs.enable is otherwise optional for drivers whose power-on sequence runs in prepare(). Checking panel->prepared in drm_panel_enable() before setting panel->enabled and enabling panel->backlight would avoid reaching into drm_panel core state here and cover all panel drivers without their own enable step. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201091454.1536= 19-1-xiaqinghuan@mail.ustc.edu.cn?part=3D4