From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Subject: [PATCH 1/3] drm/xe: use devm instead of drmm for managed bo
Date: Fri, 9 Aug 2024 16:12:35 -0700 [thread overview]
Message-ID: <20240809231237.1503796-2-daniele.ceraolospurio@intel.com> (raw)
In-Reply-To: <20240809231237.1503796-1-daniele.ceraolospurio@intel.com>
The BO cleanup touches the GGTT and therefore requires the HW to be
available, so we need to use devm instead of drmm.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1160
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/xe/xe_bo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 3295bc92d7aa..45652d7e6fa6 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1576,7 +1576,7 @@ struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
return bo;
}
-static void __xe_bo_unpin_map_no_vm(struct drm_device *drm, void *arg)
+static void __xe_bo_unpin_map_no_vm(void *arg)
{
xe_bo_unpin_map_no_vm(arg);
}
@@ -1591,7 +1591,7 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile
if (IS_ERR(bo))
return bo;
- ret = drmm_add_action_or_reset(&xe->drm, __xe_bo_unpin_map_no_vm, bo);
+ ret = devm_add_action_or_reset(xe->drm.dev, __xe_bo_unpin_map_no_vm, bo);
if (ret)
return ERR_PTR(ret);
@@ -1639,7 +1639,7 @@ int xe_managed_bo_reinit_in_vram(struct xe_device *xe, struct xe_tile *tile, str
if (IS_ERR(bo))
return PTR_ERR(bo);
- drmm_release_action(&xe->drm, __xe_bo_unpin_map_no_vm, *src);
+ devm_release_action(xe->drm.dev, __xe_bo_unpin_map_no_vm, *src);
*src = bo;
return 0;
--
2.43.0
next prev parent reply other threads:[~2024-08-09 23:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 23:12 [PATCH 0/3] uC-related drmm vs devm fixes Daniele Ceraolo Spurio
2024-08-09 23:12 ` Daniele Ceraolo Spurio [this message]
2024-08-10 4:39 ` [PATCH 1/3] drm/xe: use devm instead of drmm for managed bo Lucas De Marchi
2024-08-12 10:41 ` Matthew Auld
2024-08-12 16:38 ` Daniele Ceraolo Spurio
2024-08-12 18:17 ` Matthew Auld
2024-08-12 18:43 ` Daniele Ceraolo Spurio
2024-08-09 23:12 ` [PATCH 2/3] drm/xe/uc: Use managed bo for HuC and GSC objects Daniele Ceraolo Spurio
2024-08-15 20:00 ` Lucas De Marchi
2024-08-15 20:44 ` Daniele Ceraolo Spurio
2024-08-09 23:12 ` [PATCH 3/3] drm/xe/uc: Use devm to register cleanup that includes exec_queues Daniele Ceraolo Spurio
2024-08-09 23:46 ` [PATCH 0/3] uC-related drmm vs devm fixes Matthew Brost
2024-08-10 0:06 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-10 0:06 ` ✓ CI.checkpatch: " Patchwork
2024-08-10 0:07 ` ✓ CI.KUnit: " Patchwork
2024-08-10 0:24 ` ✓ CI.Build: " Patchwork
2024-08-10 0:29 ` ✓ CI.Hooks: " Patchwork
2024-08-10 0:31 ` ✓ CI.checksparse: " Patchwork
2024-08-10 0:52 ` ✗ CI.BAT: failure " Patchwork
2024-08-10 3:44 ` ✗ CI.FULL: " Patchwork
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=20240809231237.1503796-2-daniele.ceraolospurio@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.auld@intel.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