From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Dave Airlie <airlied@gmail.com>
Cc: <dri-devel@lists.freedesktop.org>, <daniel@ffwll.ch>,
<maarten.lankhorst@linux.intel.com>, <airlied@gmail.com>,
<mripard@kernel.org>, <tzimmermann@suse.de>,
<intel-xe@lists.freedesktop.org>,
Thomas Hellstr_m <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH v2 1/4] drm: add devm release action
Date: Wed, 17 Apr 2024 09:55:55 -0400 [thread overview]
Message-ID: <Zh_U6zwzyS2Zlf0K@intel.com> (raw)
In-Reply-To: <20240417084145.242480-2-aravind.iddamsetty@linux.intel.com>
On Wed, Apr 17, 2024 at 02:11:42PM +0530, Aravind Iddamsetty wrote:
> In scenarios where drm_dev_put is directly called by driver we want to
> release devm_drm_dev_init_release action associated with struct
> drm_device.
>
> v2: Directly expose the original function, instead of introducing a
> helper (Rodrigo)
>
> Cc: Thomas Hellstr_m <thomas.hellstrom@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Sima, Dave, or drm-misc, ack to get this through drm-xe-next?
> Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
> ---
> drivers/gpu/drm/drm_drv.c | 6 ++++++
> include/drm/drm_drv.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 243cacb3575c..ba60cbb0725f 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -714,6 +714,12 @@ static int devm_drm_dev_init(struct device *parent,
> devm_drm_dev_init_release, dev);
> }
>
> +void devm_drm_dev_release_action(struct drm_device *dev)
> +{
> + devm_release_action(dev->dev, devm_drm_dev_init_release, dev);
> +}
> +EXPORT_SYMBOL(devm_drm_dev_release_action);
> +
> void *__devm_drm_dev_alloc(struct device *parent,
> const struct drm_driver *driver,
> size_t size, size_t offset)
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 8878260d7529..fa9123684874 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -444,6 +444,8 @@ struct drm_driver {
> const struct file_operations *fops;
> };
>
> +void devm_drm_dev_release_action(struct drm_device *dev);
> +
> void *__devm_drm_dev_alloc(struct device *parent,
> const struct drm_driver *driver,
> size_t size, size_t offset);
> --
> 2.25.1
>
next prev parent reply other threads:[~2024-04-17 13:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 8:41 [PATCH v2 0/4] drm/xe: Support PCIe FLR Aravind Iddamsetty
2024-04-17 8:41 ` [PATCH v2 1/4] drm: add devm release action Aravind Iddamsetty
2024-04-17 13:55 ` Rodrigo Vivi [this message]
2024-04-17 14:03 ` Maxime Ripard
2024-04-17 8:41 ` [PATCH 2/4] drm/xe: Save and restore PCI state Aravind Iddamsetty
2024-04-17 8:41 ` [PATCH 3/4] drm/xe: Extract xe_gt_idle() helper Aravind Iddamsetty
2024-04-17 9:18 ` Ghimiray, Himal Prasad
2024-04-17 13:50 ` Michal Wajdeczko
2024-04-18 10:13 ` Aravind Iddamsetty
2024-04-17 8:41 ` [PATCH v2 4/4] drm/xe/FLR: Support PCIe FLR Aravind Iddamsetty
2024-04-17 13:59 ` Michal Wajdeczko
2024-04-18 10:11 ` Aravind Iddamsetty
2024-04-17 9:01 ` ✓ CI.Patch_applied: success for drm/xe: Support PCIe FLR (rev3) Patchwork
2024-04-17 9:01 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-17 9:02 ` ✓ CI.KUnit: success " Patchwork
2024-04-17 9:23 ` ✓ CI.Build: " Patchwork
2024-04-17 9:26 ` ✓ CI.Hooks: " Patchwork
2024-04-17 9:27 ` ✗ CI.checksparse: warning " Patchwork
2024-04-17 10:41 ` ✓ CI.BAT: success " Patchwork
2024-04-18 17:01 ` ✗ CI.FULL: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-04-19 8:58 [PATCH v3 0/4] drm/xe: Support PCIe FLR Aravind Iddamsetty
2024-04-19 8:58 ` [PATCH v2 1/4] drm: add devm release action Aravind Iddamsetty
2024-04-19 9:11 ` Maxime Ripard
2024-04-20 8:12 ` Aravind Iddamsetty
2024-04-02 8:58 [PATCH v2 0/4] drm/xe: Support PCIe FLR Aravind Iddamsetty
2024-04-02 8:58 ` [PATCH v2 1/4] drm: add devm release action Aravind Iddamsetty
2024-04-15 4:42 ` Aravind Iddamsetty
2024-04-16 10:28 ` Aravind Iddamsetty
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=Zh_U6zwzyS2Zlf0K@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
--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;
as well as URLs for NNTP newsgroup(s).