From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A55FB37B400 for ; Fri, 8 May 2026 07:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223906; cv=none; b=PFuBlAcF2XBGCD/d0b0fWzLE5oMK+i3OGe/COTvfhvdPDB2wAbElDctx09IISN4nL9WHf5mH2Q8tDzo9W4n4H+Qkl7gby0EOMtP/Tcb58N4vNK2bkd4j+lpspBW33hoP+OJ58bSZHV3rBftDRarQ3NsBURjpuOtwzKd93w7VWEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223906; c=relaxed/simple; bh=J4BYgZvSPEC7KD8UFBDqPUsOJ+VWpE3A9JUo6gEYSUo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dfNU8Fyn439QobVbnEtp5pclhUKvDD+uOFFn62Ms0kOxQUmP2YwkKfXr9n83EfNtQbMnKkaMA3N/qBZoWJHd+RUoNOSFJXXuC8Gp+rfguJmwt78cpIh3blwTPIfguLwJXV9OcsoMHrS12wj3tmb655mQbh0qqRuLK1tvDwGlUCI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FvSGNCjy; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FvSGNCjy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zEIWSC/LzTP1Y8U/w/oIW/sTeQOqE1yb03dQC3rGJik=; b=FvSGNCjyCDHsFxn9yqeYGiDSiKKSYkGBUChD/ikzNS1EHVyl+NuA3vP+QvJiW49zR0SHmf EETHVvr2SZqkWvVIPsi/45/SDH0RgmOMbzOk6mSD12canOrX7+vge8/BFvI0KEW/C+Dorr BNG9zifnZ/7GUl8tsqMwPYCenwuM8Aw= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-eAlVK23ENwq-XxbNR1PBSw-1; Fri, 08 May 2026 03:04:57 -0400 X-MC-Unique: eAlVK23ENwq-XxbNR1PBSw-1 X-Mimecast-MFC-AGG-ID: eAlVK23ENwq-XxbNR1PBSw_1778223896 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CEC9D195605F; Fri, 8 May 2026 07:04:55 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 98C243002D2F; Fri, 8 May 2026 07:04:52 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:41 +0200 Subject: [PATCH v2 01/10] drm/panel/visionox-g2647fb105: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-1-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1809; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=J4BYgZvSPEC7KD8UFBDqPUsOJ+VWpE3A9JUo6gEYSUo=; b=OdB8oTTIzPIEDtPlCL7I2gDE7OHi+BTQRhoqnWq7ErdLjWmULyOtjdi/iDRsj8Z4M6wfNwUEH 9XdJZf1rfB0A5+f1UxK3WvAq07jbv8tAwq7JCORW7tbayb6ZoTnZQZ6 X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Also deduplicate the prepare_prev_first assignment that was set both before and after drm_panel_init(). Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-visionox-g2647fb105.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-visionox-g2647fb105.c b/drivers/gp= u/drm/panel/panel-visionox-g2647fb105.c index 413849f7b4dec..d5555a1731575 100644 --- a/drivers/gpu/drm/panel/panel-visionox-g2647fb105.c +++ b/drivers/gpu/drm/panel/panel-visionox-g2647fb105.c @@ -207,9 +207,12 @@ static int visionox_g2647fb105_probe(struct mipi_dsi_d= evice *dsi) struct visionox_g2647fb105 *ctx; int ret; =20 - ctx =3D devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx =3D devm_drm_panel_alloc(dev, __typeof(*ctx), panel, + &visionox_g2647fb105_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(ctx)) + return PTR_ERR(ctx); =20 ret =3D devm_regulator_bulk_get_const(dev, ARRAY_SIZE(visionox_g2647fb105_supplies), @@ -233,10 +236,6 @@ static int visionox_g2647fb105_probe(struct mipi_dsi_d= evice *dsi) =20 ctx->panel.prepare_prev_first =3D true; =20 - drm_panel_init(&ctx->panel, dev, &visionox_g2647fb105_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - ctx->panel.prepare_prev_first =3D true; - ctx->panel.backlight =3D visionox_g2647fb105_create_backlight(dsi); if (IS_ERR(ctx->panel.backlight)) return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight), --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01B462F5A29 for ; Fri, 8 May 2026 07:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223910; cv=none; b=Z6UMppl8tyt1x9/atClBxUduvkegzg2+OWjKMksHizke81/ZcCM044z/DF6QDhEqisgqZ7Hp7gpguThDzt7XGyoEr9OJQBxQwa7JfO6z+ZRU2NIBQK+33yGKFyqhAtp/1wpYvq7uLiEYabi97XWrskfaKbU6SGGyLzyzwEsef9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223910; c=relaxed/simple; bh=JUEHCY3nWem2O1Tnc61gI2aykO76LQssUEuDz2yZWsI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FkSKYcbh8+dcPomaVaRrCwlVhOy+cuw4koYC9xzAZJMrae9vZ6G33xBZHDo5liRm+rvrijrPMoDuxxb1colbrXVGg6qG0oVcp/XMjWa7XOo6nCXMAU5ffN848D7H+606xFxb4FUm6cQYnQxhKBBXadXGLRBYFgyfl1YUaTSCUjQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Chna1UKl; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Chna1UKl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q/eStwIMpD08Sr4D7cAHGOU+XdQrOvVtuLJ5JFB1WqE=; b=Chna1UKlKU2jy/o6z48eFLRonJOSsAig0x/beqDRbVCC7ddCVJRf0GMtQZOnUus/FssjxH 1cSAZhzZHtRnWK9Fc2o9+0m3d+bPhV+CM3WhqlYZuMhzuk4YE3/fFyP9ZX5LHjAqY4Okya y8XwFLZPh4s6mf6OrwnlbByG9uhW5vw= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-218-k2z99pc4OX2TkdVMySYzVQ-1; Fri, 08 May 2026 03:05:01 -0400 X-MC-Unique: k2z99pc4OX2TkdVMySYzVQ-1 X-Mimecast-MFC-AGG-ID: k2z99pc4OX2TkdVMySYzVQ_1778223899 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0E58418005B5; Fri, 8 May 2026 07:04:59 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3D655300019F; Fri, 8 May 2026 07:04:56 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:42 +0200 Subject: [PATCH v2 02/10] drm/panel/samsung-s6e63m0: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-2-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1556; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=JUEHCY3nWem2O1Tnc61gI2aykO76LQssUEuDz2yZWsI=; b=naTwUv6X5YF7pv7e68QjrGn4pu+55fhXf7r5Axvv0895cLLnBW0DNaVGVRqTtm/kQzbcwJm/a g90AjcfZ1IgAshdpBYJtOZMhIW+eV2JEH++A5SLwcNrkYWxxr+gabiW X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/dr= m/panel/panel-samsung-s6e63m0.c index ea241c89593b6..997115b1e541d 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c @@ -677,9 +677,13 @@ int s6e63m0_probe(struct device *dev, void *trsp, u32 max_brightness; int ret; =20 - ctx =3D devm_kzalloc(dev, sizeof(struct s6e63m0), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx =3D devm_drm_panel_alloc(dev, __typeof(*ctx), panel, + &s6e63m0_drm_funcs, + dsi_mode ? DRM_MODE_CONNECTOR_DSI : + DRM_MODE_CONNECTOR_DPI); + + if (IS_ERR(ctx)) + return PTR_ERR(ctx); =20 ctx->transport_data =3D trsp; ctx->dsi_mode =3D dsi_mode; @@ -712,10 +716,6 @@ int s6e63m0_probe(struct device *dev, void *trsp, return PTR_ERR(ctx->reset_gpio); } =20 - drm_panel_init(&ctx->panel, dev, &s6e63m0_drm_funcs, - dsi_mode ? DRM_MODE_CONNECTOR_DSI : - DRM_MODE_CONNECTOR_DPI); - ret =3D s6e63m0_backlight_register(ctx, max_brightness); if (ret < 0) return ret; --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7328537C922 for ; Fri, 8 May 2026 07:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223912; cv=none; b=ad8VDyJI+M5/05hwbjy8OpX0junNkM7Vf1BKImdxZb6FP0W58pg+51kxMyWGk1LQ53sXr7329lRXX+sbTPHGHVzJ0vq7br+PalchfWGQ2Vg2HISOLe0aROUJ7kC0nt96o1aNm/I641nJCVrgekoRU3SfA+uxSNgAbIf8AqPmaLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223912; c=relaxed/simple; bh=HAbIYpyVyHqCT0rQcmgk40y+JIziH1HWE+uRjKkdIG8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ab9sRGA8BE9tUx4oOXfRYFJiHoUvpRFAHjIFn9EmD4HZNzVduiq0MrHNTpW2yG3VlatxvdqVDG0SeaAvB8NTyL6DcBDV1Nj4ChZEXKEPS3JoRo4TREgZDK8Har/q844xoS9P45bxlKvWaTZ5Gw9eHPGicdwk9RAidU+UaGZndBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GfhSEXFV; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GfhSEXFV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lOECPH79PysJE1ZZAIYOI8HdKiN99472/LXcGmITo5s=; b=GfhSEXFV6OeIVV3PjLvXMB6hEep14lrXAHWsGdyeflilNBhEH0gZw9ndqKfERIIs01W3xk M/19nGBX/+quhK7TcC/lSb46xE7cGIrdFwqwnWRlqdPV/gjYa/onAS1PUACwZjFfCc4ACM igprWWdfKGWBuUY7MQR4JIVpOBzbq44= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-473-Ro4VPvXRPFan49ucjqD1QA-1; Fri, 08 May 2026 03:05:04 -0400 X-MC-Unique: Ro4VPvXRPFan49ucjqD1QA-1 X-Mimecast-MFC-AGG-ID: Ro4VPvXRPFan49ucjqD1QA_1778223902 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AF9341956055; Fri, 8 May 2026 07:05:02 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 697DE3002D2F; Fri, 8 May 2026 07:04:59 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:43 +0200 Subject: [PATCH v2 03/10] drm/panel/novatek-nt37700f: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-3-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1609; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=HAbIYpyVyHqCT0rQcmgk40y+JIziH1HWE+uRjKkdIG8=; b=12vrLyiZdrX4GUldKxGTwWgQj/UCX3V/s+Q99outv0lJLmcK0H8fjhjGQTnRnhNv/Q/ykkdBb o1+Pn5YlZDYDxvl3YB3iW2sMlm91R7Lzpxt81dgvv+FgJMkKyMYG/Bv X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-novatek-nt37700f.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37700f.c b/drivers/gpu/d= rm/panel/panel-novatek-nt37700f.c index 74f46a268c0f6..c221dd498fed4 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt37700f.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt37700f.c @@ -225,9 +225,12 @@ static int nt37700f_tianma_probe(struct mipi_dsi_devic= e *dsi) struct nt37700f_tianma *ctx; int ret; =20 - ctx =3D devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx =3D devm_drm_panel_alloc(dev, __typeof(*ctx), panel, + &nt37700f_tianma_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(ctx)) + return PTR_ERR(ctx); =20 ctx->supply =3D devm_regulator_get(dev, "power"); if (IS_ERR(ctx->supply)) @@ -247,8 +250,6 @@ static int nt37700f_tianma_probe(struct mipi_dsi_device= *dsi) dsi->mode_flags =3D MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM; =20 - drm_panel_init(&ctx->panel, dev, &nt37700f_tianma_panel_funcs, - DRM_MODE_CONNECTOR_DSI); ctx->panel.prepare_prev_first =3D true; =20 ctx->panel.backlight =3D nt37700f_tianma_create_backlight(dsi); --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E70B337E2F2 for ; Fri, 8 May 2026 07:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223915; cv=none; b=ry+j6s7+k6+oZa2HUVYF7HX/szjjZ9bxI2vvzI6debdDWsv/J46hyS55j3c5DF7oWZRbltTojdy5iXVoVHfciVcbK+TstW19dkqGBTvEWFUHn0p3h64R6p5Y0uN+U/AZR3cPyRtONZ+zf6skHmJbq93p0SeJ749JwRaj0a+XpLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223915; c=relaxed/simple; bh=yG+RtBwhDZoj2AxhrujtWwgsytaELI8TN8cNu99TMXM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bds2bqNQ+puO1RCehMtsCJjvQq+c496pEOJ5mWt2gfYp4FQWv35gXZkYi8gakdWY9SnQFij8gb5LgNUwIZSXmJx9Z5RluaqvbPO8A14k5SvsEcK68jSF4hKgSc3AqO3xrHOqfxKN4TrUMqX6PUDAGmtRbbXDnS4WKlpelKdKo8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WFKvoiUM; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WFKvoiUM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=stC3h3MHcmK2P0dezLV1nWsyclpObqsD2Ho0cm6fPRk=; b=WFKvoiUMfys2u1LieJnC5NHff8hW7oU+x5qjEOtJ9q29T3wRBdY4ppoJzW6vVEWDP+0nfQ +M0bH7lr9bHgmeGp0r0fiik4uwC6Jt5jHuSjz8r6BUYKqM9+EE91wjDXfH9B3/OVOAa1vR muKJVkBDa/hGLL9VZfFNo+qu/zQCMns= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-PtdU6G-pPYycJEEqXBKVJg-1; Fri, 08 May 2026 03:05:08 -0400 X-MC-Unique: PtdU6G-pPYycJEEqXBKVJg-1 X-Mimecast-MFC-AGG-ID: PtdU6G-pPYycJEEqXBKVJg_1778223906 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4014319560B2; Fri, 8 May 2026 07:05:06 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 22C7C300019F; Fri, 8 May 2026 07:05:02 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:44 +0200 Subject: [PATCH v2 04/10] drm/panel/lxd-m9189a: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-4-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1555; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=yG+RtBwhDZoj2AxhrujtWwgsytaELI8TN8cNu99TMXM=; b=PZ1IDLxB2ziRNNEoivKc/9wBwaE30ijFlju2I5tz3k/s5vwR/AZT9EerQDuH/S+dg+he++lKz +UM8mDrKgvyB81UYbjX6+mqHZvo9BBmcIXcrdumsp6sLjSc2BFYXqwP X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-lxd-m9189a.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-lxd-m9189a.c b/drivers/gpu/drm/pan= el/panel-lxd-m9189a.c index 68019e1e43a96..baaf170779e03 100644 --- a/drivers/gpu/drm/panel/panel-lxd-m9189a.c +++ b/drivers/gpu/drm/panel/panel-lxd-m9189a.c @@ -165,9 +165,12 @@ static int lxd_m9189_probe(struct mipi_dsi_device *dsi) struct m9189_panel *m9189; int ret; =20 - m9189 =3D devm_kzalloc(dev, sizeof(*m9189), GFP_KERNEL); - if (!m9189) - return -ENOMEM; + m9189 =3D devm_drm_panel_alloc(dev, __typeof(*m9189), panel, + &m9189_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(m9189)) + return PTR_ERR(m9189); =20 m9189->supply =3D devm_regulator_get(dev, "power"); if (IS_ERR(m9189->supply)) @@ -191,8 +194,6 @@ static int lxd_m9189_probe(struct mipi_dsi_device *dsi) dsi->format =3D MIPI_DSI_FMT_RGB888; dsi->mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST; =20 - drm_panel_init(&m9189->panel, dev, &m9189_panel_funcs, - DRM_MODE_CONNECTOR_DSI); m9189->panel.prepare_prev_first =3D true; =20 ret =3D drm_panel_of_backlight(&m9189->panel); --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7195737F8A8 for ; Fri, 8 May 2026 07:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223919; cv=none; b=ARqjAFd6giaMfc7LNymoA0hyNjmAUEIwUhQiqQxhzfiXmYXgEgUHq+IgfIkBt0sZo2x6iGTQS73Xvo0xIVAitpI64fYEHoX3f2hMTblFQ9WNQYyvCTWSxuWrnGL9nJat+qR9whlxgGNew5Lydqk8Nx82MA8wr1xVsz2toVhRheM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223919; c=relaxed/simple; bh=XvUdWFTzNdyuU5xLadG370AsGNZj7Po+tgb5WdlRF20=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QbOKJXkbTtmT1wdiaULjjpJT2Vc1YArBfs7XFts0iWc7jn2W5TbiHgfDzl7hUyqaSxmT7W37giazcJf8pOg/xk++iXf9mYDn1UVnP4GjP6rDuvkFo1ExKHJ/fPCYkKBpDLKLFlu5nexFWrRMrarwXrzEnioXH3yQQwRe7zfl/mM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZnSzQnYT; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZnSzQnYT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xT5ZKkahajCuu7IltkZe/sz8ns2yzt1V3hkLKL/Sblo=; b=ZnSzQnYTPqVhrF2H1wrW6nzun1rZmkZTFOnuDUKC8yi3r3pRmy5A0BDFOiJcCjrRCiHMhe rpKWPng1+7zVSuSLdgdA/Wb8w9dYkVKmsl9BXfWvd+/8tS0LruNb72/04M5MO1SOVsyeZ1 goETpOEJW1e0M4lW6wSEqUVC4JSfoMU= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-jjZ3ZiSxPDWoR8d92DFxtQ-1; Fri, 08 May 2026 03:05:11 -0400 X-MC-Unique: jjZ3ZiSxPDWoR8d92DFxtQ-1 X-Mimecast-MFC-AGG-ID: jjZ3ZiSxPDWoR8d92DFxtQ_1778223909 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8BE7A18002C7; Fri, 8 May 2026 07:05:09 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 925F7300019F; Fri, 8 May 2026 07:05:06 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:45 +0200 Subject: [PATCH v2 05/10] drm/panel/ilitek-ili9806e: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-5-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1543; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=XvUdWFTzNdyuU5xLadG370AsGNZj7Po+tgb5WdlRF20=; b=jB0zqHmUA0TBU9fZ0nf4XhSDti3tC2cVB/PVP3kcTGG/JcnWaAB8rpRgLyucVhtNK+gJsGGQm 2B6N8hM6cOKAnlGC5RDiAt57pAJhWRzgIUU6KF/ZENqG97wtCRW56De X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c b/drivers/g= pu/drm/panel/panel-ilitek-ili9806e-core.c index be2cf14401553..53e25d1086db8 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c @@ -78,9 +78,11 @@ int ili9806e_probe(struct device *dev, void *transport, bool set_prepare_prev_first =3D false; int ret; =20 - ctx =3D devm_kzalloc(dev, sizeof(struct ili9806e), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx =3D devm_drm_panel_alloc(dev, __typeof(*ctx), panel, + funcs, connector_type); + + if (IS_ERR(ctx)) + return PTR_ERR(ctx); =20 dev_set_drvdata(dev, ctx); ctx->transport =3D transport; @@ -103,8 +105,6 @@ int ili9806e_probe(struct device *dev, void *transport, return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "Failed to get reset-gpios\n"); =20 - drm_panel_init(&ctx->panel, dev, funcs, connector_type); - ret =3D drm_panel_of_backlight(&ctx->panel); if (ret) return dev_err_probe(dev, ret, "Failed to get backlight\n"); --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76D8C37D135 for ; Fri, 8 May 2026 07:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223922; cv=none; b=p0sR+yFBNOgrct8d7C07vncWs95jf0OqgctFIATTc3Q20k+5CIII8uBvv5UZmD70FmExz6dioVloLyNdVqG5BoK4h5HHjWhD3ZsSe9NVPITDFwvJ+ptBXrWQmoDI0/RPax0C+XQ/zu9idAXvok/a3qNfMS54dGS/1AxxvV0Wvgk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223922; c=relaxed/simple; bh=7kTj1OHxzG5jFzOAGeWNfUFLlc9UET6DJf46M5QiT1A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rLzIKQYwWwahp/xW9uPrDjkBK3QMdBhrg/rovcqpJ2/o2+hGJNrvSbg7ya+Yxln63cHuX5rh+G1SkpV8FjJUd3GZpXl8YracMu2LzhoegoEU0kMUInm6do3hf9ET1NvtKcTWm7BFryMY3ZwTDXWUmC8tR/aptiYkmhIQy7bon80= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BTU9P6kO; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BTU9P6kO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=boV6EPQtUfzTmTg+5yfj+I+/wEttTpMW77VvDFs9D8k=; b=BTU9P6kOzsbhNuS72qBpaJmwAMZZZb+OS1g8Ja2OFI1s95Gdks7SKhcObNjgqwU3FZCC3w rXGUsBLKJZSO8kdK/Uy7XtdloRONBjgHk5gc1otNSIFIxMQDFIPd75tae4c9F55D6a5J+B JoGrRNxOIK1PCr7mSFYxYwhEzEETLFI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-dxLPL3QCNTCEbBnWqh8FNQ-1; Fri, 08 May 2026 03:05:14 -0400 X-MC-Unique: dxLPL3QCNTCEbBnWqh8FNQ-1 X-Mimecast-MFC-AGG-ID: dxLPL3QCNTCEbBnWqh8FNQ_1778223912 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 817EC195608F; Fri, 8 May 2026 07:05:12 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE84E300019F; Fri, 8 May 2026 07:05:09 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:46 +0200 Subject: [PATCH v2 06/10] drm/panel/tdo-tl070wsh30: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-6-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1753; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=7kTj1OHxzG5jFzOAGeWNfUFLlc9UET6DJf46M5QiT1A=; b=XPhC+ZOSnNwfKV1RBSPp7cP9ZrJkEr1Q2wQ6wijfIO9DQBmJxmZDsBvMONqVLGTA1nAK2VN+S h2mtloqrhuMDdAgih8ExpMM0JE7HVl6+zNWTUtfCEOKr6hlaPehlEoC X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c b/drivers/gpu/drm= /panel/panel-tdo-tl070wsh30.c index 227f97f9b136f..13cfe252a838d 100644 --- a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c +++ b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c @@ -162,9 +162,6 @@ static int tdo_tl070wsh30_panel_add(struct tdo_tl070wsh= 30_panel *tdo_tl070wsh30) return err; } =20 - drm_panel_init(&tdo_tl070wsh30->base, &tdo_tl070wsh30->link->dev, - &tdo_tl070wsh30_panel_funcs, DRM_MODE_CONNECTOR_DSI); - err =3D drm_panel_of_backlight(&tdo_tl070wsh30->base); if (err) return err; @@ -183,10 +180,13 @@ static int tdo_tl070wsh30_panel_probe(struct mipi_dsi= _device *dsi) dsi->format =3D MIPI_DSI_FMT_RGB888; dsi->mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIP= I_DSI_MODE_LPM; =20 - tdo_tl070wsh30 =3D devm_kzalloc(&dsi->dev, sizeof(*tdo_tl070wsh30), - GFP_KERNEL); - if (!tdo_tl070wsh30) - return -ENOMEM; + tdo_tl070wsh30 =3D devm_drm_panel_alloc(&dsi->dev, + __typeof(*tdo_tl070wsh30), base, + &tdo_tl070wsh30_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(tdo_tl070wsh30)) + return PTR_ERR(tdo_tl070wsh30); =20 mipi_dsi_set_drvdata(dsi, tdo_tl070wsh30); tdo_tl070wsh30->link =3D dsi; --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBC0A3815C5 for ; Fri, 8 May 2026 07:05:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223924; cv=none; b=eqkSgFUVDPIsU+YFVg97ZbEoE8uPZlVfsKbS7InsUp/Np5SEd6yPYyrSQnaxNTL2MhF5hknycr+leTjSqP7EAdKyT8zenk40PyfBykhMv+gBxUNmgXQVfk2S/Z4iGvWV/uOSZCZm/pvKJLeF+fC2o9yqfDIiGEqaqwQqKu94L6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223924; c=relaxed/simple; bh=5N9oFZ8HECJaLNtbmhn4A0O6HWE+JPp+zj5icqVBAbc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OFxhow0G4fYoowARsT0C17r7scHIdCafgxVmqu8+DkzbkOhodhG6KCgH0Rb/y9YD/ySDXgfC5VeA82D5hxTY0/jejrD+J4AYrexnE7HaH5+uJf7AhYLzqeyk7WvsZVvoa8J1kLKGDS6UAfYaE5O2wx75lXyFhC+424qrRiE8JzA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CkDUMNHV; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CkDUMNHV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hSX3kT04dBcUx7McLbktqYQMd8rf0d072yGD6WxHixk=; b=CkDUMNHVEb77CarSmH728T+jWPaZ2Qt/F+qQqAWtnlJ4/TjEWQZHt1AvbicWb+dHtCMChW fOdmtgH00KH0pU8xCyJ1ZledGgSgR1QiTf3ieG5SwoyGGNw6E45H6f72QD6ZbjT0mqM0sP l55lZLsH4UgECTUKz6bmKIeME8vGs2w= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-400-DZsgZeDNOc-5y9chhIdsbA-1; Fri, 08 May 2026 03:05:17 -0400 X-MC-Unique: DZsgZeDNOc-5y9chhIdsbA-1 X-Mimecast-MFC-AGG-ID: DZsgZeDNOc-5y9chhIdsbA_1778223915 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 82FB91956096; Fri, 8 May 2026 07:05:15 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4C0E300019F; Fri, 8 May 2026 07:05:12 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:47 +0200 Subject: [PATCH v2 07/10] drm/panel/sharp-ls043t1le01: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-7-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1588; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=5N9oFZ8HECJaLNtbmhn4A0O6HWE+JPp+zj5icqVBAbc=; b=mcvbDNGOVmsfyi/2gkIGXSeDxM7nJMC8PJR4/N/+oZWpvwIuaaTnOgQx2n70mFJyN6U6EgYQr Q9tVE5X499zDk5U3ZGtReynH+zPE+f4JEbYzpfYG/Vj90CoZ4BIwE9y X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/= drm/panel/panel-sharp-ls043t1le01.c index dd1eaba23ad3c..989b030ea22de 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c @@ -199,8 +199,6 @@ static int sharp_nt_panel_add(struct sharp_nt_panel *sh= arp_nt) gpiod_set_value(sharp_nt->reset_gpio, 0); } =20 - drm_panel_init(&sharp_nt->base, &sharp_nt->dsi->dev, - &sharp_nt_panel_funcs, DRM_MODE_CONNECTOR_DSI); sharp_nt->base.prepare_prev_first =3D true; =20 ret =3D drm_panel_of_backlight(&sharp_nt->base); @@ -231,9 +229,12 @@ static int sharp_nt_panel_probe(struct mipi_dsi_device= *dsi) MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_NO_EOT_PACKET; =20 - sharp_nt =3D devm_kzalloc(&dsi->dev, sizeof(*sharp_nt), GFP_KERNEL); - if (!sharp_nt) - return -ENOMEM; + sharp_nt =3D devm_drm_panel_alloc(&dsi->dev, __typeof(*sharp_nt), base, + &sharp_nt_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(sharp_nt)) + return PTR_ERR(sharp_nt); =20 mipi_dsi_set_drvdata(dsi, sharp_nt); =20 --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E830382293 for ; Fri, 8 May 2026 07:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223929; cv=none; b=AUP3TuXas5BpE9j9xjZtwvX9S/7mqEKhjd4SmTf83CriAilNRl1m6cd0AE8t+gXnILCSsO9RzW+HAekjdiwZ15mCh4K4Y5Xr12oAhbxLejyPBKWLEjnXkN7ylDrLn3CjAxj+f9//L+y7PLYoFEO7mNYMBF9H3/BhTmI9ty/pLU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223929; c=relaxed/simple; bh=zzRmy8+S6AVHRJjiVODQIUo09hW24p1wDFWc0qTxomM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D3UlTSyFxzDd6/z5mGaoh7nShvj/MIARQVBRNRJtD9/IWzstgut9KBQKOBgXHTDxPvFqlEKvOPrjTm+PBY0du9g8YLn2sjMq9XDBhSZ4dJqe/NWf7DJvHvhTb5yQo3PRIOsv58qynrmKJXBf7sdfFAVdpppOXNX1va0JErDUxwQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=i52GecLL; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="i52GecLL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cZeuvfXbf7xIPBFZ3/Vuaou0NHVk7WJ2p3e0LcsfRHQ=; b=i52GecLL0ilxm1xhxC6ZxAI3eDMKqhQIr+RU4RgFFWAA28c/QBv9NPM03IjMkpgulKmrcA 24cYJiKdLvWjNDGqgYcJHI+0WDi+p/0BiGZ3dgxR9sQrPaR9IS/MTITVwhhdsh1/nqr/43 DlGXYf/X2hQgBIcdeuabWOr43oGoCJc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-D2zaEuGGPOi6Mka4YI-riw-1; Fri, 08 May 2026 03:05:20 -0400 X-MC-Unique: D2zaEuGGPOi6Mka4YI-riw-1 X-Mimecast-MFC-AGG-ID: D2zaEuGGPOi6Mka4YI-riw_1778223918 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 933CA195609D; Fri, 8 May 2026 07:05:18 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D5D55300019F; Fri, 8 May 2026 07:05:15 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:48 +0200 Subject: [PATCH v2 08/10] drm/panel/truly-nt35597: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-8-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1454; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=zzRmy8+S6AVHRJjiVODQIUo09hW24p1wDFWc0qTxomM=; b=qI8RWQaNnQWzZukdoKysTbu6oHc1Ok5ULRjSCMP+ZZdoesm1DBUscgKtNPeYfkcWGPRWqT+sf V1cuvooVX//AoWHHrjo/waIxQp2vYndk3VmGfQjo8Nm1f5ggj4N8gEs X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-truly-nt35597.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/= panel/panel-truly-nt35597.c index d447db912a61e..f740b9257c09c 100644 --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c @@ -476,8 +476,6 @@ static int truly_nt35597_panel_add(struct truly_nt35597= *ctx) /* dual port */ gpiod_set_value(ctx->mode_gpio, 0); =20 - drm_panel_init(&ctx->panel, dev, &truly_nt35597_drm_funcs, - DRM_MODE_CONNECTOR_DSI); drm_panel_add(&ctx->panel); =20 return 0; @@ -523,10 +521,12 @@ static int truly_nt35597_probe(struct mipi_dsi_device= *dsi) .node =3D NULL, }; =20 - ctx =3D devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); + ctx =3D devm_drm_panel_alloc(dev, __typeof(*ctx), panel, + &truly_nt35597_drm_funcs, + DRM_MODE_CONNECTOR_DSI); =20 - if (!ctx) - return -ENOMEM; + if (IS_ERR(ctx)) + return PTR_ERR(ctx); =20 /* * This device represents itself as one with two input ports which are --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BBD0381AFF for ; Fri, 8 May 2026 07:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223932; cv=none; b=s/TJ/JxuYyFEZ2pgRraBD93PILzkZuACOewDK4WQmdoLqdzt4RCNx2Dx6U0L8BR/zzGsx0PdUnq0y9frcYZxQDk09/Bn/+3XznKVuDZvuwDjSWgqgz7zE3VvfKWAF1w75gVBmoyI9nrD/LUJFv+3NvRKg6s3zz82YoVZzGr6H+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223932; c=relaxed/simple; bh=WXDkA799TmP0/IVTlXYlTe+yjr9Iq9dPIZRGjxovEfc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e7If1cItcoybYSeSom2bXn0hCGyuoOfacvcTAsFi9MS+mNCZQT/BJqpfcl9cmnlz1RYsYLJYw2nfzSyUTs45A7QDUZc0A0+9x/NHGzpXaMCuw+8hP9vUU8EgB/gU9c3HmFhdjHn5IVuo+sjk8FmIEE6bOEnnsqnqHm6sb8iHNfk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JbFUCry5; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JbFUCry5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oB/i63d/FtH5xEfcUW9Elw+pk8CelNQvB+fNp598Iks=; b=JbFUCry5akhG1ECVPepoYbzBPkctnZ8kvmifY99XRdc6Y/N43A5hnaq/u/qatQgueoVbdr nw83vvFoSxiBJths9XEk/EH5brdRu4xGZ/vPxPp/fLpbqTlY98W2bSjJ2mRy52stzlISHk +oiIHBaQoNK7HNt+M8QZnvRdc+L83OA= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-XtCH1LTWOYOaJ0vIrAPU4Q-1; Fri, 08 May 2026 03:05:24 -0400 X-MC-Unique: XtCH1LTWOYOaJ0vIrAPU4Q-1 X-Mimecast-MFC-AGG-ID: XtCH1LTWOYOaJ0vIrAPU4Q_1778223922 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5C6EF18005B5; Fri, 8 May 2026 07:05:22 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E49A33002D2F; Fri, 8 May 2026 07:05:18 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:49 +0200 Subject: [PATCH v2 09/10] drm/panel/startek-kd070fhfid015: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-9-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=1483; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=WXDkA799TmP0/IVTlXYlTe+yjr9Iq9dPIZRGjxovEfc=; b=8IH4rYlE8XRziJY9Io6dWFchl2LwK3lyQ8cu4vxfGmUq6MAAjHmcXfJrWE+NXtnuCRz5cEi2+ gXPcbTYdeuxCqcrBYbm+KvlGs3HRcR5dfWG1dE5QHepIufv/JyCzTF1 X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Reviewed-by: Neil Armstrong Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c b/drivers/= gpu/drm/panel/panel-startek-kd070fhfid015.c index c0c95355b7435..7f04b7b404e7d 100644 --- a/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c +++ b/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c @@ -286,9 +286,6 @@ static int stk_panel_add(struct stk_panel *stk) return ret; } =20 - drm_panel_init(&stk->base, &stk->dsi->dev, &stk_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - drm_panel_add(&stk->base); =20 return 0; @@ -303,9 +300,12 @@ static int stk_panel_probe(struct mipi_dsi_device *dsi) dsi->format =3D MIPI_DSI_FMT_RGB888; dsi->mode_flags =3D (MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM); =20 - stk =3D devm_kzalloc(&dsi->dev, sizeof(*stk), GFP_KERNEL); - if (!stk) - return -ENOMEM; + stk =3D devm_drm_panel_alloc(&dsi->dev, __typeof(*stk), base, + &stk_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(stk)) + return PTR_ERR(stk); =20 mipi_dsi_set_drvdata(dsi, stk); =20 --=20 2.53.0 From nobody Sat May 30 12:37:35 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BA41382F26 for ; Fri, 8 May 2026 07:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223937; cv=none; b=kntOkMF+A/xaZCnjHHDyTiCg67T0zCiYLdApXOXV6CzjWkiiMD+fOP8jw0PVFfT9KwOXQdNi1H1tPFakRtv9O/VcyEBvmt8glFDcYx/pkvc3mpn3ihudQPvFpX+fIhhTgtizzgw9W+rxDw3BdXMiV2Z6tAK6HVvBmv/Gn6tiX5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223937; c=relaxed/simple; bh=OQllEoVO7xGt0UI+IRwd1Doh/tPenWnP6xg6RG0380E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WYiR7vhTTDhzKeBhn3Lu6Z3oCCypySU3d3RJayAs11pJYi35pJY5zXiu0OpmNgGaPJqb3Ahx7MjUPuWe8uiTv4EaE2LWYenO737jQnsd5rlBwDUDxo1nbEpVfbKNnP4uoKB44MYx6dVZA74FwjcbGanjBIeBJoEW5jl9H6blh20= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=anExfyzY; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="anExfyzY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2qKmDXANM4fAJMbfll/+yceF4Qy9R+jWVzBRPdI1AFA=; b=anExfyzYtwnpk3uxqcDkZkmDwAR45bsc3MM2TWk/PfkAAItVEBy3PPO4Wsea7kWWBxim07 zc2OToDyH+ndKsnQRglgS+jXWk7NLgaX0xKtrBCT9IlIwulfjQdNUgzI91PGa2Z+KA63GZ PB+6WabHDTAKQz+Tumhi3DxoD4or5VQ= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-qagchn4rNEGGl_URuSjgNg-1; Fri, 08 May 2026 03:05:27 -0400 X-MC-Unique: qagchn4rNEGGl_URuSjgNg-1 X-Mimecast-MFC-AGG-ID: qagchn4rNEGGl_URuSjgNg_1778223925 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8D23118005B5; Fri, 8 May 2026 07:05:25 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AEF58300019F; Fri, 8 May 2026 07:05:22 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:50 +0200 Subject: [PATCH v2 10/10] drm/panel: Make drm_panel_init() static Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-drm_panel_init_rm-v2-10-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778223888; l=3277; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=OQllEoVO7xGt0UI+IRwd1Doh/tPenWnP6xg6RG0380E=; b=oL5k4LJGRJZ7Euwp/lmy7oKzWo+xiz1OpIjnuSHx59iNmL0kyGICvsdG7m821R23neXU1DauI n6M/GxfZLviCp7hS22nTxAe+NPtuQXX8S1wsOHy88yax7MrqJn72UkD X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Now that all panel drivers use devm_drm_panel_alloc(), there are no external callers of drm_panel_init(). Make it static to prevent new users from bypassing the refcounted allocation path. Remove stale references to drm_panel_init() in kdocs. Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/display/drm_dp_helper.c | 2 -- drivers/gpu/drm/drm_panel.c | 7 +++---- include/drm/drm_panel.h | 4 ---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/disp= lay/drm_dp_helper.c index a697cc227e289..6d5556e3c134c 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -4626,8 +4626,6 @@ static const struct backlight_ops dp_aux_bl_ops =3D { * Backlight will then be handled transparently without requiring * any intervention from the driver. * - * drm_panel_dp_aux_backlight() must be called after the call to drm_panel= _init(). - * * Return: 0 on success or a negative error code on failure. */ int drm_panel_dp_aux_backlight(struct drm_panel *panel, struct drm_dp_aux = *aux) diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index d1e6598ea3bc0..9c3cbc7aea2c3 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -56,8 +56,9 @@ static LIST_HEAD(panel_list); * Initialize the panel structure for subsequent registration with * drm_panel_add(). */ -void drm_panel_init(struct drm_panel *panel, struct device *dev, - const struct drm_panel_funcs *funcs, int connector_type) +static void drm_panel_init(struct drm_panel *panel, struct device *dev, + const struct drm_panel_funcs *funcs, + int connector_type) { if (connector_type =3D=3D DRM_MODE_CONNECTOR_Unknown) DRM_WARN("%s: %s: a valid connector type is required!\n", __func__, dev_= name(dev)); @@ -69,7 +70,6 @@ void drm_panel_init(struct drm_panel *panel, struct devic= e *dev, panel->funcs =3D funcs; panel->connector_type =3D connector_type; } -EXPORT_SYMBOL(drm_panel_init); =20 /** * drm_panel_add - add a panel to the global registry @@ -708,7 +708,6 @@ EXPORT_SYMBOL(devm_drm_panel_add_follower); * A typical implementation for a panel driver supporting device tree * will call this function at probe time. Backlight will then be handled * transparently without requiring any intervention from the driver. - * drm_panel_of_backlight() must be called after the call to drm_panel_ini= t(). * * Return: 0 on success or a negative error code on failure. */ diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 2407bfa60236f..55cbc51512240 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -320,10 +320,6 @@ void *__devm_drm_panel_alloc(struct device *dev, size_= t size, size_t offset, offsetof(type, member), funcs, \ connector_type)) =20 -void drm_panel_init(struct drm_panel *panel, struct device *dev, - const struct drm_panel_funcs *funcs, - int connector_type); - struct drm_panel *drm_panel_get(struct drm_panel *panel); void drm_panel_put(struct drm_panel *panel); =20 --=20 2.53.0