From nobody Tue Feb 10 11:57:55 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 5C6541AC44D for ; Thu, 3 Apr 2025 21:24: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=1743715490; cv=none; b=L0Z5mC7TvE6zWjuykRi5ErSVnVRQAQc0/VOxeEwiEVRBQsMo6KykZRmqtMY6Ny4DKiqYheCfD7bMlULratVn38AO6hyMPhd8u2Uh9rjyxO8WJxsrQahBZjEzP35T68FmhYBZbDglWkiYmAdtznyQ2EIuj6I9Waxc+XAnyfScPMg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743715490; c=relaxed/simple; bh=QpRHMlk5yR95L+pmBVJpQE91laqppsvNWNrOvBX0hSA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RFuKR3TXlggYvyNFUM1Hamr7O+iRYCbpgN82M4x6RyAzzsswn+6lZdFAZVHDeOA6hrmuyQAOPyMNxyL0ppUq9HPdFHAYm/CycrPVq+oFsUDxAUfrl46nXmqWtAuZ1rwH/KoHmxTnqh07VVsTgssaAe2jGOsO6JGojDrJHCSHMgo= 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=e2BBPMdX; 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="e2BBPMdX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743715488; 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=t5cYEcnOYo2sXwkNMHEp3Ecxk7hF4XQARQoc3ySPtAg=; b=e2BBPMdXfAY87hmrdYgCxhVgS/nXeQR1y/iZ4ao+UGCr8VEG94FU5E90nbRmA0E1/KPeHG 3BpCcEzKGRIT04qtpGzqANau3OtLEMCg6Bk+ikrnx+JimEWSCtgr5V9n27IDVS804hhA0e gkTLfkmtPvbN7lxnIHHrE1StPYZOBYA= 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-122-0vVFNIR4MPmf6YhGUTOohQ-1; Thu, 03 Apr 2025 17:24:44 -0400 X-MC-Unique: 0vVFNIR4MPmf6YhGUTOohQ-1 X-Mimecast-MFC-AGG-ID: 0vVFNIR4MPmf6YhGUTOohQ_1743715481 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 64FC91809CA5; Thu, 3 Apr 2025 21:24:41 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C8011828ABD; Thu, 3 Apr 2025 21:24:36 +0000 (UTC) From: Anusha Srivatsa Date: Thu, 03 Apr 2025 16:21:01 -0400 Subject: [PATCH 30/46] panel/sony-td4353-jdi: 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: <20250403-b4-drm_panel_mass_driver_convert_part3-v1-30-965b15ad5b8e@redhat.com> References: <20250403-b4-drm_panel_mass_driver_convert_part3-v1-0-965b15ad5b8e@redhat.com> In-Reply-To: <20250403-b4-drm_panel_mass_driver_convert_part3-v1-0-965b15ad5b8e@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Robert Chiras , Linus Walleij , Markuss Broks , Artur Weber , Dzmitry Sankouski , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Ondrej Jirman , Sasha Finkelstein , Janne Grunau , Michael Trimarchi , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743711639; l=1447; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=QpRHMlk5yR95L+pmBVJpQE91laqppsvNWNrOvBX0hSA=; b=LERYemt+u8xO/rmXZawbL2dxncCLko/JSEEnWKoPZjzOUaOAcPYUBOwTUtYlg5PPdxmVFWwBf uEAtPPgTiigB3piKJDJK4DJ4IQzXDI/VTPI+XSnuuVbIi5CxFEWZ9n6 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c b/drivers/gpu/dr= m/panel/panel-sony-td4353-jdi.c index 97f4bb4e10297532b3e0762db3433187ca6240f3..7c989b70ab513084d28379f347c= 9851a350e433e 100644 --- a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c +++ b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c @@ -175,9 +175,11 @@ static int sony_td4353_jdi_probe(struct mipi_dsi_devic= e *dsi) struct sony_td4353_jdi *ctx; int ret; =20 - ctx =3D devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx =3D devm_drm_panel_alloc(dev, struct sony_td4353_jdi, panel, + &sony_td4353_jdi_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); =20 ctx->type =3D (uintptr_t)of_device_get_match_data(dev); =20 @@ -206,9 +208,6 @@ static int sony_td4353_jdi_probe(struct mipi_dsi_device= *dsi) dsi->format =3D MIPI_DSI_FMT_RGB888; dsi->mode_flags =3D MIPI_DSI_CLOCK_NON_CONTINUOUS; =20 - drm_panel_init(&ctx->panel, dev, &sony_td4353_jdi_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - ret =3D drm_panel_of_backlight(&ctx->panel); if (ret) return dev_err_probe(dev, ret, "Failed to get backlight\n"); --=20 2.48.1