From: Anusha Srivatsa <asrivats@redhat.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>
Cc: Luca Ceresoli <luca.ceresoli@bootlin.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Anusha Srivatsa <asrivats@redhat.com>
Subject: [PATCH RFC 2/2] drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()
Date: Wed, 12 Mar 2025 20:54:43 -0400 [thread overview]
Message-ID: <20250312-drm-panel-v1-2-e99cd69f6136@redhat.com> (raw)
In-Reply-To: <20250312-drm-panel-v1-0-e99cd69f6136@redhat.com>
Start using the new helper that does the refcounted
allocations.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-simple.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 232b03c1a259eb15e423b9d452d28e2ff95c70f8..d7530c3533af34f83ce8c6d6067e7f293f2d4bf1 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -579,7 +579,7 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
u32 bus_flags;
int err;
- panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
+ panel = devm_drm_panel_alloc(dev, struct panel_simple, base, &panel_simple_funcs);
if (!panel)
return -ENOMEM;
@@ -694,8 +694,6 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
pm_runtime_set_autosuspend_delay(dev, 1000);
pm_runtime_use_autosuspend(dev);
- drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type);
-
err = drm_panel_of_backlight(&panel->base);
if (err) {
dev_err_probe(dev, err, "Could not find backlight\n");
--
2.48.1
next prev parent reply other threads:[~2025-03-13 0:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 0:54 [PATCH RFC 0/2] drm/panel: Refcounted panel allocation Anusha Srivatsa
2025-03-13 0:54 ` [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons Anusha Srivatsa
2025-03-13 10:09 ` Luca Ceresoli
2025-03-13 14:34 ` Maxime Ripard
[not found] ` <CAN9Xe3TeKTZtcMPtae7h33H=B-veGW93z8nMpHK+pEuNdh4=2A@mail.gmail.com>
2025-03-14 12:27 ` Luca Ceresoli
2025-03-13 14:42 ` Maxime Ripard
2025-03-13 0:54 ` Anusha Srivatsa [this message]
2025-03-17 10:12 ` [PATCH RFC 2/2] drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc() Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250312-drm-panel-v1-2-e99cd69f6136@redhat.com \
--to=asrivats@redhat.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox