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 v2 1/4] drm/panel: Add new helpers for refcounted panel allocatons
Date: Fri, 28 Mar 2025 09:34:46 +0100 [thread overview]
Message-ID: <20250328093446.48368b57@booty> (raw)
In-Reply-To: <20250327-b4-panel-refcounting-v2-1-b5f5ca551f95@redhat.com>
Hello Anusha,
Thanks for your continued effort.
I have a few minor comments. Nothing big, but since Maxime requested a
change you'll have to send a new iteration, so find my comments below.
On Thu, 27 Mar 2025 10:55:39 -0400
Anusha Srivatsa <asrivats@redhat.com> wrote:
[...]
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index a9c042c8dea1a82ef979c7a68204e0b55483fc28..53251c6b11d78149ede3dad41ffa6a88f3c3c58b 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -28,6 +28,7 @@
> #include <linux/errno.h>
> #include <linux/list.h>
> #include <linux/mutex.h>
> +#include <linux/kref.h>
Minor nit: you don't need this include in patch 1. You should move it
to patch 2 where it is actually used.
> @@ -268,6 +269,28 @@ struct drm_panel {
> bool enabled;
> };
>
> +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 typo here is certainly not a huge problem, but I think I had already
reported this should be "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: the connector type (DRM_MODE_CONNECTOR_*) corresponding to
> + * the panel interface
> + * Returns:
> + * Pointer to container structure embedding the panel, ERR_PTR on failure.
> + * The reference count is initialised to 1 and is automatically given back
> + * by devm action.
> + */
In addition to Maxime's comment: I think it's a common practice to have
an empty line after the last @argument and also before the "Returns:"
line, to improve readability
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-03-28 8:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-27 14:55 [PATCH v2 0/4] drm/panel: Panel Refcounting infrastructure Anusha Srivatsa
2025-03-27 14:55 ` [PATCH v2 1/4] drm/panel: Add new helpers for refcounted panel allocatons Anusha Srivatsa
2025-03-27 15:57 ` Maxime Ripard
2025-03-27 15:58 ` Maxime Ripard
[not found] ` <CAN9Xe3QCL=KwhS0KLfaOaDc_TthQg6Gt-pLf1oEEg=1EBLZE2w@mail.gmail.com>
2025-03-28 9:05 ` Maxime Ripard
2025-03-28 8:34 ` Luca Ceresoli [this message]
2025-03-27 14:55 ` [PATCH v2 2/4] drm/panel: Add refcount support Anusha Srivatsa
2025-03-27 15:58 ` Maxime Ripard
2025-03-28 8:48 ` Luca Ceresoli
2025-03-27 14:55 ` [PATCH v2 3/4] drm/panel: deprecate old-style panel allocation Anusha Srivatsa
2025-03-27 15:58 ` Maxime Ripard
2025-03-28 8:51 ` Luca Ceresoli
2025-03-27 14:55 ` [PATCH v2 4/4] drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc() Anusha Srivatsa
2025-03-27 15:59 ` Maxime Ripard
2025-03-28 8:53 ` Luca Ceresoli
[not found] ` <CAN9Xe3SzU0AohuBnyJtE0UWFkrW0iMGKH1F8cuUZYLZ-vbfkpw@mail.gmail.com>
2025-03-31 15:56 ` 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=20250328093446.48368b57@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox