From patchwork Wed Apr 2 15:23:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 294AAC36017 for ; Wed, 2 Apr 2025 16:25:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B69A10E838; Wed, 2 Apr 2025 16:25:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="WoS0g2cr"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 033C110E836 for ; Wed, 2 Apr 2025 16:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611146; 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=6R1AWPeoxjvGK0dBUmPi4DefXooZojzK9sWIoYPSoLU=; b=WoS0g2crwoSAk7rcJgATVyQqXzU8dvas96CbbfM2A4GLeqGCH3LyB9Sqa/xtsI2AeKS8Du pkna4GtKm3LXLCP+yKl7TLIuJXadbIMTzcHgxiHQNwup3yuHZYFEu6qx3tWGGMTIrIScWN bC5ov7aKz/R1vZtLmNwsppS5zm7RvJY= 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-395--JBLsUz2NZ--O-tmO9XBtQ-1; Wed, 02 Apr 2025 12:25:39 -0400 X-MC-Unique: -JBLsUz2NZ--O-tmO9XBtQ-1 X-Mimecast-MFC-AGG-ID: -JBLsUz2NZ--O-tmO9XBtQ_1743611137 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 86D451955BC6; Wed, 2 Apr 2025 16:25:35 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 89CB6192C7C3; Wed, 2 Apr 2025 16:25:30 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:39 -0400 Subject: [PATCH 01/30] panel/panel-elida-kd35t133: Refcounted allocation MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-1-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1389; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=04jQI8TxpdD5Tum/MEA8z6ODUtcor3J3PZiYBmTLMn4=; b=kMUw0kI7xJYVRW5c5Y7+UUXD5KLiK5WBogY47b+d898uYCoTTx2pyjklSE+hJT1ICypx09xpe rUdJYFWQHpqBKDB99V+TW1ms5nQUWf4rdab8ckF5ji3aviCq5WnwefD X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index b904d54374449055b16df0c9abf132d2c944a6ff..1f177834d62986679830b15b960fb7299ca65cfa 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -206,9 +206,10 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) struct kd35t133 *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct kd35t133, panel, + &kd35t133_funcs, DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { @@ -248,9 +249,6 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_CLOCK_NON_CONTINUOUS; - drm_panel_init(&ctx->panel, &dsi->dev, &kd35t133_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:23:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C9E3C28B20 for ; Wed, 2 Apr 2025 16:25:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D8B210E836; Wed, 2 Apr 2025 16:25:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="OwosS3Fh"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5910110E836 for ; Wed, 2 Apr 2025 16:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611147; 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=tRacD+aABuwbDVcAYKGGC76WPn7Bj53bdHhpMF+q1go=; b=OwosS3FhigFijg2r7TVQ/GQ4W5kelGMK85t1H2ajXxbh04cB+z8gziEUzAiPJTw4S2MmZo 1tXUVjUafy2pDSkKLujbgEZwRf1TFz35okc9YhLTFgEm4Be/HiL9mlP5vyYr5akb4f/Jwg KynmFrFMkwz89K9FEVZiAW6Dw9rPt6U= 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-271-cU5m9nhuMWC6su1v1cCFgA-1; Wed, 02 Apr 2025 12:25:43 -0400 X-MC-Unique: cU5m9nhuMWC6su1v1cCFgA-1 X-Mimecast-MFC-AGG-ID: cU5m9nhuMWC6su1v1cCFgA_1743611140 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 423E31956050; Wed, 2 Apr 2025 16:25:40 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 36E44192C7D7; Wed, 2 Apr 2025 16:25:35 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:40 -0400 Subject: [PATCH 02/30] panel/elida-kd35t133: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-2-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1410; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=Kj5htEwxiXpXxigIdfhh9sERHvrEfKIkbVPMo39fcNY=; b=WHIeluuPy5zZPCtBMBf6mgdR2xrDQB3ajJPce8kztX3sntS3nJoxmfs+vT4MnU2jaxG3DIlos OTXlFJruCkmChSptn97VExbvZXUrNQdnQdoAE8h7Ziu+rnKK11XE5qF X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c index 986e3e192881b50ad3cdbbbc41a2adbf77e8791a..6225501cb174960b38b7672c6ef53fbc98ab4acf 100644 --- a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c +++ b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c @@ -443,9 +443,11 @@ static int k101_im2ba02_dsi_probe(struct mipi_dsi_device *dsi) unsigned int i; int ret; - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(&dsi->dev, struct k101_im2ba02, panel, + &k101_im2ba02_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); mipi_dsi_set_drvdata(dsi, ctx); ctx->dsi = dsi; @@ -463,9 +465,6 @@ static int k101_im2ba02_dsi_probe(struct mipi_dsi_device *dsi) return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset), "Couldn't get our reset GPIO\n"); - drm_panel_init(&ctx->panel, &dsi->dev, &k101_im2ba02_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:23:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036220 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91090C28B20 for ; Wed, 2 Apr 2025 16:25:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F03B010E83B; Wed, 2 Apr 2025 16:25:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="PVvMNHs0"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8EB2D10E83B for ; Wed, 2 Apr 2025 16:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611151; 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=nRO4JfKR+w4MI1ioV5AUsYB8Hjn3bTaDSAAz3+ZbYyQ=; b=PVvMNHs0iw/Gdi7H0qFaMU2Jyudvj+y/viJtbY+a3U9S5ZWyUyWrT7nTWVnzepHIATM1Lj c/+1fyG9LKuPueM8b1UBJxS67cPewfkm6gfoFbHh61hnQX7fDrcVK+0e24JkkITBKGb0vo fbLZYT8Cg8OZwY3cHfEnpU/2MEcqSzY= Received: from mx-prod-mc-04.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-641-1pEbILyCO9CVlQs4Q5s3yA-1; Wed, 02 Apr 2025 12:25:48 -0400 X-MC-Unique: 1pEbILyCO9CVlQs4Q5s3yA-1 X-Mimecast-MFC-AGG-ID: 1pEbILyCO9CVlQs4Q5s3yA_1743611146 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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 148FA1955DC6; Wed, 2 Apr 2025 16:25:45 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8CBA2195609D; Wed, 2 Apr 2025 16:25:40 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:41 -0400 Subject: [PATCH 03/30] panel/fy07024di26a30d: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-3-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1282; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=7ug0WUcbfVp4DvN+9KLPcqXYIwBnh4S1f7qzzL/gWAU=; b=DH1zb44yvwnM2auZ3yFbW41iueqWPAqF0CEpvJD+SP3JGaWLg4mYPNxNwa07eO6GDyV7OV0mB i3TA3hKpmBwBuQfxXWabITHKsVsl6W+ZP5QpwmgtDisbKpvPX3ieDQX X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c index 48e3acaecdf33de5b82c3eea1c44f0409ebf5f8f..4f8d6d8c07e4d7ac33c90403b92ea1286ebd1a77 100644 --- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c +++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c @@ -189,16 +189,14 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi) struct feiyang *ctx; int ret; - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(&dsi->dev, struct feiyang, panel, + &feiyang_funcs, DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); mipi_dsi_set_drvdata(dsi, ctx); ctx->dsi = dsi; - drm_panel_init(&ctx->panel, &dsi->dev, &feiyang_funcs, - DRM_MODE_CONNECTOR_DSI); - ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd"); if (IS_ERR(ctx->dvdd)) return dev_err_probe(&dsi->dev, PTR_ERR(ctx->dvdd), From patchwork Wed Apr 2 15:23:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E92FBC36017 for ; Wed, 2 Apr 2025 16:25:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B95A10E837; Wed, 2 Apr 2025 16:25:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="SbGcL4HS"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id BAAAF10E837 for ; Wed, 2 Apr 2025 16:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611156; 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=875RsKmiCeapt6y3l+1tJkJZJok+TPLY4UWwWxvYYQk=; b=SbGcL4HSbYVvZhnk87aBAcZU8woIIiv0IhkccgGnwJHzNBq6H3Nh/1AglUmJI4/9GkNVnX uFCrbCiW9QWS+mhj1GyV7hw0Hhl5JT8K8AaHNHV99xLYWr+sA3Bqh4tFKhzO0TeQiayq6H GLRZu0C2tx1HyaJIbEK38LoDbIqhXyg= 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-226-94nyARfBMOOxryR3b2zEPg-1; Wed, 02 Apr 2025 12:25:52 -0400 X-MC-Unique: 94nyARfBMOOxryR3b2zEPg-1 X-Mimecast-MFC-AGG-ID: 94nyARfBMOOxryR3b2zEPg_1743611150 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 C280E1955BC1; Wed, 2 Apr 2025 16:25:49 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B2216192C7C3; Wed, 2 Apr 2025 16:25:45 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:42 -0400 Subject: [PATCH 04/30] panel/himax-hx83112a: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-4-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1369; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=MCqbDMbfqlMEM3tpfz11sdt3VQMAwyZM3kTPP0ahC+8=; b=pk7rmlONuFqcuXaDIqVehbVguBRUV5idlEGDEEJ9sN5m1z1WZEfCVqp2rlBladlGITdS1eMEe Zz3imde/e07DxrSSrQcC68thjZSqeyxM48FfszOqTAyK/tKd8YBmxMI X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-himax-hx83112a.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx83112a.c b/drivers/gpu/drm/panel/panel-himax-hx83112a.c index 47bce087e3393345fbde8d2fb4d26a955988c395..142cb1cc067addc5900fd5b25d32298b32d7bb05 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx83112a.c +++ b/drivers/gpu/drm/panel/panel-himax-hx83112a.c @@ -269,9 +269,11 @@ static int hx83112a_probe(struct mipi_dsi_device *dsi) struct hx83112a_panel *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct hx83112a_panel, panel, + &hx83112a_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->supplies[0].supply = "vdd1"; ctx->supplies[1].supply = "vsn"; @@ -295,8 +297,6 @@ static int hx83112a_probe(struct mipi_dsi_device *dsi) MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_CLOCK_NON_CONTINUOUS; - drm_panel_init(&ctx->panel, dev, &hx83112a_panel_funcs, - DRM_MODE_CONNECTOR_DSI); ctx->panel.prepare_prev_first = true; ret = drm_panel_of_backlight(&ctx->panel); From patchwork Wed Apr 2 15:23:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB40CC28B20 for ; Wed, 2 Apr 2025 16:26:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18FA810E83D; Wed, 2 Apr 2025 16:26:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="jAfkaT+F"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id F1FB410E839 for ; Wed, 2 Apr 2025 16:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611164; 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=XI0Eq14BuE4/8eJYlUv7+De6XInkB4iwHReVJBrWt3Y=; b=jAfkaT+Ft9cSUE1JrTMnq9X6Cfhz/eBRui54qgKU5Wwzv9Vq1T/Wem3r0UYESteJXCrLsu haUiXAb/xmdSTD8upGbNr3SR/W7PRlWrKxiKNbAQuU4kRUDbEiHiVlTiujd0+uW/lgtapm 919s8iNjyEJk1QDmaI/j8uFcYij54dc= 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-608-d38nRIqfPYKkJ8OiA63XOQ-1; Wed, 02 Apr 2025 12:25:58 -0400 X-MC-Unique: d38nRIqfPYKkJ8OiA63XOQ-1 X-Mimecast-MFC-AGG-ID: d38nRIqfPYKkJ8OiA63XOQ_1743611154 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 64345180025C; Wed, 2 Apr 2025 16:25:54 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 197F9195609D; Wed, 2 Apr 2025 16:25:49 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:43 -0400 Subject: [PATCH 05/30] panel/himax-hx8394: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-5-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1385; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=iba0hhsehOqH4Fs29yrW1D1gZNzo6TgJrylYkgV73w0=; b=kIYzJHOq9QAeH1oHJ+EM7ZgfkF92nx6pPlK746fu/eJovqFS/AcPAjGuK/0qdZmwvu5+H0i5D gNoETEmYPHGAdn0RQDYvoz7LAq28g+iDqFRiMU/BgUUwWm/7C8427KV X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-himax-hx8394.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c index ff994bf0e3cc1af134f40ac3b1712633ae801caf..0e3bf4ba91890e5a859288cb6a9737ed77a343b3 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c @@ -611,9 +611,11 @@ static int hx8394_probe(struct mipi_dsi_device *dsi) struct hx8394 *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct hx8394, panel, + &hx8394_drm_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) @@ -645,9 +647,6 @@ static int hx8394_probe(struct mipi_dsi_device *dsi) return dev_err_probe(dev, PTR_ERR(ctx->iovcc), "Failed to request iovcc regulator\n"); - drm_panel_init(&ctx->panel, dev, &hx8394_drm_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:23:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036222 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CF58C36017 for ; Wed, 2 Apr 2025 16:26:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B987210E839; Wed, 2 Apr 2025 16:26:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="dITTDGCq"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id BEB8B10E839 for ; Wed, 2 Apr 2025 16:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611165; 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=B5HhELYg0XvErZYc/nFXcIjX10vFyUSg5D9sb32us0Y=; b=dITTDGCqOwUKR5yDOexpAKuk8akbL5ZBIr8m4zs2axylQ5PUpUo4Ex+KLbiwhaHYDA9n7m lRFyiu4CSo/SGNBddRaCzy3sDeev2UutWUGuJPfR9RVcoGr8K+dz8kW6/OP+/lfS26C0Hl P9vYyJxa7TePjatEFLdY4yVAKR+sUY8= 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-688-MTgbCFWUPySGF-MAE_zhYw-1; Wed, 02 Apr 2025 12:26:01 -0400 X-MC-Unique: MTgbCFWUPySGF-MAE_zhYw-1 X-Mimecast-MFC-AGG-ID: MTgbCFWUPySGF-MAE_zhYw_1743611159 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A5B6F1800260; Wed, 2 Apr 2025 16:25:58 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B117F192C7C3; Wed, 2 Apr 2025 16:25:54 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:44 -0400 Subject: [PATCH 06/30] panel/ilitek-ili9322: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-6-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1213; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=ifzGrcMKMj7wX1OyLciEf8ylTTGawzrXiL8rUDJD9wQ=; b=Y0sNfxjJIlCXDsXB/JE0j1UxSN/DVWRStNCc1qKxtLLu/UzY/c23rIlMuXQuLmeCOS7I5KxZN VmU+lEaBaV3C/ZhK5Pfx76wBgBXgcU1UPbYaSHTXIgTlNENYTIiXfbF X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c index 94b7dfef3b5e280f02f3127e965e418b6d497c7f..6ed544a83bdd5cf1547847eba39e88cdc5b1e914 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c @@ -722,9 +722,10 @@ static int ili9322_probe(struct spi_device *spi) int ret; int i; - ili = devm_kzalloc(dev, sizeof(struct ili9322), GFP_KERNEL); - if (!ili) - return -ENOMEM; + ili = devm_drm_panel_alloc(dev, struct ili9322, panel, + &ili9322_drm_funcs, DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(ili)) + return PTR_ERR(ili); spi_set_drvdata(spi, ili); @@ -883,9 +884,6 @@ static int ili9322_probe(struct spi_device *spi) ili->input = ili->conf->input; } - drm_panel_init(&ili->panel, dev, &ili9322_drm_funcs, - DRM_MODE_CONNECTOR_DPI); - drm_panel_add(&ili->panel); return 0; From patchwork Wed Apr 2 15:23:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036224 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B584C28B20 for ; Wed, 2 Apr 2025 16:26:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9138210E83E; Wed, 2 Apr 2025 16:26:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="MxtwUpqi"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id A00ED10E83E for ; Wed, 2 Apr 2025 16:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611170; 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=K90Nh+iYfk2CkiujMPyuv28d4U/9+M3yVThyT1lglvE=; b=MxtwUpqiqyWRRo3q4niGujbhz0/SYEhIzcQJ0HV4LqWm4euhVuRWqSA31wH9rSvMWx+sv2 ocRbcCysd5QFgozjVw4MDpVvv7qic65DpPqKvrVjLg3QRO6KQJ/bmk+PJm8jP9Y1UJWtMq 6gEuDeVB8ktd8+LtIY4yRC5KaSqV+m8= 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-126-weIi507qMvauQMS3ajmblg-1; Wed, 02 Apr 2025 12:26:06 -0400 X-MC-Unique: weIi507qMvauQMS3ajmblg-1 X-Mimecast-MFC-AGG-ID: weIi507qMvauQMS3ajmblg_1743611164 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 353F0180025E; Wed, 2 Apr 2025 16:26:03 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F1912192C7C6; Wed, 2 Apr 2025 16:25:58 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:45 -0400 Subject: [PATCH 07/30] panel/ilitek-ili9341: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-7-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1047; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=DsNJmc5rLHBXzfemEN6C/4jFyAPvFFHR9UkjydvcKiw=; b=LO87nh+uE7jI7PF+KAHPAyO86Y0IxVn7AbUNU2ouB8zNmWRde2S/m3oIdNjmgXAcKsZkYKtH5 5FRAImoqzBiB38mnr/eyrb3lKgit2IDEKWSD8xRiJiB+YE7X3h8uOIe X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c index ff39f5dd4097e8da0a0e16c50c5bfd45c078d91c..d87b7eefe9beedd290fb59065b389b3315c85720 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -490,9 +490,11 @@ static int ili9341_dpi_probe(struct spi_device *spi, struct gpio_desc *dc, struct ili9341 *ili; int ret; - ili = devm_kzalloc(dev, sizeof(struct ili9341), GFP_KERNEL); - if (!ili) - return -ENOMEM; + ili = devm_drm_panel_alloc(dev, struct ili9341, panel, + &ili9341_dpi_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(ili)) + return PTR_ERR(ili); ili->dbi = devm_kzalloc(dev, sizeof(struct mipi_dbi), GFP_KERNEL); From patchwork Wed Apr 2 15:23:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036225 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E733C28B20 for ; Wed, 2 Apr 2025 16:26:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E38E10E83C; Wed, 2 Apr 2025 16:26:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="L0wS0dfN"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E48D10E840 for ; Wed, 2 Apr 2025 16:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611173; 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=YrgiZ49sQunTmrqMKdld9hch4IKkKrvZflApmSxvjSA=; b=L0wS0dfNxGsYJ4C6UKy2ohaxP9anR36UFeJCehtDYtl94yPj/oVN1Bo66OBOTwYdy6b//i KA+FJj6pmHgeapiTQKlq6lVBUcrn0NuAlWMlENCoHWVvV2NmJMQ448JW0sS+gKmJ3snlgz vOkmjqplgyx1wwAnRe2nZEsDltUjkGM= 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-530-uDGuDDr9OG60jZZ-aeahkg-1; Wed, 02 Apr 2025 12:26:10 -0400 X-MC-Unique: uDGuDDr9OG60jZZ-aeahkg-1 X-Mimecast-MFC-AGG-ID: uDGuDDr9OG60jZZ-aeahkg_1743611167 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 C3879180AF56; Wed, 2 Apr 2025 16:26:07 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 60C70195609D; Wed, 2 Apr 2025 16:26:03 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:46 -0400 Subject: [PATCH 08/30] panel/panel-ili9805: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-8-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1423; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=RqGutPaeOBSCsEcTrudyJmazu4iScvgeh/9UPC+Uuv4=; b=kevIf1b2kquK7pRf6kHLhhfV3E93ZOplX4boa0iFlGaABOmFaBpXpFVaIWG36qrFhyaRNbw+4 ZYDaExJX1/zAOYUNxTyPy6quR/0KeoKNLH7knMOrCN2uEEe8My74MOn X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Start using the new helper that does the refcounted allocations Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9805.c b/drivers/gpu/drm/panel/panel-ilitek-ili9805.c index 1cbc25758bd2bc0ed1ea64eed61edc7cdda68f9e..bda585e00cf980575b8b858149fa39fbaf2182df 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9805.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9805.c @@ -307,9 +307,12 @@ static int ili9805_dsi_probe(struct mipi_dsi_device *dsi) struct ili9805 *ctx; int ret; - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct ili9805, panel, + &ili9805_funcs, + DRM_MODE_CONNECTOR_DSI) + if (IS_ERR(ctx)) + return PTR_ERR(ctx); + mipi_dsi_set_drvdata(dsi, ctx); ctx->dsi = dsi; ctx->desc = of_device_get_match_data(&dsi->dev); @@ -320,9 +323,6 @@ static int ili9805_dsi_probe(struct mipi_dsi_device *dsi) MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_NO_EOT_PACKET; dsi->lanes = 2; - drm_panel_init(&ctx->panel, &dsi->dev, &ili9805_funcs, - DRM_MODE_CONNECTOR_DSI); - ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd"); if (IS_ERR(ctx->dvdd)) return PTR_ERR(ctx->dvdd); From patchwork Wed Apr 2 15:23:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7546C28B20 for ; Wed, 2 Apr 2025 16:26:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 13CD610E841; Wed, 2 Apr 2025 16:26:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="OJD/P56g"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id F066B10E840 for ; Wed, 2 Apr 2025 16:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611179; 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=37VJonNfJWu5HWSE9xB/hB14m3+MT+BSZYj2Q28pWug=; b=OJD/P56gSeJ9B6KJldKYkK42w4FsU6s9pVr2hp5WBLRZGquIJnlDePW9Dv3AgvQBfsqy+W fzWw05s5375JOF3AGRRmiIA/sMMmAOKFEEt0VvJCf59Vd/vid2pVKzwshhy4vKXQ4Bu1am GmgKWea8Yq8J4Vu8oqwnTnvCbRjR5FE= Received: from mx-prod-mc-02.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-691-75qWkN20NeGGP3qm19R-aw-1; Wed, 02 Apr 2025 12:26:14 -0400 X-MC-Unique: 75qWkN20NeGGP3qm19R-aw-1 X-Mimecast-MFC-AGG-ID: 75qWkN20NeGGP3qm19R-aw_1743611172 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2491819560AD; Wed, 2 Apr 2025 16:26:12 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1A8D8195609D; Wed, 2 Apr 2025 16:26:07 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:47 -0400 Subject: [PATCH 09/30] panel/ilitek-ili9806e: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-9-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1400; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=4eWfrEodut6F3HYcks94PehYeotYmzpncyJ8elUkjEw=; b=YqEbBCKbd8byspai9Du4OLK3t0CQUsjyY328wtuCruZVQ/XhQCqTWDKjMVPqGrD8lj3M1Up1+ wZecwodoD0iB85UP0Svq2cguCWH5FCRfmOJzIGxBdgIgOBqHWJwrkg3 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-ilitek-ili9806e.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c b/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c index a3c79ad99d0bd03f37442c53d4d9dd0e32012ac7..18aa6222b0c557f4ca703922a9728f74ad2848dc 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c @@ -166,9 +166,10 @@ static int ili9806e_dsi_probe(struct mipi_dsi_device *dsi) struct ili9806e_panel *ctx; int i, ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct ili9806e_panel, panel, &ili9806e_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->desc = device_get_match_data(dev); @@ -192,9 +193,6 @@ static int ili9806e_dsi_probe(struct mipi_dsi_device *dsi) dsi->format = ctx->desc->format; dsi->lanes = ctx->desc->lanes; - drm_panel_init(&ctx->panel, dev, &ili9806e_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation); if (ret) return dev_err_probe(dev, ret, "Failed to get orientation\n"); From patchwork Wed Apr 2 15:23:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57151C36017 for ; Wed, 2 Apr 2025 16:26:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 98F5510E840; Wed, 2 Apr 2025 16:26:23 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="NfaKw64A"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE20610E840 for ; Wed, 2 Apr 2025 16:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611182; 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=lkk6+P8kz4b/Qa31/Ssl4swVSnk002BGAZpApGFTvXM=; b=NfaKw64AUCR0Jh9W7qF5HtSQQr3opoSOjXLpAeSPZJ3b7juYmOMoRAl5ayewojFxTerpoU 10wU1O5SxOfIr6cT8w++Eo0b1KomL/IBFlCY2Y1ip+8baYrf0qjRGLNDsX5+kKjNkBZpJI x5oKbsr8ceY/cgNDJxVjwp5xazp0Sco= 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-441-Dr0IbInTN0qayJUWiB7LhA-1; Wed, 02 Apr 2025 12:26:19 -0400 X-MC-Unique: Dr0IbInTN0qayJUWiB7LhA-1 X-Mimecast-MFC-AGG-ID: Dr0IbInTN0qayJUWiB7LhA_1743611176 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 62B8C1801A00; Wed, 2 Apr 2025 16:26:16 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7296C195609D; Wed, 2 Apr 2025 16:26:12 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:48 -0400 Subject: [PATCH 10/30] panel/ilitek-ili9881c: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-10-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1306; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=4NECJWEGNcCzkUexn1VzkV2SkLcEjReKiF0klndVbl8=; b=p+sd4NMCJM/MyUF25c/ggqMXE3ykI0Vz9CJApZGMFozILEr0KZqA9bHVXk7Ivbl+glk5BqoNK IVmAUzAf3MSDi3OQMPt5Ep8IvFMY9sUXqNvCcoKXIUN+SVlVPyoQIQ+ X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index 28cd7560e5db1d5734b10babdb4e4e553c6e07d0..aa4192def09353afa40c1981d0b105064fe95b02 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -1506,16 +1506,15 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi) struct ili9881c *ctx; int ret; - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(&dsi->dev, struct ili9881c, panel, &ili9881c_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); + mipi_dsi_set_drvdata(dsi, ctx); ctx->dsi = dsi; ctx->desc = of_device_get_match_data(&dsi->dev); - drm_panel_init(&ctx->panel, &dsi->dev, &ili9881c_funcs, - DRM_MODE_CONNECTOR_DSI); - ctx->power = devm_regulator_get(&dsi->dev, "power"); if (IS_ERR(ctx->power)) return dev_err_probe(&dsi->dev, PTR_ERR(ctx->power), From patchwork Wed Apr 2 15:23:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9913C28B20 for ; Wed, 2 Apr 2025 16:26:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5DA3E10E823; Wed, 2 Apr 2025 16:26:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="EPCiw/gV"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D908910E823 for ; Wed, 2 Apr 2025 16:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611189; 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=HSEO70ahAubWGEM4TPHZlNJ5/BiWYj6e1K2ja+EnewY=; b=EPCiw/gV1CfRgk0aHyL9Qn+Bq8MtqgmtgLr8PnjZrS/ZflJ8th3AjvoABI1HuL35gFkh0O niD6b+O+5z1+jTJ8qlUynsRQP2ihCmrmzyHmozDVFjw/lyyJP4+Q+wP521hlyNAKBsyY0a Q3iykAqzIHWd9CZhEHa+Ug6rO0LgWCE= 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-458-C3aW6570P7ilLtWgnmWP9g-1; Wed, 02 Apr 2025 12:26:24 -0400 X-MC-Unique: C3aW6570P7ilLtWgnmWP9g-1 X-Mimecast-MFC-AGG-ID: C3aW6570P7ilLtWgnmWP9g_1743611181 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EBF0A1800265; Wed, 2 Apr 2025 16:26:20 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AE240195609D; Wed, 2 Apr 2025 16:26:16 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:49 -0400 Subject: [PATCH 11/30] panel/innolux-ej030na: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-11-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1339; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=EuyM0klfe+I7/TbF4SujatT69lvtURfeKp1CiiGFgHk=; b=aFfSovD+14j5EtKmbY581WDEB83u02a65C4XKUkEmsDPraj9d5PZCNTII5gHHaioVQAp8wLis miNVTPzhY6iBRJ4ujlkJx5MHP6Gi8SsYlXmy6d3OTe/+GOkfuZJkfGq X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-innolux-ej030na.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-innolux-ej030na.c b/drivers/gpu/drm/panel/panel-innolux-ej030na.c index f85b7a4cbb4206bea7b5a019ba1de1dd05b13fe2..b2309900873b28f98707f79f4332763369a27d72 100644 --- a/drivers/gpu/drm/panel/panel-innolux-ej030na.c +++ b/drivers/gpu/drm/panel/panel-innolux-ej030na.c @@ -204,9 +204,11 @@ static int ej030na_probe(struct spi_device *spi) struct ej030na *priv; int err; - priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; + priv = devm_drm_panel_alloc(dev, struct ej030na, panel, + &ej030na_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(priv)) + return PTR_ERR(priv); priv->spi = spi; spi_set_drvdata(spi, priv); @@ -231,9 +233,6 @@ static int ej030na_probe(struct spi_device *spi) return dev_err_probe(dev, PTR_ERR(priv->reset_gpio), "Failed to get reset GPIO\n"); - drm_panel_init(&priv->panel, dev, &ej030na_funcs, - DRM_MODE_CONNECTOR_DPI); - err = drm_panel_of_backlight(&priv->panel); if (err) return err; From patchwork Wed Apr 2 15:23:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11352C3601A for ; Wed, 2 Apr 2025 16:26:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C2F010E842; Wed, 2 Apr 2025 16:26:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="CR4J5TTD"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4FAD10E842 for ; Wed, 2 Apr 2025 16:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611192; 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=xZa/fH42jj3tgaR5qpbl8nKcJkKxRA3VALVpWq6pgso=; b=CR4J5TTDO9pwdDAVyZ4KEZpnwpT6qPol56/ebmTmcrMzyolivBoVeutg7ldC1HgCRGfYTq Lz90UBohKrRtQt7KlniBsJRWjWrLOqMrUqpSqn4NyN6+2JB3ltyFPngn7eWMg75CV6e1u2 /wF4nBoajJ5C70OJmHtA1jdHlR0StW0= 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-237-Q2F6QY3yNGCFrZYsiwAm2Q-1; Wed, 02 Apr 2025 12:26:28 -0400 X-MC-Unique: Q2F6QY3yNGCFrZYsiwAm2Q-1 X-Mimecast-MFC-AGG-ID: Q2F6QY3yNGCFrZYsiwAm2Q_1743611185 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 4FC0B1956053; Wed, 2 Apr 2025 16:26:25 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 44BAF195609D; Wed, 2 Apr 2025 16:26:21 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:50 -0400 Subject: [PATCH 12/30] panel/innolux-p079zca: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-12-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1331; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=yuWW0Q0YBFIEbQSgj1FeCraiDLT2hSb2Iu0fLuf7uAU=; b=duAjSqCZaS5bkGdMGQo6zAJtCZ+AXgjNCLByOBoBPKuBKqSCGfOOomVKIszIeLou7bfHpEpeK Hhx4uyJqHBJBgu+D68qmStP0Sk/dFBGjCvbZyDXP9sPiMUbdwNaT6n0 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index d95c0d4f3e3534d70901864fa9ed0fff8f37d236..80afeeab9475fa13ddadb44cd03a1519d448e24e 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -382,9 +382,11 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi, struct device *dev = &dsi->dev; int err, i; - innolux = devm_kzalloc(dev, sizeof(*innolux), GFP_KERNEL); - if (!innolux) - return -ENOMEM; + innolux = devm_drm_panel_alloc(dev, struct innolux_panel, base, + &innolux_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(innolux)) + return PTR_ERR(innolux); innolux->desc = desc; @@ -410,9 +412,6 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi, innolux->enable_gpio = NULL; } - drm_panel_init(&innolux->base, dev, &innolux_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - err = drm_panel_of_backlight(&innolux->base); if (err) return err; From patchwork Wed Apr 2 15:23:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036230 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0681FC28B20 for ; Wed, 2 Apr 2025 16:26:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 67FDC10E845; Wed, 2 Apr 2025 16:26:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="dq3OWs1C"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8D12910E844 for ; Wed, 2 Apr 2025 16:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611197; 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=npvZMXfvWV8eo3hpNGDEvptxCke1n/j0iwAHzQnv9eU=; b=dq3OWs1Cdmxsq4HTzIOJpnZhSFAPKUaFaTArK1NVtkwDXzXhOePJR5s0/0ag2v51HqBuFM CPatj0OuCBRBtRSq0PjrvmzKc32/2ppy82A+QrVXBx3G4JS2RUT2JGVAY+G796ZO9EYuRv V+AolwuVgGVMDbGvdvspkFkBnDRC+jI= 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-94-TKHCiYN4Ms2LV3bRiZtoRQ-1; Wed, 02 Apr 2025 12:26:32 -0400 X-MC-Unique: TKHCiYN4Ms2LV3bRiZtoRQ-1 X-Mimecast-MFC-AGG-ID: TKHCiYN4Ms2LV3bRiZtoRQ_1743611189 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9249F180025E; Wed, 2 Apr 2025 16:26:29 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9B554195609D; Wed, 2 Apr 2025 16:26:25 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:51 -0400 Subject: [PATCH 13/30] panel/jadard-jd9365da-h3: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-13-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1465; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=IMFre+7l7tWbk4mIS8m6SZxjRxqcMTkoQU9WfWpKabg=; b=2FSpbmOvXfcINUMAYycqUf/pnm8cHIiO41KUyMkAKzkiNVBDC7eE3BtcejqyuqNaHJGws2peh A0DB6ZXoHZrAJkz/xFkRm12K3t0F54y/qXm1ZQLx1b8VOd0Wf5qVKet X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c index 7d68a8acfe2ea45a913dff25eb5e9f0663503f08..6b02923de3f0778f45a6f9ce20d70d667772c64c 100644 --- a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c +++ b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c @@ -1120,9 +1120,10 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi) struct jadard *jadard; int ret; - jadard = devm_kzalloc(&dsi->dev, sizeof(*jadard), GFP_KERNEL); - if (!jadard) - return -ENOMEM; + jadard = devm_drm_panel_alloc(dev, struct jadard, panel, &jadard_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(jadard)) + return PTR_ERR(jadard); desc = of_device_get_match_data(dev); dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | @@ -1148,9 +1149,6 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi) return PTR_ERR(jadard->vccio); } - drm_panel_init(&jadard->panel, dev, &jadard_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = of_drm_get_panel_orientation(dev->of_node, &jadard->orientation); if (ret < 0) return dev_err_probe(dev, ret, "failed to get orientation\n"); From patchwork Wed Apr 2 15:23:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036231 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A4E9C36017 for ; Wed, 2 Apr 2025 16:26:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C063910E844; Wed, 2 Apr 2025 16:26:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="AmWxTF0+"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CA1610E848 for ; Wed, 2 Apr 2025 16:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611199; 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=zANFerpHyAu2ZHtog7iY2NUNxtSmaThhCiijywQ5+n8=; b=AmWxTF0+Ya/SfuQ1YwTR9+1svcBO+DTKLlcNd3EH0ENwSrtNKHEgCqh1CTJYyr7qRqsbdZ mwYBfZjWavrZ9M8L9x+Q8qJcpZJnmhWGKith886ixUa0IoFV3WX6OoPAfBUUdi3uIB3gXk oIUjXDqXyFRX3/dZA5upNv/N1yAh8JQ= 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-556-MiPz9hCoPtidFUobSqnkCQ-1; Wed, 02 Apr 2025 12:26:36 -0400 X-MC-Unique: MiPz9hCoPtidFUobSqnkCQ-1 X-Mimecast-MFC-AGG-ID: MiPz9hCoPtidFUobSqnkCQ_1743611194 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 D028A1954B33; Wed, 2 Apr 2025 16:26:33 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DD903195609D; Wed, 2 Apr 2025 16:26:29 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:52 -0400 Subject: [PATCH 14/30] panel/jdi-fhd-r63452: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-14-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1435; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=MUubzhBIT/tBA0ZkFrrwe4LiNLnixIB2l5RiEsbEzyA=; b=Hk8DOliFaUzrpfcJoyoJwnEdf+94I6/CQVoR7OO8jx44FhF1f+xLyh0ZauV/mmhsAuL4LVvwJ KtgoknZ9v8uCnNc5BQ0O1XPrIc9swQjtYtyOoPbW9ZZ37dNdklV7X/0 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c index 4eb71e85e9e9f2acaa2bdc23dae563f04da64f8c..cbe354b51bce35ec07b6f0758973fd5dffd92c42 100644 --- a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c +++ b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c @@ -175,9 +175,11 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi) struct jdi_fhd_r63452 *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct jdi_fhd_r63452, panel, + &jdi_fhd_r63452_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) @@ -192,8 +194,6 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi) dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_CLOCK_NON_CONTINUOUS; - drm_panel_init(&ctx->panel, dev, &jdi_fhd_r63452_panel_funcs, - DRM_MODE_CONNECTOR_DSI); ctx->panel.prepare_prev_first = true; ret = drm_panel_of_backlight(&ctx->panel); From patchwork Wed Apr 2 15:23:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036232 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2D7EC28B20 for ; Wed, 2 Apr 2025 16:26:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5AEDF10E85C; Wed, 2 Apr 2025 16:26:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="MJIeJALL"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 96EA010E846 for ; Wed, 2 Apr 2025 16:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611207; 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=Ir83fRrJOKOtB4N99fmwHMC3qXOutBoCSdpTSy/qe0A=; b=MJIeJALL9Kfl0Ksy1v0FqB4WrhYQFBl7tGro1zUNCvV6sJLIsUgyc/bOphcuVuer57dhzL 7vWd2x/vVFHHzjw2n6W5hzgsPWU5OufweHAHkyB1OkO6hbcvIuUeiN8fNbGOwxjjANQjJK /8V7nZ19zIBVfFFvK0ray0W6rGpQQ98= 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-588-SqxVDYnmNXWJFlQ1KguJag-1; Wed, 02 Apr 2025 12:26:41 -0400 X-MC-Unique: SqxVDYnmNXWJFlQ1KguJag-1 X-Mimecast-MFC-AGG-ID: SqxVDYnmNXWJFlQ1KguJag_1743611198 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 99843195608A; Wed, 2 Apr 2025 16:26:38 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 79FAB192C7C3; Wed, 2 Apr 2025 16:26:33 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:53 -0400 Subject: [PATCH 15/30] panel/ltk050h3146w: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-15-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1420; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=IW+sB0QwRF536c+A+uwLvp4w4qO8M8YKFG2pNq59bEY=; b=LrnX1i3EJvm9qPa7o/zFglJw/+wa0642ozC9dkH4/7zyUMvmrhb84UgM1H3qlJvL1UAmFPPf8 JJ1DddNjMm5AemTOxYLwYx39jfmgFzWAQ1tRT0OyWHhLQVWARbUVwKD X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c index 77f74e6c467e566ca2fd7b6a5cc29b2fe09b9ef5..9a384149b86ea2fd03feb1a21d2dd532412a966c 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c @@ -548,9 +548,11 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) struct ltk050h3146w *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(&dsi->dev, struct ltk050h3146w, panel, + <k050h3146w_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->panel_desc = of_device_get_match_data(dev); if (!ctx->panel_desc) @@ -577,9 +579,6 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = ctx->panel_desc->mode_flags; - drm_panel_init(&ctx->panel, &dsi->dev, <k050h3146w_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:23:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83642C3601A for ; Wed, 2 Apr 2025 16:26:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3E4A10E852; Wed, 2 Apr 2025 16:26:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Iq5HJ5aU"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FB4D10E85D for ; Wed, 2 Apr 2025 16:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611208; 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=1qqEFD6mfX7xFXXMzkU7JIeRAygmpR9U6m0biArAvvU=; b=Iq5HJ5aURmRf+x7dViBVv/2D1vUHXhxqD0C9+iShmFfsEGs+dlBiM5g/k0kQtGxFbCEYuV 4HH3z8MBWrNY1KidP0F0EPK0+DveHgEnohlF/zMOZ929yXybH/siAvLo7pDaUtmSdk8AV0 ZUe0y2MQ9u5uubnFyUzImvTrtLzVaLI= 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-57-bdBxYQmaONuNVSR1QHb1Qw-1; Wed, 02 Apr 2025 12:26:45 -0400 X-MC-Unique: bdBxYQmaONuNVSR1QHb1Qw-1 X-Mimecast-MFC-AGG-ID: bdBxYQmaONuNVSR1QHb1Qw_1743611203 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 EC76E1809CA6; Wed, 2 Apr 2025 16:26:42 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E2B76195609D; Wed, 2 Apr 2025 16:26:38 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:54 -0400 Subject: [PATCH 16/30] panel/ltk500hd1829: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-16-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1465; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=WQN1jtCNj1e3ALqEqeBlyZ/+Clo9wX0eGvJ+byH2R3c=; b=LZyVhpm6k1Zm3E1qPsdNfGh38cnR4pG4nbeXy0UM1+e23GvEf9M4kDgy+Bc5hRO/i9qUYQABD 0ctYOwJjXS4CY/Lo1h/MKSCkmnfcZHNtIHOSp7z/ZH9hspWyRTwsgFa X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c index 6b18cf00fd4a7a1d12a3577eced49ad6f9c3e955..7f19fd5b80600c2db3236f2d0e3ee44fd91fe4f9 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c @@ -604,9 +604,11 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi) struct device *dev = &dsi->dev; int ret; - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct ltk500hd1829, panel, + <k500hd1829_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->panel_desc = of_device_get_match_data(dev); if (!ctx->panel_desc) @@ -643,9 +645,6 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi) dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET; - drm_panel_init(&ctx->panel, &dsi->dev, <k500hd1829_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:23:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036234 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1FACC28B20 for ; Wed, 2 Apr 2025 16:26:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 684F510E850; Wed, 2 Apr 2025 16:26:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="BskYWOGy"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC31110E846 for ; Wed, 2 Apr 2025 16:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611213; 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=cAXPb/RTY7H6dz1SuwGg5qQ6DgcS9natTkvCebzHKYY=; b=BskYWOGy0woW1H1xoM0F2IWRYfRcNbcS5MsahJmYihFtCM8AEXx+3rUqeKJfUMt0333wot LdS9ehioGXm3+0fauSpTbAJzafoj/5Dr4aN8GwYwHbP8To7ilYUgnH1i/WnC1W/HTxlGCd +6tEwl3QpmC9z8q7/grXjyPJ8hNwv7M= Received: from mx-prod-mc-04.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-55-GTIrtU3ZNCCBuTcY0dRgFA-1; Wed, 02 Apr 2025 12:26:49 -0400 X-MC-Unique: GTIrtU3ZNCCBuTcY0dRgFA-1 X-Mimecast-MFC-AGG-ID: GTIrtU3ZNCCBuTcY0dRgFA_1743611207 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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 53B831955DCE; Wed, 2 Apr 2025 16:26:47 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 47342195609D; Wed, 2 Apr 2025 16:26:43 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:55 -0400 Subject: [PATCH 17/30] panel/lg-lg4573: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-17-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1184; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=op4q2pliKJa3cUfNAwn53eqZVcDkeIvRaZBUXhBrYHI=; b=RQX2h557vuYo/KBqgiUELMTQY0tzHUof/jGHS2SAHB7ucO7L3M0/pkl+/O+T5H7wqYhOG/GU7 C03Bp0hrR5HBsgn9UOeidIFT1TQPuHZ9dFhg4U3d70kG1xNgXjmiEOl X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-lg-lg4573.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-lg-lg4573.c b/drivers/gpu/drm/panel/panel-lg-lg4573.c index cf246d15b7b628a0b3821bfb2697842b6e484319..dec619902c15f8fbfdd138ef3bd2aa7cae921375 100644 --- a/drivers/gpu/drm/panel/panel-lg-lg4573.c +++ b/drivers/gpu/drm/panel/panel-lg-lg4573.c @@ -243,9 +243,11 @@ static int lg4573_probe(struct spi_device *spi) struct lg4573 *ctx; int ret; - ctx = devm_kzalloc(&spi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(&spi->dev, struct lg4573, panel, + &lg4573_drm_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->spi = spi; @@ -258,9 +260,6 @@ static int lg4573_probe(struct spi_device *spi) return ret; } - drm_panel_init(&ctx->panel, &spi->dev, &lg4573_drm_funcs, - DRM_MODE_CONNECTOR_DPI); - drm_panel_add(&ctx->panel); return 0; From patchwork Wed Apr 2 15:23:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036235 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 165ECC36017 for ; Wed, 2 Apr 2025 16:27:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7294B10E843; Wed, 2 Apr 2025 16:26:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="ONaz7ZDY"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D712710E843 for ; Wed, 2 Apr 2025 16:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611217; 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=epE71qXnPf5K5pc+Z9ENDEN6udnjeC2gv/4reT1wp5w=; b=ONaz7ZDY6+kdtCRGyaUGGeC9eKeEqmyrIJUT+/r3nfttussSHCvT8RuywXB/1VF4WYNxcv Rka/tGH+jA/wPtMaZyYDaOYWylQARB6sLypH1pUnJWXiyJCU7oOWgkl/zwcs86ZQkkOX8l oCxQNCtYszW+azpoIPAmv5CQl48LstM= 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-515-uCOz6hAjMfebgOmWlaxCnA-1; Wed, 02 Apr 2025 12:26:53 -0400 X-MC-Unique: uCOz6hAjMfebgOmWlaxCnA-1 X-Mimecast-MFC-AGG-ID: uCOz6hAjMfebgOmWlaxCnA_1743611211 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 67A92180AB19; Wed, 2 Apr 2025 16:26:51 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 80676195609D; Wed, 2 Apr 2025 16:26:47 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:56 -0400 Subject: [PATCH 18/30] panel/lincolntech-lcd197: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-18-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1468; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=BPdSeUjyavHQlLqxv/q0dWl/OXLbabxuJZzn3plQWOg=; b=YasvvlQSr5zoz/QAeb3BNLNfSxsoG0QFIf5SgY3H8S/wPZREf6IxA6D/xcC7uc+bK2JP6Usy3 QFycL1tvDulD73Sq74D5E0xteEZMkhp6hjKpRm293kqsg7YcvC4V/1Y X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-lincolntech-lcd197.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c b/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c index 032c542aab0f788e8a244721c838d9d740af98fb..54ad17704072213b00292df487a9f28cffd45f6c 100644 --- a/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c +++ b/drivers/gpu/drm/panel/panel-lincolntech-lcd197.c @@ -190,9 +190,11 @@ static int lincoln_lcd197_panel_probe(struct mipi_dsi_device *dsi) dsi->mode_flags = (MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST); - lcd = devm_kzalloc(&dsi->dev, sizeof(*lcd), GFP_KERNEL); - if (!lcd) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct lincoln_lcd197_panel, panel, + &lincoln_lcd197_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); mipi_dsi_set_drvdata(dsi, lcd); lcd->dsi = dsi; @@ -214,9 +216,6 @@ static int lincoln_lcd197_panel_probe(struct mipi_dsi_device *dsi) return dev_err_probe(dev, PTR_ERR(lcd->reset_gpio), "failed to get reset gpio"); - drm_panel_init(&lcd->panel, dev, - &lincoln_lcd197_panel_funcs, DRM_MODE_CONNECTOR_DSI); - err = drm_panel_of_backlight(&lcd->panel); if (err) return err; From patchwork Wed Apr 2 15:23:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036236 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CD48C28B20 for ; Wed, 2 Apr 2025 16:27:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6313D10E848; Wed, 2 Apr 2025 16:27:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="BeQ4Yq+y"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2096310E849 for ; Wed, 2 Apr 2025 16:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611221; 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=PF3326fVU7EkcW3hdKGVCgStfM4AKl0CPV6LOBOueVY=; b=BeQ4Yq+yuoW4UPC9XYGKN2fJb9aK4pJLNThCBwiTAgju8nyCp4/GykwSk28OVbzovGVxfX 3PfiAuykxh6cNrxYAdmwaCMWRTrC52In+bLrUnnFus98bVMm/kJY29nXKSdsjbAY20T90N +nXCSHHWJHgMr5k/2fKHH+pMrHwMUFE= 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-685-o1h0161CNnO7F6tlJ6PPkA-1; Wed, 02 Apr 2025 12:26:58 -0400 X-MC-Unique: o1h0161CNnO7F6tlJ6PPkA-1 X-Mimecast-MFC-AGG-ID: o1h0161CNnO7F6tlJ6PPkA_1743611215 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B914B180034D; Wed, 2 Apr 2025 16:26:55 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B241B195609D; Wed, 2 Apr 2025 16:26:51 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:57 -0400 Subject: [PATCH 19/30] panel/magnachip-d53e6ea8966: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-19-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1421; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=Dc8uKXlqTDknhwrvVeBmpqtls+s5KcMmvtGSnNVdukg=; b=5dtBANBxn6IdGQaEVw0WdHGM8TCjfStG01MD+kqCQI/IpGBIaSCdtgarS1pw/y80QsNEEnJ6U HggUToInNvjD40qSwWXSImkjBv3zDBK5LPMEakNPL8pkYKFQDVMWfft X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c b/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c index 799c2161fc85b24e1fb236fd63b397bf66fc15c8..ee225286ce6df0ce48cf7a2c60d600332d02ed86 100644 --- a/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c +++ b/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c @@ -370,9 +370,11 @@ static int d53e6ea8966_probe(struct spi_device *spi) .node = NULL, }; - db = devm_kzalloc(dev, sizeof(*db), GFP_KERNEL); - if (!db) - return -ENOMEM; + db = devm_drm_panel_alloc(dev, struct ili9881c, panel, + &d53e6ea8966_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(db)) + return PTR_ERR(db); spi_set_drvdata(spi, db); @@ -425,9 +427,6 @@ static int d53e6ea8966_probe(struct spi_device *spi) db->dsi_dev->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET; - drm_panel_init(&db->panel, dev, &d53e6ea8966_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - if (db->panel_info->backlight_register) { ret = db->panel_info->backlight_register(db); if (ret < 0) From patchwork Wed Apr 2 15:23:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036237 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C42B1C28B20 for ; Wed, 2 Apr 2025 16:27:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 392D910E846; Wed, 2 Apr 2025 16:27:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="PC32HOpp"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4E9C10E849 for ; Wed, 2 Apr 2025 16:27:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611227; 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=5lQ8TI8gl4MIGsUjiBcrpgYYt0M7hW5xnXkDy9c8nOw=; b=PC32HOppvUaRIU8+YmLE9yxRVHUiyVV+Tp7Ef7BK8tn7zAak0XcWCn+emocr/IL5u3/lEs DNbvriFE7pXe1b63BX6YHvOULn/CFkIUKmd51XQew42BL7Cz+Gx7llSORpp1N19CSez42T 2EcSEWepR3s0+kKqWoc7QtB4XLyE6n4= 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-389-TH1pFjSMPPaqJuqU-lxkwA-1; Wed, 02 Apr 2025 12:27:02 -0400 X-MC-Unique: TH1pFjSMPPaqJuqU-lxkwA-1 X-Mimecast-MFC-AGG-ID: TH1pFjSMPPaqJuqU-lxkwA_1743611220 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 2272F180882E; Wed, 2 Apr 2025 16:27:00 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0F70E195609D; Wed, 2 Apr 2025 16:26:55 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:58 -0400 Subject: [PATCH 20/30] panel/mantix-mlaf057we51: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-20-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1435; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=yDL1X2KRlQleOoI9y6keJaGM798Sa3CZHFZtCRX2hRE=; b=UlEP6GntIrHDZn+PRY99gPD8R1muqGxGxXztpKE6QMJ4f6fgUGEO/lQPXMZN0BINBnawm5owg Lcwg0JcdJXxCibgpWmsm8k4CjUOnYmdqb4Ja74RJJ06Zk72u3idODj4 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c index 4db852ffb0f619a398c04ba2358e503733db108f..55664f5d5aa5d4c45ad3974119a3da492db4bdad 100644 --- a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c +++ b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c @@ -234,9 +234,11 @@ static int mantix_probe(struct mipi_dsi_device *dsi) struct mantix *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct mantix, panel, &mantix_drm_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); + ctx->default_mode = of_device_get_match_data(dev); ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); @@ -271,9 +273,6 @@ static int mantix_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->vddi)) return dev_err_probe(dev, PTR_ERR(ctx->vddi), "Failed to request vddi regulator\n"); - drm_panel_init(&ctx->panel, dev, &mantix_drm_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:23:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036238 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC7ECC28B20 for ; Wed, 2 Apr 2025 16:27:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CBEF10E849; Wed, 2 Apr 2025 16:27:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="VmjxdXWL"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B42E10E849 for ; Wed, 2 Apr 2025 16:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611231; 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=j19z0lwtHbM624baP4fRU9+KrIrspaRG92RuhXMc604=; b=VmjxdXWLr97+16tX7fBM64A5o3ESnVhv+a8qpVbeIiXFt5NOZN7jqHqX+Yk5EnItdi1/9V 8a785W9WabNS2ljXiM0ALcrXUSkeA+KVwHqRjR4aqVcL7BOxxrn22G8XGyVQwwwUbLfK64 ET2rlbus3LBYUXL7OWZ59YjOmTCZzjY= 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-648-R5eTwx_MNKCxFe4SifAJhA-1; Wed, 02 Apr 2025 12:27:08 -0400 X-MC-Unique: R5eTwx_MNKCxFe4SifAJhA-1 X-Mimecast-MFC-AGG-ID: R5eTwx_MNKCxFe4SifAJhA_1743611224 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 7C48C1955BC1; Wed, 2 Apr 2025 16:27:04 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6DAF2192C7C6; Wed, 2 Apr 2025 16:27:00 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:23:59 -0400 Subject: [PATCH 21/30] panel/newvision-nv3051d: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-21-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1350; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=9YW9rJHLIGdRGLO4GFRhV8IbkrEU3vBnytV2vJcRvwc=; b=/7SG9D90J9C8RfkGeq9/2mxMEkRV5cXebMrOoT0sD5WKISiQ4Hy996ipS/r5XGa5J6h0/Ip1E tmQWR0RRJ/ZBhtqtek7Teg/jx2MTCpsFzsjZsGmcMlGgsuoghp+GkUl X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c index 5d115ecd5dd44c8e5e7d1fb8afe573324e987f59..083e314310c5ea15268a32c7011a9191e30cc16c 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c @@ -361,9 +361,11 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi) struct panel_nv3051d *ctx; int ret; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct panel_nv3051d, panel, + &panel_nv3051d_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->dev = dev; @@ -391,9 +393,6 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi) dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = ctx->panel_info->mode_flags; - drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; From patchwork Wed Apr 2 15:24:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036239 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0B85C36017 for ; Wed, 2 Apr 2025 16:27:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B3F410E851; Wed, 2 Apr 2025 16:27:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="hp2zgot1"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BEAA10E851 for ; Wed, 2 Apr 2025 16:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611235; 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=qiHgMjSkd5odbQqdgij+KRxFLrr73iYNN/fqbj4FvnM=; b=hp2zgot14ghuXqjZaGY/WdfPvR3/SvD2oadjiMUuieVGySHig1pPSvFa5Q6EpGsaKAOMVD wWgEXe3dghqciSOf1QVpwovMs0VCK8xTfwztPA13zfUJJG4DzMzfKi0qb0ARUl6F8PPW62 m1p0q49lqy2LgoqThdu31kY32nTojXM= Received: from mx-prod-mc-04.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-417-VkzY3yMCN0y65iBnTikCgg-1; Wed, 02 Apr 2025 12:27:12 -0400 X-MC-Unique: VkzY3yMCN0y65iBnTikCgg-1 X-Mimecast-MFC-AGG-ID: VkzY3yMCN0y65iBnTikCgg_1743611228 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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B99031956048; Wed, 2 Apr 2025 16:27:08 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C6E6F195609D; Wed, 2 Apr 2025 16:27:04 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:00 -0400 Subject: [PATCH 22/30] panel/newvision-nv3052c: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-22-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1293; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=6GoWxokYmPAF1A56XB7LaL9Vb/FUCA1ecKXpwfONqmQ=; b=iwffykaHiHxudGYhemjKDmWzWLp8WCIEchCKoWH6Ok571worysWA/JlBmYjjNDl1nhPaP8KXW zXNosmY4ljPCXNg+F5Hfvs6L06HUVrdeMUHQpfLWVeY/x2cY0JdkuKy X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c index 06e16a7c14a756b9a399347b29b410fd5f4ae273..08c99a48e06dc02677c6f0575d344f890871e0af 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c @@ -777,9 +777,10 @@ static int nv3052c_probe(struct spi_device *spi) struct nv3052c *priv; int err; - priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; + priv = devm_drm_panel_alloc(dev, struct nv3052c, panel, &nv3052c_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(priv)) + return PTR_ERR(priv); priv->dev = dev; @@ -803,9 +804,6 @@ static int nv3052c_probe(struct spi_device *spi) spi_set_drvdata(spi, priv); - drm_panel_init(&priv->panel, dev, &nv3052c_funcs, - DRM_MODE_CONNECTOR_DPI); - err = drm_panel_of_backlight(&priv->panel); if (err) return dev_err_probe(dev, err, "Failed to attach backlight\n"); From patchwork Wed Apr 2 15:24:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036240 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B01CC28B20 for ; Wed, 2 Apr 2025 16:27:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF60710E84A; Wed, 2 Apr 2025 16:27:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Qxlrw3Vv"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 22BF110E84A for ; Wed, 2 Apr 2025 16:27:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611240; 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=VVqEqYlEksIxNQfBqzZj+eis5ZBLA1H2NQkSXSycgoo=; b=Qxlrw3Vvdl5rHmAdZb8WX7KZbqWKI5rgOd6xg6RA+yk8nb+KCVG3Yi9c2lZ419B4JWhl8t r6hfPsE1Ovg470QnHT+CtAy/YNjOLvPCIdLZ6KMSHh0lsV3Supiqr2Z0zcIDAdfSwzHkSh +BiEdxWavxrL/pEunRF+Z0D9oaBIMpo= Received: from mx-prod-mc-02.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-627-CIREWCmDP6G_xv5r-5Lb7A-1; Wed, 02 Apr 2025 12:27:16 -0400 X-MC-Unique: CIREWCmDP6G_xv5r-5Lb7A-1 X-Mimecast-MFC-AGG-ID: CIREWCmDP6G_xv5r-5Lb7A_1743611233 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 27426195605E; Wed, 2 Apr 2025 16:27:13 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 10932191F245; Wed, 2 Apr 2025 16:27:08 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:01 -0400 Subject: [PATCH 23/30] panel/novatek-nt35510: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-23-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1368; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=I7W1h7y85hF3oihzp+50kZ9MQE3NLWSf3yckSqcNmYE=; b=67m0mbFT7Pqt5RCUUsx+HYtlwhX4egUNr5loKmkCGvx3Ens6umVxxC9e8A9i6yF6ZMy/HM8SY af59+8Fxd9rAxbTHUqaO1LqFeFFu62Z4W51ERFNa+onYNVsnGbeKmgp X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c index 549b86f2cc288741897992ce5cad6325f4289dba..3189d89c7ca00074314a6f4fec330a3e625c24f4 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -1087,9 +1087,12 @@ static int nt35510_probe(struct mipi_dsi_device *dsi) struct nt35510 *nt; int ret; - nt = devm_kzalloc(dev, sizeof(struct nt35510), GFP_KERNEL); - if (!nt) - return -ENOMEM; + nt = devm_drm_panel_alloc(dev, struct nt35510, panel, + &nt35510_drm_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(nt)) + return PTR_ERR(nt); + mipi_dsi_set_drvdata(dsi, nt); nt->dev = dev; @@ -1142,9 +1145,6 @@ static int nt35510_probe(struct mipi_dsi_device *dsi) return PTR_ERR(nt->reset_gpio); } - drm_panel_init(&nt->panel, dev, &nt35510_drm_funcs, - DRM_MODE_CONNECTOR_DSI); - /* * First, try to locate an external backlight (such as on GPIO) * if this fails, assume we will want to use the internal backlight From patchwork Wed Apr 2 15:24:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46D77C28B20 for ; Wed, 2 Apr 2025 16:27:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4D0410E84B; Wed, 2 Apr 2025 16:27:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="GN5CsdeA"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 30F9510E84C for ; Wed, 2 Apr 2025 16:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611243; 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=qR9Gz5kP97CP87lDGBVrwrrkWFsK8as95hKEoMQXmnE=; b=GN5CsdeAINxarZC5UdwiGHy13WDPWr79VTigJEzbyJRBCOs7s9C6/rMAaUeeQnjq06Lb1A uhY4VQt1ZwyuZbDzMQ2KBr5eF6WVEqFy83YukeaBS6k1ezExTsqItdSpwDiwf1wcDrpTdZ I88dt7Ob72ReJjukbuenAuc8sgxGNdI= 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-518-3JF2WbHSNmaCqURCtYjlkA-1; Wed, 02 Apr 2025 12:27:20 -0400 X-MC-Unique: 3JF2WbHSNmaCqURCtYjlkA-1 X-Mimecast-MFC-AGG-ID: 3JF2WbHSNmaCqURCtYjlkA_1743611237 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 7E225180AF7B; Wed, 2 Apr 2025 16:27:17 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 74DC2195609D; Wed, 2 Apr 2025 16:27:13 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:02 -0400 Subject: [PATCH 24/30] panel/novatek-nt35560: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-24-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1470; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=8sJ2Jy0vrHnyaFvxeGXJDie/WvS2uybFZmDRO8pBCQo=; b=2ndFEtkKlBoGCZkYUsSG8gPZKpmdOJdU2+wIWUg74oydgnRBFaiUbdOml420kMUYnVzQ9sF3+ EyLBYQ/UzCHAqz97OzyrnYZTLwQj4kO/TP+YlhQbtWtFBmAdJoKkrIO X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-novatek-nt35560.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35560.c b/drivers/gpu/drm/panel/panel-novatek-nt35560.c index 5bbea734123bc003e3d691040496b1fc679ac94b..98f0782c841114439317e16ac6bb4a5175374ac3 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35560.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35560.c @@ -456,9 +456,12 @@ static int nt35560_probe(struct mipi_dsi_device *dsi) struct nt35560 *nt; int ret; - nt = devm_kzalloc(dev, sizeof(struct nt35560), GFP_KERNEL); - if (!nt) - return -ENOMEM; + nt = devm_drm_panel_alloc(dev, struct nt35560, panel, + &nt35560_drm_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(nt)) + return PTR_ERR(nt); + nt->video_mode = of_property_read_bool(dev->of_node, "enforce-video-mode"); @@ -502,9 +505,6 @@ static int nt35560_probe(struct mipi_dsi_device *dsi) return dev_err_probe(dev, PTR_ERR(nt->reset_gpio), "failed to request GPIO\n"); - drm_panel_init(&nt->panel, dev, &nt35560_drm_funcs, - DRM_MODE_CONNECTOR_DSI); - nt->panel.backlight = devm_backlight_device_register(dev, "nt35560", dev, nt, &nt35560_bl_ops, &nt35560_bl_props); if (IS_ERR(nt->panel.backlight)) From patchwork Wed Apr 2 15:24:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5A51C28B20 for ; Wed, 2 Apr 2025 16:27:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3061610E84E; Wed, 2 Apr 2025 16:27:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="GOMCFKKW"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 167BC10E84C for ; Wed, 2 Apr 2025 16:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611250; 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=JMSY6BG+NT2RuPWqoFycvt4UrQtakGrNy8xvGs/972k=; b=GOMCFKKW/XXIaK+0L3lQawtdDeD3CReEQB1DDL0v4+21esbifzMUsW1qrkHjCOYloDH3XT nGTtZ4DPl9MujvNSshGoYUyd3JViF+SIFfjpwXsHu5M/U3qXP7YIwE2DNffstUXB5KxeCZ /iV5Z0mFUYChbwcyX38noJWZJQLPKrE= Received: from mx-prod-mc-04.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-479-DlLAs-z3MJCCf6mh596LeA-1; Wed, 02 Apr 2025 12:27:24 -0400 X-MC-Unique: DlLAs-z3MJCCf6mh596LeA-1 X-Mimecast-MFC-AGG-ID: DlLAs-z3MJCCf6mh596LeA_1743611241 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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B90BC19560AB; Wed, 2 Apr 2025 16:27:21 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C9C23192C7C3; Wed, 2 Apr 2025 16:27:17 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:03 -0400 Subject: [PATCH 25/30] panel/novatek-nt35950: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-25-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1338; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=LwqSq4oKZvcHlRbJzaAP/suiJNWW5npADCQHzdnYEEk=; b=ItJfZaUyksn3tOUWukVCcXh1jOEJKd+DY2OvfVKaHQT3LzLeVaIiLis58aituaKRL6GAGpK4B iIGubQe5npmAITwUAMkcIGsiY2ySPt19iCsexTb87vTmtBEMGUIgE+T X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-novatek-nt35950.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c index 08b22b592ab0452973aa7373dd0692a9bf98e5f2..94aa6489d99fc88f1602c4dbbf4f7f78c04799a9 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c @@ -449,9 +449,10 @@ static int nt35950_probe(struct mipi_dsi_device *dsi) const struct mipi_dsi_device_info *info; int i, num_dsis = 1, ret; - nt = devm_kzalloc(dev, sizeof(*nt), GFP_KERNEL); - if (!nt) - return -ENOMEM; + nt = devm_drm_panel_alloc(dev, struct nt35950, panel, &nt35950_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(nt)) + return PTR_ERR(nt); ret = nt35950_sharp_init_vregs(nt, dev); if (ret) @@ -491,9 +492,6 @@ static int nt35950_probe(struct mipi_dsi_device *dsi) nt->dsi[0] = dsi; mipi_dsi_set_drvdata(dsi, nt); - drm_panel_init(&nt->panel, dev, &nt35950_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&nt->panel); if (ret) { if (num_dsis == 2) From patchwork Wed Apr 2 15:24:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036243 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9CCAC28B20 for ; Wed, 2 Apr 2025 16:27:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A5A410E84C; Wed, 2 Apr 2025 16:27:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="eZtOW0b8"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1B85D10E84F for ; Wed, 2 Apr 2025 16:27:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611254; 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=jCVcmVWs590LHx3fAShanO97/SS0pZoRCdI+DCfpx3k=; b=eZtOW0b8EHx40iL1bpFQ28DkwZaIP1gOFY2EIwfERmdRLJlnDa+C6EZynjpXmMRNRCUYxu +yQy1EW9UpjQRd03YuJJWTmy2Itdzv0QZqMCuzFUuqyH5UBy9Y2/StyyBexR4xpZAZ7Ujg DkYJ+VZgowYdhEUUEk49faqDdOGH4tY= 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-349-eJ9N_NysPZme2tYLyxzCjw-1; Wed, 02 Apr 2025 12:27:28 -0400 X-MC-Unique: eJ9N_NysPZme2tYLyxzCjw-1 X-Mimecast-MFC-AGG-ID: eJ9N_NysPZme2tYLyxzCjw_1743611246 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 E4B4F1955BC1; Wed, 2 Apr 2025 16:27:25 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1121C195609D; Wed, 2 Apr 2025 16:27:21 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:04 -0400 Subject: [PATCH 26/30] panel/novatek-nt36523: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-26-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1394; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=ScF0oS/ivreAcpssqYR+koYAxtpH61OnAgSFxandPHw=; b=0EWpwYuJLu42AGq/FaMwsPJdSz7FgZuWooCEYFJe202lET1weaJg1nc+fIb/oN7zMIc6Hw7CT Ft5u1JqKm3pCpe0oR9+nzd3Kmf/oEAQDs0kvREbtcKp4uOHcllkpl6F X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index 116d67bfa1140073cc537ec967b77195beeec051..32cf64c7c18be061fc3d38689529f039bf7cea55 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -1171,9 +1171,11 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) const struct mipi_dsi_device_info *info; int i, ret; - pinfo = devm_kzalloc(dev, sizeof(*pinfo), GFP_KERNEL); - if (!pinfo) - return -ENOMEM; + pinfo = devm_drm_panel_alloc(dev, struct panel_info, panel, + &nt36523_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(pinfo)) + return PTR_ERR(pinfo); pinfo->vddio = devm_regulator_get(dev, "vddio"); if (IS_ERR(pinfo->vddio)) @@ -1211,7 +1213,6 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) pinfo->dsi[0] = dsi; mipi_dsi_set_drvdata(dsi, pinfo); - drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation); if (ret < 0) { From patchwork Wed Apr 2 15:24:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E25A2C3601A for ; Wed, 2 Apr 2025 16:27:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A8F110E84F; Wed, 2 Apr 2025 16:27:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="hfRh2/MB"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C97010E84F for ; Wed, 2 Apr 2025 16:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611255; 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=MP0mQPob/NaxglglYTtJLQMKwaDtnjjAZ+fqpD006Q0=; b=hfRh2/MBZJNqrxQDtDlckUOG97hWsZQLXYcPe1d0sjgVmUSR2Y5GOW4cCiC6EbhEByZUuB NeUGs/2xC9io8pTpgpCy7bgi9ud8obkz7abXH4e5gM6MDEUGlPUu1FvnQwhbx0NRqnowwc sWJg1Yk/9iIFSHJPVWasWTsYS1YWkWw= 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-390-tFDMFe4UNGiarUsIquna4A-1; Wed, 02 Apr 2025 12:27:32 -0400 X-MC-Unique: tFDMFe4UNGiarUsIquna4A-1 X-Mimecast-MFC-AGG-ID: tFDMFe4UNGiarUsIquna4A_1743611250 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 3FA82195608B; Wed, 2 Apr 2025 16:27:30 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C5C6195609D; Wed, 2 Apr 2025 16:27:26 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:05 -0400 Subject: [PATCH 27/30] panel/novatek-nt36672e: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-27-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1422; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=usXViKv02eqspzENJO9Be1fV1s9csWvAjxEFuLZ2qiw=; b=FCV4GOz2buSHwrt+V3/pq+2CQj/12zJH5oLp9Hp3Fg5lvqC9gswRymotadhssWLtMDRNvS4NQ LV1EGiym2RJB7JwQABwagDavKKn9uHKT4OvxeAzJ0xKFWlOFF9njFpG X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c index 8c9e04207ba96db93d18a845a9240d2a22ec6b8f..c5e00eb55722e483a97e8af3a3594cdb9030dae8 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c @@ -522,9 +522,11 @@ static int nt36672e_panel_probe(struct mipi_dsi_device *dsi) struct nt36672e_panel *ctx; int i, ret = 0; - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; + ctx = devm_drm_panel_alloc(dev, struct nt36672e_panel, panel, + &nt36672e_drm_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); ctx->desc = of_device_get_match_data(dev); if (!ctx->desc) { @@ -553,8 +555,6 @@ static int nt36672e_panel_probe(struct mipi_dsi_device *dsi) dsi->format = ctx->desc->format; dsi->mode_flags = ctx->desc->mode_flags; - drm_panel_init(&ctx->panel, dev, &nt36672e_drm_funcs, DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return dev_err_probe(dev, ret, "Failed to get backlight\n"); From patchwork Wed Apr 2 15:24:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F7C0C36017 for ; Wed, 2 Apr 2025 16:27:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D323010E84D; Wed, 2 Apr 2025 16:27:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="I/yUthHP"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D4F9010E84D for ; Wed, 2 Apr 2025 16:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611262; 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=n20sMf532VbVnrpCAXL1VVfimq/xFU4hBiyB9gxSCUM=; b=I/yUthHPE742sPiTgv/SmD0M02GscIulJtbWuzaphBLSflytzi7lRHVXayWi2dx/gxY8Xi FQOFy/DVFvB1RHp/TXLO8OgpHr4Ub7h2r6UyVjYOOSJbPYArTMrZfeYr2dMpmPbq9kolDU X2fFHp26uAlP0foODLwkqyxD4bddti4= Received: from mx-prod-mc-02.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-609-b9O-w6C_N8i3Gxnyh6wN3Q-1; Wed, 02 Apr 2025 12:27:37 -0400 X-MC-Unique: b9O-w6C_N8i3Gxnyh6wN3Q-1 X-Mimecast-MFC-AGG-ID: b9O-w6C_N8i3Gxnyh6wN3Q_1743611254 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8D49A1956087; Wed, 2 Apr 2025 16:27:34 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8AB62195609D; Wed, 2 Apr 2025 16:27:30 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:06 -0400 Subject: [PATCH 28/30] panel/novatek-nt39016: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-28-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1326; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=Niq8gbCDLPdaXJKvZgPPfcwhl8kkf6v8++wBNoX0yvk=; b=uUBjuu4uAf6zvsY7BdU2W9NZi3KL2l71OpE62cx6Qb43FdZK4WcIbFREATd8c1bzrb9LtfZHE vCtPpS1XB8NDS9JT/7pwHbb5DzBYLD4/tDogZQN3CEt0tTK2DE5mWl6 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt39016.c b/drivers/gpu/drm/panel/panel-novatek-nt39016.c index 9fa7654e2b6755fbc641b6bef3cc450e0e16ba32..b9c23be05d4f03c82f9770d3c05d0e8afbb06c6a 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt39016.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt39016.c @@ -246,9 +246,10 @@ static int nt39016_probe(struct spi_device *spi) struct nt39016 *panel; int err; - panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); - if (!panel) - return -ENOMEM; + panel = devm_drm_panel_alloc(dev, struct nt39016, drm_panel, &nt39016_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(panel)) + return PTR_ERR(panel); spi_set_drvdata(spi, panel); @@ -279,9 +280,6 @@ static int nt39016_probe(struct spi_device *spi) return PTR_ERR(panel->map); } - drm_panel_init(&panel->drm_panel, dev, &nt39016_funcs, - DRM_MODE_CONNECTOR_DPI); - err = drm_panel_of_backlight(&panel->drm_panel); if (err) return dev_err_probe(dev, err, "Failed to get backlight handle\n"); From patchwork Wed Apr 2 15:24:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5795DC36017 for ; Wed, 2 Apr 2025 16:27:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB5A510E853; Wed, 2 Apr 2025 16:27:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="G9nP4FWi"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28BA810E853 for ; Wed, 2 Apr 2025 16:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611264; 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=5EzueVYpplGxvASeTRTyPsRiyFvto0Vy2Kcau66JwAs=; b=G9nP4FWiV4o/N8/WYTcTk/6G2N+MlRuy3xxnSQ1yb4bJ3HWPj0klM7L28ncJMykYuUpTNA g1JWuga6Y0d7uj3JC/BFftWfcTd+mEB2zKxLq+GxGiKfrcM1G2YS3dCVsC469/URt4Zjnk 1apY4f4nEHDLH+Ah+boj3w8DdvWfgfY= 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-502-zZeRuaLzPJS1f346MLDk7Q-1; Wed, 02 Apr 2025 12:27:41 -0400 X-MC-Unique: zZeRuaLzPJS1f346MLDk7Q-1 X-Mimecast-MFC-AGG-ID: zZeRuaLzPJS1f346MLDk7Q_1743611258 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 9E51019560B6; Wed, 2 Apr 2025 16:27:38 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B8A91195609D; Wed, 2 Apr 2025 16:27:34 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:07 -0400 Subject: [PATCH 29/30] panel/lcd-olinuxino: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-29-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1392; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=+jsQl646bOU9X8y48TMvtQRkadDZ3AxzB7aFav6cb9w=; b=mmc7dvs5cgJDC72L+gor9D4R7BopRqNGGmjJ7fbK2JWxzYG5U7h4QgerROTSHLZ53ftW9kV2X qG+C/miz5x/DegTpKAVxmLLkweOKwmzBtcU26ltz17Y0mk6QOXfVP2D X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c index 94ae8c8270b8fbdf47009dac6232ddf6885c2369..66f99982f360fe4445b0c0cbc1e57c4db4be5eda 100644 --- a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c +++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c @@ -175,9 +175,11 @@ static int lcd_olinuxino_probe(struct i2c_client *client) I2C_FUNC_SMBUS_READ_I2C_BLOCK)) return -ENODEV; - lcd = devm_kzalloc(dev, sizeof(*lcd), GFP_KERNEL); - if (!lcd) - return -ENOMEM; + lcd = devm_drm_panel_alloc(dev, struct lcd_olinuxino, panel, + &lcd_olinuxino_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(lcd)) + return PTR_ERR(lcd); i2c_set_clientdata(client, lcd); lcd->dev = dev; @@ -234,9 +236,6 @@ static int lcd_olinuxino_probe(struct i2c_client *client) if (IS_ERR(lcd->enable_gpio)) return PTR_ERR(lcd->enable_gpio); - drm_panel_init(&lcd->panel, dev, &lcd_olinuxino_funcs, - DRM_MODE_CONNECTOR_DPI); - ret = drm_panel_of_backlight(&lcd->panel); if (ret) return ret; From patchwork Wed Apr 2 15:24:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 14036247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A116C28B20 for ; Wed, 2 Apr 2025 16:27:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8732810E854; Wed, 2 Apr 2025 16:27:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="HBPerfe9"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id B397110E854 for ; Wed, 2 Apr 2025 16:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743611266; 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=9PD6OmDX45LDR7+nbtGPkK9QX6P2gjTV1BpF+hq9cvw=; b=HBPerfe9obbCwhaLq1CfXnfcrXb+oj9fzNAXXTTyfzAbg2tjcUiVRGgVbRYJEyS5bSBjaM +WXqFCgWBNhDRX7DCS5buRHal5pqJpi7/5lUxGVCjhRJok0J8+EFUrkifviPMIxgMkd35o a1dCabq5W5JFx4duYr2YA2QWhD3TtaI= 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-253-MnCVOWQlOE-CQsqJq256Vw-1; Wed, 02 Apr 2025 12:27:45 -0400 X-MC-Unique: MnCVOWQlOE-CQsqJq256Vw-1 X-Mimecast-MFC-AGG-ID: MnCVOWQlOE-CQsqJq256Vw_1743611263 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 D00771954B32; Wed, 2 Apr 2025 16:27:42 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EB2D8195609D; Wed, 2 Apr 2025 16:27:38 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 02 Apr 2025 11:24:08 -0400 Subject: [PATCH 30/30] panel/orisetech-ota5601a: Use refcounted allocation in place of devm_kzalloc() MIME-Version: 1.0 Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-30-903b70999ea6@redhat.com> References: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> In-Reply-To: <20250402-b4-drm_panel_mass_convert_part2-v1-0-903b70999ea6@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Icenowy Zheng , Jagan Teki , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Linus Walleij , Jianhua Lu , Stefan Mavrodiev Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1743607440; l=1321; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=o4EPDV0aZd5aebRCtAzJHstJ3xqapBa1C3808IhKyF4=; b=BVaohY7WGETvX3RovtLsktqY1+PIhCXrnlCpEDxR1cOZ7BoVwBKiBqXeM8stZxc4dq9T+HT71 nCF/6+64E/tB79uroCVimFiZs0E49dwNfoqF8e/78jY3L2Z7iGs9Scu X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/panel/panel-orisetech-ota5601a.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c b/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c index fc87f61d4400d49814953d7f453a7c6e84004f29..3231e84dc66c2bf319f5287fd53bc437e24e0d5b 100644 --- a/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c +++ b/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c @@ -237,9 +237,11 @@ static int ota5601a_probe(struct spi_device *spi) struct ota5601a *panel; int err; - panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); - if (!panel) - return -ENOMEM; + panel = devm_drm_panel_alloc(dev, struct ota5601a, drm_panel, + &ota5601a_funcs, + DRM_MODE_CONNECTOR_DPI); + if (IS_ERR(panel)) + return PTR_ERR(panel); spi_set_drvdata(spi, panel); @@ -273,9 +275,6 @@ static int ota5601a_probe(struct spi_device *spi) return PTR_ERR(panel->map); } - drm_panel_init(&panel->drm_panel, dev, &ota5601a_funcs, - DRM_MODE_CONNECTOR_DPI); - err = drm_panel_of_backlight(&panel->drm_panel); if (err) { if (err != -EPROBE_DEFER)