From: Athul Raj Kollareth <krathul3152@gmail.com>
To: tzimmermann@suse.de
Cc: airlied@gmail.com, dri-devel@lists.freedesktop.org,
krathul3152@gmail.com, linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, simona@ffwll.ch, skhan@linuxfoundation.org
Subject: [PATCH v2] drm: Replace the deprecated DRM_* logging macros in gem helper files
Date: Tue, 19 Aug 2025 00:50:45 +0530 [thread overview]
Message-ID: <20250818192247.58322-1-krathul3152@gmail.com> (raw)
In-Reply-To: <f94151b4-893a-4758-a118-153076a20d3c@suse.de>
Replace the DRM_* logging macros used in gem helper files with the appropriate
ones specified in /include/drm/drm_print.h.
Signed-off-by: Athul Raj Kollareth <krathul3152@gmail.com>
---
Changes in v2:
- Change drm_gem_objects_lookup() to take a drm_device* argument.
- Make appropriate changes to all calls of drm_gem_objects_lookup().
---
drivers/accel/rocket/rocket_job.c | 4 ++--
drivers/gpu/drm/drm_gem.c | 12 +++++++-----
drivers/gpu/drm/drm_gem_dma_helper.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
drivers/gpu/drm/v3d/v3d_submit.c | 2 +-
drivers/gpu/drm/vc4/vc4_gem.c | 2 +-
include/drm/drm_gem.h | 5 +++--
7 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
index 5d4afd692306..db7c50c9ab90 100644
--- a/drivers/accel/rocket/rocket_job.c
+++ b/drivers/accel/rocket/rocket_job.c
@@ -560,14 +560,14 @@ static int rocket_ioctl_submit_job(struct drm_device *dev, struct drm_file *file
if (ret)
goto out_cleanup_job;
- ret = drm_gem_objects_lookup(file, u64_to_user_ptr(job->in_bo_handles),
+ ret = drm_gem_objects_lookup(dev, file, u64_to_user_ptr(job->in_bo_handles),
job->in_bo_handle_count, &rjob->in_bos);
if (ret)
goto out_cleanup_job;
rjob->in_bo_count = job->in_bo_handle_count;
- ret = drm_gem_objects_lookup(file, u64_to_user_ptr(job->out_bo_handles),
+ ret = drm_gem_objects_lookup(dev, file, u64_to_user_ptr(job->out_bo_handles),
job->out_bo_handle_count, &rjob->out_bos);
if (ret)
goto out_cleanup_job;
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 4a89b6acb6af..ee1e5ded6dd6 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -102,7 +102,7 @@ drm_gem_init(struct drm_device *dev)
vma_offset_manager = drmm_kzalloc(dev, sizeof(*vma_offset_manager),
GFP_KERNEL);
if (!vma_offset_manager) {
- DRM_ERROR("out of memory\n");
+ drm_err(dev, "out of memory\n");
return -ENOMEM;
}
@@ -764,6 +764,7 @@ static int objects_lookup(struct drm_file *filp, u32 *handle, int count,
/**
* drm_gem_objects_lookup - look up GEM objects from an array of handles
+ * @dev: corresponding drm_device
* @filp: DRM file private date
* @bo_handles: user pointer to array of userspace handle
* @count: size of handle array
@@ -780,8 +781,9 @@ static int objects_lookup(struct drm_file *filp, u32 *handle, int count,
* failure. 0 is returned on success.
*
*/
-int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles,
- int count, struct drm_gem_object ***objs_out)
+int drm_gem_objects_lookup(struct drm_device *dev, struct drm_file *filp,
+ void __user *bo_handles, int count,
+ struct drm_gem_object ***objs_out)
{
int ret;
u32 *handles;
@@ -805,7 +807,7 @@ int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles,
if (copy_from_user(handles, bo_handles, count * sizeof(u32))) {
ret = -EFAULT;
- DRM_DEBUG("Failed to copy in GEM handles\n");
+ drm_dbg_core(dev, "Failed to copy in GEM handles\n");
goto out;
}
@@ -858,7 +860,7 @@ long drm_gem_dma_resv_wait(struct drm_file *filep, u32 handle,
obj = drm_gem_object_lookup(filep, handle);
if (!obj) {
- DRM_DEBUG("Failed to look up GEM BO %d\n", handle);
+ drm_dbg_core(NULL, "Failed to look up GEM BO %d\n", handle);
return -EINVAL;
}
diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c
index 4f0320df858f..a507cf517015 100644
--- a/drivers/gpu/drm/drm_gem_dma_helper.c
+++ b/drivers/gpu/drm/drm_gem_dma_helper.c
@@ -582,7 +582,7 @@ drm_gem_dma_prime_import_sg_table_vmap(struct drm_device *dev,
ret = dma_buf_vmap_unlocked(attach->dmabuf, &map);
if (ret) {
- DRM_ERROR("Failed to vmap PRIME buffer\n");
+ drm_err(dev, "Failed to vmap PRIME buffer\n");
return ERR_PTR(ret);
}
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 1ea6c509a5d5..3ffd9d5a9056 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -188,7 +188,7 @@ panfrost_lookup_bos(struct drm_device *dev,
if (!job->bo_count)
return 0;
- ret = drm_gem_objects_lookup(file_priv,
+ ret = drm_gem_objects_lookup(dev, file_priv,
(void __user *)(uintptr_t)args->bo_handles,
job->bo_count, &job->bos);
if (ret)
diff --git a/drivers/gpu/drm/v3d/v3d_submit.c b/drivers/gpu/drm/v3d/v3d_submit.c
index 5171ffe9012d..a3ac8e6a4a72 100644
--- a/drivers/gpu/drm/v3d/v3d_submit.c
+++ b/drivers/gpu/drm/v3d/v3d_submit.c
@@ -79,7 +79,7 @@ v3d_lookup_bos(struct drm_device *dev,
return -EINVAL;
}
- return drm_gem_objects_lookup(file_priv,
+ return drm_gem_objects_lookup(dev, file_priv,
(void __user *)(uintptr_t)bo_handles,
job->bo_count, &job->bo);
}
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 255e5817618e..6ce65611231b 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -692,7 +692,7 @@ vc4_cl_lookup_bos(struct drm_device *dev,
return -EINVAL;
}
- ret = drm_gem_objects_lookup(file_priv, u64_to_user_ptr(args->bo_handles),
+ ret = drm_gem_objects_lookup(dev, file_priv, u64_to_user_ptr(args->bo_handles),
exec->bo_count, &exec->bo);
if (ret)
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
index d3a7b43e2c63..03cb03f46524 100644
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -544,8 +544,9 @@ void drm_gem_unlock(struct drm_gem_object *obj);
int drm_gem_vmap(struct drm_gem_object *obj, struct iosys_map *map);
void drm_gem_vunmap(struct drm_gem_object *obj, struct iosys_map *map);
-int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles,
- int count, struct drm_gem_object ***objs_out);
+int drm_gem_objects_lookup(struct drm_device *dev, struct drm_file *filp,
+ void __user *bo_handles, int count,
+ struct drm_gem_object ***objs_out);
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
long drm_gem_dma_resv_wait(struct drm_file *filep, u32 handle,
bool wait_all, unsigned long timeout);
--
2.50.1
next prev parent reply other threads:[~2025-08-18 19:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 15:26 [PATCH] gpu/drm: Replace the deprecated logging functions in drm_gem* files Athul Raj Kollareth
2025-08-18 7:09 ` Thomas Zimmermann
2025-08-18 19:20 ` Athul Raj Kollareth [this message]
2025-08-18 19:42 ` [PATCH v2] drm: Replace the deprecated DRM_* logging macros in gem helper files Michal Wajdeczko
2025-08-19 11:16 ` Athul Raj Kollareth
2025-08-19 12:11 ` [PATCH v3] " Athul Raj Kollareth
2025-08-19 20:14 ` Michal Wajdeczko
2025-08-20 14:55 ` Athul Raj Kollareth
2025-08-20 15:04 ` [PATCH v4] " Athul Raj Kollareth
2025-08-20 8:48 ` [PATCH v2] " Thomas Zimmermann
[not found] ` <CAPZGEKyhn1LLZQ7z04_u6pjTf9Uqy+ycH4t7xYMRe5dDR9Vg2Q@mail.gmail.com>
2025-08-19 10:57 ` Athul Raj Kollareth
2025-08-20 8:50 ` Thomas Zimmermann
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=20250818192247.58322-1-krathul3152@gmail.com \
--to=krathul3152@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--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