From nobody Sat Jun 13 13:43:37 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 3DF513E958D for ; Thu, 7 May 2026 11:53:27 +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=1778154809; cv=none; b=pEp/r+HRrbnDx2Ms78s/IOFtHpQl3z9ad+2dApIxwXv8y84QmKChm3aLJvJopXFPf2v4BOd5SEqkqfbU7phh57QHULH5a/fZoV5ipdz8ZmfsX1qhL+7WmJMopz2YYfJJQ/EJ8yyed96ntrisMWMNc8NhD/DNbvTKywUoaRCm5z8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154809; c=relaxed/simple; bh=Cs/iqF5SDxMmFOXztnRRhVVFZ/tvoF0XeeIPy/SiKEA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MD8iiObGxe814ziY9A0kGIQ5bzlmlIwv1UEgCz/VI+rP/0hJ/dOc8c67MbELc85gUrzYzxqsbWjPu06casvfrGQ1ykN0pxkfDe5EWsHnD6VnwVK0HB6JAGDs1xu4R3I+fU5RUX/ZnXWJ7WnN/Wr8yZtAzjWN9AbpWyI2LQ5cvCY= 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=SVRmlEeq; 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="SVRmlEeq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154807; 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=nRS27qicE0uRa2/oclAZcY98otxwaBKVwbGq7058tMo=; b=SVRmlEeqz3yfDYl1XxwpkeGZtfJwzTBa6EJr4LqYdfx+JhDD6BgJciMm5D8z0H078obDeb SYJfhKroM54pZV3aVxBEMXZo4TWXBgHaz7M7cPp1fPONVxX9W+Ok3aecY6AKCeY1U6u3oQ h9or8Uh3sxSXIj6KpnnfzZ2WPEs2TdQ= 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-677-if6Satv_M8evbINpimY7uA-1; Thu, 07 May 2026 07:53:24 -0400 X-MC-Unique: if6Satv_M8evbINpimY7uA-1 X-Mimecast-MFC-AGG-ID: if6Satv_M8evbINpimY7uA_1778154801 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 1D1AA180058F; Thu, 7 May 2026 11:53:21 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A22A11944B20; Thu, 7 May 2026 11:53:17 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:52:59 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-1-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1703; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=Cs/iqF5SDxMmFOXztnRRhVVFZ/tvoF0XeeIPy/SiKEA=; b=i0uX22F04jeAodylsg2Xn73w+w5cfpVq16nh/lG38N4DargXKW1ml7WjNTMIjrDPxImpAUXZf uc2YLNcuFTdBaxzKyqO4WZENJ/lkWyiem4H6vBmNwOpXSvOzPi5iBCJ X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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(). Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 AE3283ED5C5 for ; Thu, 7 May 2026 11:53:29 +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=1778154811; cv=none; b=jTzq1zD3r8PKmUXgNMy2GGOI1pc5JQnPEbgWF2+EHvaPOFo2u9v1rsn+oKgVTRuVd2R+0I7gfc6KjDq3F/T/7sJDrCOQZOo2a+vm1ipxvkoBtRNWkfhfPyxc8ihtPqLGp1HdbiDrMgawqHvO074oR61wDbrXr3V06BBT2qxmCAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154811; c=relaxed/simple; bh=8seNNF5wmZlO2lSkwjfLccs1a8t3KBai4sgzDIvFS5o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XT/KtVhx0NkbZz/6HYvIheNz3ySZsig+MOwtWYCVEODW+P34SQRu7WAZ4sbTU9T99GHAbH58wCEP3ZfaKPlPoogKlt6we37MdYSRy8C57hK+KVmfz24I/ddxtauB8A+U9rgDEtqK3Ge6AdUAmdVWeUSgVRfjK96ia79+m7sWNDs= 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=WjXW3esp; 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="WjXW3esp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154808; 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=aL8b2eqRuN5AkolwnhE/0kxkp+dMT6ZMyaM56y6Sov8=; b=WjXW3espha6pR7xIgiqaZc4wPWYie+wKFxzh6YAHyYtcl2/7CF7IbTUXZHSPNKsQg1IAgX cKWCNWDFU+oxqnQ1nJQnrW4WA10mXM/S9Ip+BAUZmuEYb4+a0pKSQjtp7/LXhfuV5yMybQ QqcX//FohJJH1ZVI1eOhEgg+NIX6cCw= 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-38-7dFsKPWJNk-N8eLes8mK3Q-1; Thu, 07 May 2026 07:53:27 -0400 X-MC-Unique: 7dFsKPWJNk-N8eLes8mK3Q-1 X-Mimecast-MFC-AGG-ID: 7dFsKPWJNk-N8eLes8mK3Q_1778154805 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 E5A6519560A1; Thu, 7 May 2026 11:53:24 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 870C01953947; Thu, 7 May 2026 11:53:21 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:00 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-2-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1450; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=8seNNF5wmZlO2lSkwjfLccs1a8t3KBai4sgzDIvFS5o=; b=WOOMcyQ5k/wALs3jxb+iPt0SzJc9CKbNtOugRO9vF+tLbsLd0fIKzC46/zVuM3OAKyU7y1FFg /wFmzhsMKnfBbWoFWhCRDwZUgY9f3dPLKY7jl1m4qPJsXciZfJdeaNn X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 C40133ED104 for ; Thu, 7 May 2026 11:53: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=1778154816; cv=none; b=SuHSs8k3f4SwgEybKUlckuK/ofRVbC5WlDYpepDuQ06+0sd/J8hr1mLhY4+uP5SLwoHZ22880Ft1skbu2p5e7sWqof/6+Ku134ZqUQU4ypVx8aGyxo6Yiprb0le0ITf2UbnXLeSrxqquPkbABgsXgqaaVC+fy07oOifrZwpET9s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154816; c=relaxed/simple; bh=Cmzk5b8fn7iFO8uFcvkpBYq71dcoiN/cpahXR6+rA0c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rexldUer60JoeWjpqjbkT/q2P4H58Rr2dKZvp70SZyniOSBR/BjP2W7se4Z+GBEe5KUjfjmxDZheUR8X+DUZ+MY32bEIrdHvqGj99YoBX7uyir2DQK8eeimkNTTf0l3cN5cI/Kb9F437jvE7nc9WQbv+eWTcfATBiLqdRmVA2C8= 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=VIRvy6Z1; 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="VIRvy6Z1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154813; 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=tySrcuxHNKCxHzUnJqEkD2hz1lP/Bb/SWB6xgNCtY78=; b=VIRvy6Z1W+zSUvYUyeb68HNbTKCKtkZO6/afPBHIF05bMiRu51VTkLlCEDM39w7GeXQY7F nV1k1RTwg/QC1fHUbX+q4/t5md2JcfR2mzswi21j4tANWAiqv5uXDRwnaSaPchMO2rrlPv BZxuuetEt8rqk1QJBIe6SSQlC3Cu3YA= 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-142-EYMNrU16PgyIhiMp9ocCLA-1; Thu, 07 May 2026 07:53:30 -0400 X-MC-Unique: EYMNrU16PgyIhiMp9ocCLA-1 X-Mimecast-MFC-AGG-ID: EYMNrU16PgyIhiMp9ocCLA_1778154808 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 793B919560B2; Thu, 7 May 2026 11:53:28 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5FA7B1944B08; Thu, 7 May 2026 11:53:25 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:01 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-3-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1503; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=Cmzk5b8fn7iFO8uFcvkpBYq71dcoiN/cpahXR6+rA0c=; b=Q4HNRzcp+adAfamJ/WZYx7KzY11jTbemvA9jlj+djkr79JXYbLcUfNtyzR2ikl5fvKAjGs0mk Q3ZJi6pyjZgAvgA+pLBhwoxKL74FRup5u3fynGcwkwqsGasHd8SErEg X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 844143EDABB for ; Thu, 7 May 2026 11:53:40 +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=1778154821; cv=none; b=jeVJgOj4ZuD6XYxKmp4FUfww5eN3Xb2cDouuprH0LX/zU58YZzjHepI9Gim+Lfox/B1OVt7Tw1LZsE+W5l+MAS2uUCK9D27/6c9we2eaU7gST603IKwoVcwpA1b6XIbDuhaYw6DbpYsiXbcj8yNY6PZznf8nyHGKxQpF+/Og4m8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154821; c=relaxed/simple; bh=9tufjyYUKdnTm46sdQqwurSTxCDuKd4OYLCAWRs7Jos=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VrvUD8LXDRtTtEDs9raBMp7i7gYor5cfPT6Nam2szDlUmqoQUavG/cqIWgMM9pBH4kzrPpq8cEudk16IEetmhhU+d/SsSBtmuFfx+i84bvoe1MK72GCBcSL8r5uSi/Hz/qZwoyzdVeW/4c0xfVLUs5UntcM1euD64PaKUtA1KA4= 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=cJ3BNu8V; 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="cJ3BNu8V" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154819; 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=cZF/mON8kP1kMtu1A4HwYOmzCkw8/+Js6fL/I70vtMU=; b=cJ3BNu8VSzlcgj4sKSBKTp3MMHN60oE0mD3ooxa5mCWByy5NouMW5LRJpmZSf/hUD4CSlN J+rqsi65fGw9/iHKSVEUicKCSS4F+/gnyk1eOEvjnoXeePQVCoWUPhPOuTZqXlkKXQiq7t 9Qtpa1qglMD2z5/53aRP90NZ/xnBNfQ= 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-266-FRtBiKSNPyS0FnIGyvKGUg-1; Thu, 07 May 2026 07:53:33 -0400 X-MC-Unique: FRtBiKSNPyS0FnIGyvKGUg-1 X-Mimecast-MFC-AGG-ID: FRtBiKSNPyS0FnIGyvKGUg_1778154812 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 A5CAA19560A6; Thu, 7 May 2026 11:53:31 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D41D71953947; Thu, 7 May 2026 11:53:28 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:02 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-4-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1449; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=9tufjyYUKdnTm46sdQqwurSTxCDuKd4OYLCAWRs7Jos=; b=tN2XFGQ3bahFvpxu+iiImreUmiA3QU4z6Fj0sTBWVejx2ooS3EBE4m5LnUihY3LoQ3aMkL3U2 RQnUUnH0M9tCID1yurD3lutEXaP4hksOZ7UMEZdUaUxLUIp7C/pmSQs X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 2143A3D812C for ; Thu, 7 May 2026 11:53:40 +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=1778154822; cv=none; b=fHaTSEpX7z+CGTBIzemgSZV0oRBwBk0+GuOoop7l2TEa2/ZWvZ6sEB39inmTyNN5G1WXl0k5RIj0D6MeSjTIXtNUmWQLbGAucoqjx3yzfV8lVhB5xPqs/guyFWG+TjJGnVL0vL41ZrBTbR/1Kzy5hxRSkYibYYguHprpucgRcvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154822; c=relaxed/simple; bh=IaFUJ7+3s2xTJ69WdANK0mreSE3YchmxzKWGbkL/Z5I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k229F6EVHmEw5EUirgy7khX0lccbp1otmb0NTIlMc6wAl8icaYmndQWKNvBetW52jtSYg+sjxEUf+rDnZfRw0rCXL282rXh8/8tblQzgd3NMpdVR1BL1hhHzrVQyy5Hbd6zFH/vyFSJIFiKv7uKQn6hS0V34ja6bBWAnZpimFxs= 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=XM0Yw3EI; 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="XM0Yw3EI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154820; 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=FRfKp+svIbC/1Z6WC5kfdf6Q8yUsYq0CxMzwjfbjmB0=; b=XM0Yw3EIIQZ3HiWVoc3O605SbYSf+8BWuE9bZdf3NfbrH5Tw6rfgioZ6HyKhlERBoigc2/ pnnoWkXNWGDgJhbLDP31xotqdS8YSi3n53ntywrUPJsnxsz6z07VPuti8/UxtIgoP08Trf B1VSXAoqC6QhJzW4/0sPNjWAATpEyAA= 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-455-V401mtd_MCeNriVL3gurWw-1; Thu, 07 May 2026 07:53:37 -0400 X-MC-Unique: V401mtd_MCeNriVL3gurWw-1 X-Mimecast-MFC-AGG-ID: V401mtd_MCeNriVL3gurWw_1778154815 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 05F761955F3D; Thu, 7 May 2026 11:53:35 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 16FB71953947; Thu, 7 May 2026 11:53:31 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:03 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-5-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1437; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=IaFUJ7+3s2xTJ69WdANK0mreSE3YchmxzKWGbkL/Z5I=; b=Oj05dVEcXgVB9i+IavuMuqR812x8MKQnlX1VV7xi97LUrPiaLB6naeT05XhGc0wcXEX6nRXCY Y63c0kfSrpnBq8XJ/yVpBypxPC29oMX56r/ImJq64jyrFU2wRX7SDsu X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 1C7073ECBD0 for ; Thu, 7 May 2026 11:53:43 +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=1778154825; cv=none; b=nLw/sUtW4BgvlPVHkp1DMMdVJizt3iPxBwlhRAa5TI9PNsAQ27Thve/vvnqf9NwW4AN+ASAFknmXddYpTRcSp1Q4zCyrkWMSPzfayxVirLuwXpd/PcDLi+E2OdZTLq22SQG1/jiUkNmEN6LDbjNiCzR+5/uoIPuTRc8h+cAjUoA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154825; c=relaxed/simple; bh=FpHpJNHkCYgy3y8j0mWQ5oIzER8Ra/+Z02wOwSAM9MI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qwqx6RAc1/pLqFE/WJwP+5X0hwFpgbGm4yIgrIjKIfaQEzG4aUt8HaqjeTvQvAz8QEDLwLYOB6mtC0zbKqHdQ1QBwb52uBsmrTuxnijr8rXOK9H2o5bKZ+eRt1cJY684O8hqrHlGFwoIuR/cKJcHHlzuulK697PRGbmzrB+qpuw= 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=bYnnh8Ly; 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="bYnnh8Ly" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154823; 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=IE3BWZyYOdu5leK97onwAvhZpTyClEu6HIwPYoGCizI=; b=bYnnh8LymoBNd5xfrgDjy9wrMfOipQKt5G8y6SqXMnMRUwonlXtGLOcjnP1tJ6uhqXgXpI pItKbKKuVXnq3wHbSzi5LLdKh8BO+1Ks+HBf8+AX09BJs+l+K/cGHZAcZAmAM5gDwCyuzs C7niD1z7BZgmPk/0PPMkvdErTeSncmc= 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-589-M_y67Cc-Oz2uFZh3TiP7Pg-1; Thu, 07 May 2026 07:53:40 -0400 X-MC-Unique: M_y67Cc-Oz2uFZh3TiP7Pg-1 X-Mimecast-MFC-AGG-ID: M_y67Cc-Oz2uFZh3TiP7Pg_1778154818 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 46E4D1956088; Thu, 7 May 2026 11:53:38 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5DD141953947; Thu, 7 May 2026 11:53:35 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:04 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-6-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1647; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=FpHpJNHkCYgy3y8j0mWQ5oIzER8Ra/+Z02wOwSAM9MI=; b=k79Kee0ND/sFz/hICYWHWBkmsQB8rNRNnMCTjw+kOmBpy95zFjCzANyBg4zupJbkloa/fP+Ix U5Mup4kgkZTDOT0e5Mqt4bEy35LrBcsh57SBnPxwuMvQcTQIeDGL0k4 X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 5C9533ECBD0 for ; Thu, 7 May 2026 11:53:49 +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=1778154830; cv=none; b=jN3nsM6QGNKhvYfogmzULdTt5Oxl7u+Og/bxg78sWs87hV0rdYKRloFGmZPfNQZrzT0A9rPIE2CAzI6U+wZY6Fwm9hbo8ohb5xN+k4FdpDnoXfYIFSHRThoN7QeF+xvIjrmp5FYOEfM2lVyOXwC24FBSZnWmL142JenCZTetpkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154830; c=relaxed/simple; bh=N4l43RObwLE5MPV7HoKRM2V5L6KokU0gWbogX/4X0SQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B/nYLCNlUapQTyd+PdwP0YbLDZlHSijnNhNPs8qNZZhvL+8SeqvxGw4ahKvP9AVY6t8egmuhhVUil9ytLqmoDwMlJj0Nu+PIeb4YjGqVuSjaKxoSMwBQQ6E5Yqv+W3a7ShlZ2sOKWzUFv2HVCQ/PyQWxuG1YYsfuuulMSLJoVFA= 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=cicWbXNH; 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="cicWbXNH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154828; 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=hOpd/ryTYMhZBRHAsKFzExz+0x9SvwaW0sGvcrox6ls=; b=cicWbXNH+VBupPSQ5IsQ76pW+w2iyX+/5DSQob1HsVdwyahvxcG1r7l43UEIKfgJCict2g 5Ge/4Qlpy47PgSYIoj0g/fjrG3rOzXXVfCFs697pl+WRUGmBc8YwiiH5YPsyV6ZiNcfVrI Ptn9H/pFXDfIVt30hC9oQ/UrRlhNHxY= 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-418-6GIMMGVrOSuGn2mkN8Jg0g-1; Thu, 07 May 2026 07:53:43 -0400 X-MC-Unique: 6GIMMGVrOSuGn2mkN8Jg0g-1 X-Mimecast-MFC-AGG-ID: 6GIMMGVrOSuGn2mkN8Jg0g_1778154821 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 6D5E0195608A; Thu, 7 May 2026 11:53:41 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A5B0B1953947; Thu, 7 May 2026 11:53:38 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:05 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-7-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1482; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=N4l43RObwLE5MPV7HoKRM2V5L6KokU0gWbogX/4X0SQ=; b=2drZaMLfj3NMoW7mOknKV+tFzSacUaqd33eX92gSo4eLJwCOgnj7DJ1imeygOgAE3VJMOSY37 cCRNtcTG0vTDUZ35NsRFJD9c4cOZlCgYy5QzG2zzPVmJq2yWrPIYVxm X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 8C2493DCD84 for ; Thu, 7 May 2026 11:53:50 +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=1778154831; cv=none; b=LBV1SkomXOsFvlK9cLhY/0smRRx0m9Fwj14pT+X/EI+QqweW4SM7Gs28Dbt+wT4vlJvLM/iFJmGT91p7nixT56qe2AIgX7NF89g+lhWqMW9EhpEJRInbJCwQ6AYiTQFQ7cPntFeg13XKTJ0q/N+FUmQowOAaUFM9eSCxB60FC/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154831; c=relaxed/simple; bh=Tt9ZWviFs6uLhSDVey/W9KZGDljayO065cRCjOaQwXs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gvPkY+Z0hAph4g7IcvnHLZEn76+yDQlsHV95QvMkMpM4kibFlzBPOxnWdfvhLF0h2Ma6bVTo6rCuR3tSlFKInAa16+zwB+Oj2pBdWq9yA7I1tZE1JJVoeUiVxAgra6/qgioYXIQ1JwloJHJ6vrey8pchsZsm1q4pfwAekkdqN3Q= 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=bOA6gGlO; 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="bOA6gGlO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154829; 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=EA0KuE+QB/5ASorP5EN+xJCb7/3W5RAUH7flyU8bE9U=; b=bOA6gGlOt9lrbgFtIZ0dH1Ad6fqLM8uJ7P4GGAsRy3zhlCkSM/fd+Xgrwr7BgGsdOK6Jsf BrXXOJxFlAQ+bL00LcwF7XFXhcW+tJMLwmjp1zqq9cTm16/UZ85Ff/pIFLIDAKgXm21ZKh FKNHf2Y8hcRdFKjWNYmQvEW4BeHo6qE= 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-168-sRcaydGjMaGCAlXRpRJYEw-1; Thu, 07 May 2026 07:53:46 -0400 X-MC-Unique: sRcaydGjMaGCAlXRpRJYEw-1 X-Mimecast-MFC-AGG-ID: sRcaydGjMaGCAlXRpRJYEw_1778154824 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 B7E3418002DC; Thu, 7 May 2026 11:53:44 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D30281944B08; Thu, 7 May 2026 11:53:41 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:06 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-8-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1348; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=Tt9ZWviFs6uLhSDVey/W9KZGDljayO065cRCjOaQwXs=; b=YvLXZGvmRMy/GsCnCjr7h3n2ExJUbpq1ZIkaei+z2gOAqrS0T5VHuWRCdB18AtbEZVzh0jW19 EoUWAtN0lbEAW3WMikgBirTmHzbgjI9kjW28TiyUP8oNluSQTXNx9dq X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 AC2E23EFD25 for ; Thu, 7 May 2026 11:53:54 +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=1778154836; cv=none; b=rokIXJIvXw5ZuuYZUlsx2WHnz5g/3ZQo0SU9eXSGrD8Jp/YxyWLfaYC7AAwYh21NLjclbV697JFpr8udSJhqLqpNr1pkA8NOlMfTNanqOs83pJv6ptv1XDgiGbBl4OXEF3m/MWmmQgGzPPL/LUG10+yuug3Cz3SQChww+pSxJGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154836; c=relaxed/simple; bh=25oj7wjq/dxs/D21yMpSRSGXUTrYGO1ffOyXaGNA6ls=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ex3YsU7o4dKYS12i6g98NzLcDeFGnZYuzDvgwu8IGIhbWCA3TKvf5f0YqQMSdoF0gVcfSqXYwpRRBKhoEPiGus5UX3dzvLl9F4Pc4fgJ4CyklCdXcwmwNFzWAJXTIJGvLdgW5kIbYuQV0Ak4RB4NcSlyAyjTzK20OPC7EJ73/Ig= 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=NgxF4gU2; 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="NgxF4gU2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154833; 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=JfVAsWayUmpFaLGdWqPHWwCCmrZ8YiHg6ihpKXJ50mo=; b=NgxF4gU2HVQ6sAVmi4965wK2B88xmN3crLpPWja4f7CgngZBMmrCtlTL63B51PbE87fuIe /uvao1MpQezQps0jXvsDDn/BphPrKdrE/qKZj1AQcEF7XBs1ZrAwvue/xB9B4pSYQuRoBu 1HHZavtwvXVO/JxgHZ43610Df8q3l6o= 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-632-AxXsMPpDOq-T4UcjVla0lQ-1; Thu, 07 May 2026 07:53:50 -0400 X-MC-Unique: AxXsMPpDOq-T4UcjVla0lQ-1 X-Mimecast-MFC-AGG-ID: AxXsMPpDOq-T4UcjVla0lQ_1778154828 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 3CD76195609D; Thu, 7 May 2026 11:53:48 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0966D1953947; Thu, 7 May 2026 11:53:44 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:07 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-9-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=1377; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=25oj7wjq/dxs/D21yMpSRSGXUTrYGO1ffOyXaGNA6ls=; b=6lE+d4kG1AnLnvBtT7IMsQTkuVhLMVLJygKHvXoG1l8CkWcS3ZC7pBXJvIgPjDz2DUFwXGzcK yxo6WOXPaxxAiako+7ElQ34xUON3JGdXVpH+mtY9aYPeM3ro1ATg9ii X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- 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 Jun 13 13:43:37 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 B41DF3F0755 for ; Thu, 7 May 2026 11:53:58 +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=1778154840; cv=none; b=pI0WYHxOCWYVOB+gFZ1XRxMQH5b7YX3nXBb9HP1BhYSb/VOsG76guzBu6Wuf1u3fsOtrvqW7xm3GLZ/vTyeOMj3jnZoGxBOv79zo1aVcWoVnAsFN6UW6fMQ/78CdSa7jD9fUKyS/ruquPcnHslHDwsK3OGz6tZXq6bMgrCVCE8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154840; c=relaxed/simple; bh=NyPU5Jyr7qYKLrnlxqRHJQCdjHevA3vSn9eS4E//z44=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SV/T+d1INk8GsaoIveU68yA24UBfvNkq8etE/jny6xjSQbNQbdcjk6tfid+6G+O9sCQ0NdwxRBlzG6rxlhIQ0yBA++7EvGbPvO1bVkHa+KKk9mkBPofsHvexNZtyjNACBlMFMVSfrNdHd3aOACeTw84/6LTi/oyFSn7uZE73lj4= 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=SnnGguEi; 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="SnnGguEi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154837; 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=3GsJmkqThUnt2brR26qwGZz8nLewh8d7g9i4bVblI9s=; b=SnnGguEiuVvwFmhOWZGzdAf0wPzgkvLh8TSX+VuzTez/xxuQh0D5ecVWNy5HWgknS+zL4U PqlY/yZ3oiQ+FKUd1Ohv1oyZwFkhOxQJJAqJ+Q9+Zm3DlIFaioq0sjAc2acodLyexu4Lp7 OCxa79FznZs+mIY3XTK0Aggqan7dbKo= 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-22-D4PP_y0hNjSp49tgXQo6Tw-1; Thu, 07 May 2026 07:53:53 -0400 X-MC-Unique: D4PP_y0hNjSp49tgXQo6Tw-1 X-Mimecast-MFC-AGG-ID: D4PP_y0hNjSp49tgXQo6Tw_1778154831 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 CF37E19560AE; Thu, 7 May 2026 11:53:51 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 722F81953947; Thu, 7 May 2026 11:53:48 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:08 +0200 Subject: [PATCH 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: <20260507-drm_panel_init_rm-v1-10-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@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=1778154793; l=3300; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=NyPU5Jyr7qYKLrnlxqRHJQCdjHevA3vSn9eS4E//z44=; b=hDmsOdt+AL9ztiUPAR8EaGgiY0RhwtPsxPkX10H/DSptpCKU7+QUolnEU/TRNCX9NPV8OuRzu mBrhnVXudEZDY0dVDkql64SG5q5vs+If3OMle0AR7dPoEnFyICBAkR6 X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Signed-off-by: Albert Esteve Reviewed-by: Maxime Ripard --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- drivers/gpu/drm/drm_panel.c | 8 ++++---- include/drm/drm_panel.h | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/disp= lay/drm_dp_helper.c index a697cc227e289..380ebf0fad2be 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -4626,7 +4626,7 @@ 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(). + * drm_panel_dp_aux_backlight() must be called after devm_drm_panel_alloc(= ). * * Return: 0 on success or a negative error code on failure. */ diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index d1e6598ea3bc0..e3e1c5ceb8ff8 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,7 @@ 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(). + * drm_panel_of_backlight() must be called after devm_drm_panel_alloc(). * * 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