AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Liu <leo.liu@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/amdgpu/vcn3.0: remove intermediate variable
Date: Thu, 21 Oct 2021 09:40:10 -0400	[thread overview]
Message-ID: <a08abdba-acdb-98b0-72e1-0799849e19bb@amd.com> (raw)
In-Reply-To: <20211019201044.426871-4-alexander.deucher@amd.com>

The series are:

Reviewed-by: Leo Liu <leo.liu@amd.com>

On 2021-10-19 4:10 p.m., Alex Deucher wrote:
> No need to use the id variable, just use the constant
> plus instance offset directly.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> index 57b62fb04750..da11ceba0698 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> @@ -60,11 +60,6 @@ static int amdgpu_ih_clientid_vcns[] = {
>   	SOC15_IH_CLIENTID_VCN1
>   };
>   
> -static int amdgpu_ucode_id_vcns[] = {
> -	AMDGPU_UCODE_ID_VCN,
> -	AMDGPU_UCODE_ID_VCN1
> -};
> -
>   static int vcn_v3_0_start_sriov(struct amdgpu_device *adev);
>   static void vcn_v3_0_set_dec_ring_funcs(struct amdgpu_device *adev);
>   static void vcn_v3_0_set_enc_ring_funcs(struct amdgpu_device *adev);
> @@ -1278,7 +1273,6 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)
>   	uint32_t param, resp, expected;
>   	uint32_t offset, cache_size;
>   	uint32_t tmp, timeout;
> -	uint32_t id;
>   
>   	struct amdgpu_mm_table *table = &adev->virt.mm_table;
>   	uint32_t *table_loc;
> @@ -1322,13 +1316,12 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)
>   		cache_size = AMDGPU_GPU_PAGE_ALIGN(adev->vcn.fw->size + 4);
>   
>   		if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
> -			id = amdgpu_ucode_id_vcns[i];
>   			MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
>   				mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),
> -				adev->firmware.ucode[id].tmr_mc_addr_lo);
> +				adev->firmware.ucode[AMDGPU_UCODE_ID_VCN + i].tmr_mc_addr_lo);
>   			MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
>   				mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),
> -				adev->firmware.ucode[id].tmr_mc_addr_hi);
> +				adev->firmware.ucode[AMDGPU_UCODE_ID_VCN + i].tmr_mc_addr_hi);
>   			offset = 0;
>   			MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
>   				mmUVD_VCPU_CACHE_OFFSET0),

      reply	other threads:[~2021-10-21 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 20:10 [PATCH 1/4] drm/amdgpu/vcn3.0: handle harvesting in firmware setup Alex Deucher
2021-10-19 20:10 ` [PATCH 2/4] drm/amdgpu: Consolidate VCN firmware setup code Alex Deucher
2021-10-19 20:10 ` [PATCH 3/4] drm/amdgpu/vcn2.0: remove intermediate variable Alex Deucher
2021-10-19 20:10 ` [PATCH 4/4] drm/amdgpu/vcn3.0: " Alex Deucher
2021-10-21 13:40   ` Leo Liu [this message]

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=a08abdba-acdb-98b0-72e1-0799849e19bb@amd.com \
    --to=leo.liu@amd.com \
    --cc=alexander.deucher@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