mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Mukesh Ogare <mukeshogare871@gmail.com>,
	alexander.deucher@amd.com, airlied@gmail.com, simona@ffwll.ch,
	amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/radeon: convert UVD v1.0 logging to drm_* helpers
Date: Wed, 7 Jan 2026 13:30:44 +0100	[thread overview]
Message-ID: <49971777-ffd5-4a85-b08c-f0a417f26777@amd.com> (raw)
In-Reply-To: <20251220184755.1803625-1-mukeshogare871@gmail.com>

On 12/20/25 19:47, Mukesh Ogare wrote:
> Replace legacy DRM_ERROR()/DRM_INFO() logging in the UVD v1.0 code
> with drm_err() and drm_info() helpers that take a struct drm_device.
> 
> Using drm_* logging provides proper device context in dmesg, which is
> important for systems with multiple DRM devices, and aligns the radeon
> driver with current DRM logging practices.
> 
> No functional change intended.
> 
> Signed-off-by: Mukesh Ogare <mukeshogare871@gmail.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> 
> diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
> index 5684639d20a6..5e6607e16244 100644
> --- a/drivers/gpu/drm/radeon/uvd_v1_0.c
> +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
> @@ -179,7 +179,7 @@ int uvd_v1_0_init(struct radeon_device *rdev)
>  
>  	r = radeon_ring_lock(rdev, ring, 10);
>  	if (r) {
> -		DRM_ERROR("radeon: ring failed to lock UVD ring (%d).\n", r);
> +		drm_err(&rdev->ddev, "radeon: ring failed to lock UVD ring (%d).\n", r);
>  		goto done;
>  	}
>  
> @@ -232,7 +232,7 @@ int uvd_v1_0_init(struct radeon_device *rdev)
>  			break;
>  		}
>  
> -		DRM_INFO("UVD initialized successfully.\n");
> +		drm_info(&rdev->ddev, "UVD initialized successfully.\n");
>  	}
>  
>  	return r;
> @@ -338,7 +338,7 @@ int uvd_v1_0_start(struct radeon_device *rdev)
>  		if (status & 2)
>  			break;
>  
> -		DRM_ERROR("UVD not responding, trying to reset the VCPU!!!\n");
> +		drm_err(&rdev->ddev, "UVD not responding, trying to reset the VCPU!!!\n");
>  		WREG32_P(UVD_SOFT_RESET, VCPU_SOFT_RESET, ~VCPU_SOFT_RESET);
>  		mdelay(10);
>  		WREG32_P(UVD_SOFT_RESET, 0, ~VCPU_SOFT_RESET);
> @@ -347,7 +347,7 @@ int uvd_v1_0_start(struct radeon_device *rdev)
>  	}
>  
>  	if (r) {
> -		DRM_ERROR("UVD not responding, giving up!!!\n");
> +		drm_err(&rdev->ddev, "UVD not responding, giving up!!!\n");
>  		return r;
>  	}
>  
> @@ -427,7 +427,7 @@ int uvd_v1_0_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
>  	WREG32(UVD_CONTEXT_ID, 0xCAFEDEAD);
>  	r = radeon_ring_lock(rdev, ring, 3);
>  	if (r) {
> -		DRM_ERROR("radeon: cp failed to lock ring %d (%d).\n",
> +		drm_err(&rdev->ddev, "radeon: cp failed to lock ring %d (%d).\n",
>  			  ring->idx, r);
>  		return r;
>  	}
> @@ -442,10 +442,10 @@ int uvd_v1_0_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
>  	}
>  
>  	if (i < rdev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		drm_info(&rdev->ddev, "ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);
>  	} else {
> -		DRM_ERROR("radeon: ring %d test failed (0x%08X)\n",
> +		drm_err(&rdev->ddev, "radeon: ring %d test failed (0x%08X)\n",
>  			  ring->idx, tmp);
>  		r = -EINVAL;
>  	}
> @@ -507,34 +507,34 @@ int uvd_v1_0_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
>  	else
>  		r = radeon_set_uvd_clocks(rdev, 53300, 40000);
>  	if (r) {
> -		DRM_ERROR("radeon: failed to raise UVD clocks (%d).\n", r);
> +		drm_err(&rdev->ddev, "radeon: failed to raise UVD clocks (%d).\n", r);
>  		return r;
>  	}
>  
>  	r = radeon_uvd_get_create_msg(rdev, ring->idx, 1, NULL);
>  	if (r) {
> -		DRM_ERROR("radeon: failed to get create msg (%d).\n", r);
> +		drm_err(&rdev->ddev, "radeon: failed to get create msg (%d).\n", r);
>  		goto error;
>  	}
>  
>  	r = radeon_uvd_get_destroy_msg(rdev, ring->idx, 1, &fence);
>  	if (r) {
> -		DRM_ERROR("radeon: failed to get destroy ib (%d).\n", r);
> +		drm_err(&rdev->ddev, "radeon: failed to get destroy ib (%d).\n", r);
>  		goto error;
>  	}
>  
>  	r = radeon_fence_wait_timeout(fence, false, usecs_to_jiffies(
>  		RADEON_USEC_IB_TEST_TIMEOUT));
>  	if (r < 0) {
> -		DRM_ERROR("radeon: fence wait failed (%d).\n", r);
> +		drm_err(&rdev->ddev, "radeon: fence wait failed (%d).\n", r);
>  		goto error;
>  	} else if (r == 0) {
> -		DRM_ERROR("radeon: fence wait timed out.\n");
> +		drm_err(&rdev->ddev, "radeon: fence wait timed out.\n");
>  		r = -ETIMEDOUT;
>  		goto error;
>  	}
>  	r = 0;
> -	DRM_INFO("ib test on ring %d succeeded\n",  ring->idx);
> +	drm_info(&rdev->ddev, "ib test on ring %d succeeded\n",  ring->idx);
>  error:
>  	radeon_fence_unref(&fence);
>  	radeon_set_uvd_clocks(rdev, 0, 0);


  reply	other threads:[~2026-01-07 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20 18:47 Mukesh Ogare
2026-01-07 12:30 ` Christian König [this message]
2026-01-08 14:12   ` Alex Deucher

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=49971777-ffd5-4a85-b08c-f0a417f26777@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mukeshogare871@gmail.com \
    --cc=simona@ffwll.ch \
    /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

all inboxes | Powered by JetHome®