AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Huang, Tim" <Tim.Huang@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Liu, Aaron" <Aaron.Liu@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/amdgpu: convert to UVD IP version checking
Date: Mon, 24 Jan 2022 15:32:03 +0800	[thread overview]
Message-ID: <Ye5V83QAwAaX2WdW@amd.com> (raw)
In-Reply-To: <20220124032042.1974371-2-xiaohu.huang@amd.com>

On Mon, Jan 24, 2022 at 11:20:41AM +0800, Huang, Tim wrote:
> Use IP versions rather than asic_type to differentiate IP version specific features.
> 
> Signed-off-by: Tim Huang <xiaohu.huang@amd.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> index 01c242c5abc3..c5ffb14ba183 100644
> --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> @@ -50,11 +50,16 @@ static int jpeg_v3_0_early_init(void *handle)
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  
> -	if (adev->asic_type != CHIP_YELLOW_CARP) {
> -		u32 harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING);
> +	u32 harvest;
>  
> +	switch (adev->ip_versions[UVD_HWIP][0]) {
> +	case IP_VERSION(3, 1, 1): 
> +		break;
> +	default:
> +		harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING);
>  		if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
>  			return -ENOENT;
> +		break;
>  	}
>  
>  	adev->jpeg.num_jpeg_inst = 1;
> -- 
> 2.25.1
> 

  reply	other threads:[~2022-01-24  7:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  3:20 [PATCH 1/3] drm/amdgpu: convert to NBIO IP version checking Tim Huang
2022-01-24  3:20 ` [PATCH 2/3] drm/amdgpu: convert to UVD " Tim Huang
2022-01-24  7:32   ` Huang Rui [this message]
2022-01-24  3:20 ` [PATCH 3/3] drm/amd/display: convert to DCE " Tim Huang
2022-01-24  6:14   ` Liu, Aaron
2022-01-24  7:34   ` Huang Rui
2022-01-24  7:28 ` [PATCH 1/3] drm/amdgpu: convert to NBIO " Huang Rui

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=Ye5V83QAwAaX2WdW@amd.com \
    --to=ray.huang@amd.com \
    --cc=Aaron.Liu@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Tim.Huang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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