From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Anusha Srivatsa <asrivats@redhat.com>
Cc: 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>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] drm/panel: Add new helpers for refcounted panel allocatons
Date: Wed, 26 Mar 2025 10:22:59 +0100 [thread overview]
Message-ID: <20250326102259.3bdbc22d@booty> (raw)
In-Reply-To: <20250325-b4-panel-refcounting-v1-1-4e2bf5d19c5d@redhat.com>
Hello Anusha,
On Tue, 25 Mar 2025 13:24:08 -0400
Anusha Srivatsa <asrivats@redhat.com> wrote:
> Introduce reference counted allocations for panels to avoid
> use-after-free. The patch adds the macro devm_drm_bridge_alloc()
> to allocate a new refcounted panel. Followed the documentation for
> drmm_encoder_alloc() and devm_drm_dev_alloc and other similar
> implementations for this purpose.
>
> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
[...]
> +void *__devm_drm_panel_alloc(struct device *dev, size_t size, size_t offset,
> + const struct drm_panel_funcs *funcs,
> + int connector_type);
> +
> +/**
> + * devm_drm_panel_alloc - Allocate and initialize an refcounted panel
^^
"a refcounted panel"
> + * @dev: struct device of the panel device
> + * @type: the type of the struct which contains struct &drm_panel
> + * @member: the name of the &drm_panel within @type
> + * @funcs: callbacks for this panel
> + * @connector_type: connector type of the driver
I'd say it's the connector type in the hardware, rather than of the
driver (the driver follows what is in the hardware. Maybe you can just
copy the description present in the drm_panel_init kdoc:
* @connector_type: the connector type (DRM_MODE_CONNECTOR_*) corresponding to
* the panel interface (must NOT be DRM_MODE_CONNECTOR_Unknown)
Other than that it looks good!
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-03-26 9:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 17:24 [PATCH 0/5] drm/panel: Panel Refcounting infrastructure Anusha Srivatsa
2025-03-25 17:24 ` [PATCH 1/5] drm/panel: Add new helpers for refcounted panel allocatons Anusha Srivatsa
2025-03-26 9:22 ` Luca Ceresoli [this message]
2025-03-26 15:26 ` Maxime Ripard
2025-03-26 16:57 ` Anusha Srivatsa
2025-03-26 15:25 ` Maxime Ripard
2025-03-25 17:24 ` [PATCH 2/5] drm/panel: Add refcount support Anusha Srivatsa
2025-03-26 1:21 ` kernel test robot
2025-03-26 9:23 ` Luca Ceresoli
2025-03-26 15:30 ` Maxime Ripard
2025-03-26 15:28 ` Maxime Ripard
2025-03-25 17:24 ` [PATCH 3/5] drm/panel: get/put panel reference in drm_panel_add/remove() Anusha Srivatsa
2025-03-26 0:18 ` kernel test robot
2025-03-26 4:35 ` kernel test robot
2025-03-26 9:23 ` Luca Ceresoli
2025-03-26 15:31 ` Maxime Ripard
2025-03-26 16:56 ` Anusha Srivatsa
2025-03-25 17:24 ` [PATCH 4/5] drm/panel: deprecate old-style panel allocation Anusha Srivatsa
2025-03-26 9:23 ` Luca Ceresoli
2025-03-26 15:32 ` Maxime Ripard
2025-03-26 16:59 ` Anusha Srivatsa
2025-03-25 17:24 ` [PATCH 5/5] drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc() Anusha Srivatsa
2025-03-26 9:23 ` Luca Ceresoli
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=20250326102259.3bdbc22d@booty \
--to=luca.ceresoli@bootlin.com \
--cc=airlied@gmail.com \
--cc=asrivats@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.