The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tarang Raval <tarang.raval@siliconsignals.io>
Cc: sakari.ailus@linux.intel.com, hverkuil@xs4all.nl,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Hans de Goede <hansg@kernel.org>,
	James Cowgill <james.cowgill@blaize.com>,
	Yunke Cao <yunkec@google.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Tommaso Merciai <tomm.merciai@gmail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] media: Add devm-managed helper functions for media and V4L2 subsystems
Date: Wed, 23 Jul 2025 15:55:20 +0300	[thread overview]
Message-ID: <20250723125520.GB6719@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20250723102515.64585-1-tarang.raval@siliconsignals.io>

Hi Tarang,

On Wed, Jul 23, 2025 at 03:55:04PM +0530, Tarang Raval wrote:
> This patch series introduces devm-managed versions of several commonly used
> media and V4L2 initialization functions. These helpers simplify resource
> management by leveraging the devres infrastructure, ensuring automatic
> cleanup when the associated device is detached or the driver is unloaded.

I'll let Sakari review this, but overall, I don't think we want to take
this direction. Objects need to be refcounted instead of freed at remove
time. This patch series doesn't necessarily cause a regression as such,
but it will make it more difficult to fix life time management issues in
V4L2.

> Tested with IMX219 and OV2735 camera sensors on an i.MX8MP-based platform.
> 
> Tarang Raval (4):
>   media: mc: Add devm_media_entity_pads_init() helper
>   media: v4l: async: Add devm_v4l2_async_register_subdev_sensor() helper
>   media: v4l2: subdev: Add devm_v4l2_subdev_init_finalize() helper
>   media: v4l2-ctrls: Add devm_v4l2_ctrl_handler_init() helper
> 
>  drivers/media/mc/mc-entity.c              | 19 +++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-async.c      | 19 +++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-ctrls-core.c | 20 ++++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-subdev.c     | 18 ++++++++++++++++++
>  include/media/media-entity.h              | 20 ++++++++++++++++++++
>  include/media/v4l2-async.h                | 18 ++++++++++++++++++
>  include/media/v4l2-ctrls.h                | 19 +++++++++++++++++++
>  include/media/v4l2-subdev.h               | 17 +++++++++++++++++
>  8 files changed, 150 insertions(+)
> 

-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2025-07-23 12:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 10:25 [PATCH 0/4] media: Add devm-managed helper functions for media and V4L2 subsystems Tarang Raval
2025-07-23 10:25 ` [PATCH 1/4] media: mc: Add devm_media_entity_pads_init() helper Tarang Raval
2025-07-23 10:25 ` [PATCH 2/4] media: v4l: async: Add devm_v4l2_async_register_subdev_sensor() helper Tarang Raval
2025-07-25  0:13   ` kernel test robot
2025-07-23 10:25 ` [PATCH 3/4] media: v4l2-subdev: Add devm_v4l2_subdev_init_finalize() helper Tarang Raval
2025-07-23 10:25 ` [PATCH 4/4] media: v4l2-ctrls: Add devm_v4l2_ctrl_handler_init() helper Tarang Raval
2025-07-23 12:55 ` Laurent Pinchart [this message]
2025-07-23 14:08   ` [PATCH 0/4] media: Add devm-managed helper functions for media and V4L2 subsystems Tarang Raval
2025-07-27 16:48     ` sakari.ailus
2025-07-28  5:45       ` Tarang Raval

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=20250723125520.GB6719@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hansg@kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=james.cowgill@blaize.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tarang.raval@siliconsignals.io \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tomm.merciai@gmail.com \
    --cc=yunkec@google.com \
    /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