All of lore.kernel.org
 help / color / mirror / Atom feed
From: Athul Raj Kollareth <krathul3152@gmail.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>, tzimmermann@suse.de
Cc: tzimmermann@suse.de, airlied@gmail.com,
	dri-devel@lists.freedesktop.org,
	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: Re: [PATCH v2] drm: Replace the deprecated DRM_* logging macros in gem helper files
Date: Tue, 19 Aug 2025 16:46:29 +0530	[thread overview]
Message-ID: <aKRdDRLZIEgZ17Ms@Terra> (raw)
In-Reply-To: <90f79bba-bee6-47ea-9881-9ae37eae42e0@intel.com>

On Mon, Aug 18, 2025 at 09:42:46PM +0200, Michal Wajdeczko wrote:
 
 
> On 8/18/2025 9:20 PM, Athul Raj Kollareth wrote:
> > 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)
> >  {
> 
> can't we just use:
> 
> 	struct drm_device *dev = filp->minor->dev;
> 

Ah, yes. I think I can use that. Thank you.

Best regards,
Athul

 

  reply	other threads:[~2025-08-19 11:16 UTC|newest]

Thread overview: 13+ 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   ` [PATCH v2] drm: Replace the deprecated DRM_* logging macros in gem helper files Athul Raj Kollareth
2025-08-18 19:42     ` Michal Wajdeczko
2025-08-19 11:16       ` Athul Raj Kollareth [this message]
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
2025-08-18 19:46     ` Athul Raj K
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=aKRdDRLZIEgZ17Ms@Terra \
    --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=michal.wajdeczko@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.