All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher@amd.com>
To: "Jian, Jane" <Jane.Jian@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Chen, Guchun" <Guchun.Chen@amd.com>,
	"Chen,  JingWen" <JingWen.Chen2@amd.com>
Subject: Re: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID
Date: Tue, 23 Nov 2021 15:02:34 +0000	[thread overview]
Message-ID: <BL1PR12MB514481ADF439A81349D03279F7609@BL1PR12MB5144.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20211123113438.5200-1-Jane.Jian@amd.com>

[-- Attachment #1: Type: text/plain, Size: 2818 bytes --]

[Public]

Can we just add a check for the new IP version in that case?  This looks really hacky.

Alex

________________________________
From: Jane Jian <Jane.Jian@amd.com>
Sent: Tuesday, November 23, 2021 6:34 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Chen, JingWen <JingWen.Chen2@amd.com>
Cc: Jian, Jane <Jane.Jian@amd.com>
Subject: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

[WHY]
for sriov odd# vf will modify vcn0 engine ip revision(due to multimedia bandwidth feature),
which will be mismatched with original vcn0 revision

[HOW]
skip ip revision match case and continue use asic type to check

Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Change-Id: I1ace32acbf3a13c0baac958508da1324ec387a58
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c       | 6 ++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 4e3669407518..0a91e53f520c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1334,7 +1334,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
                         return r;
         }

-       r = amdgpu_discovery_set_mm_ip_blocks(adev);
+       if (adev->asic_type == CHIP_SIENNA_CICHLID && amdgpu_sriov_vf(adev))
+               r = amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
+       else
+               r = amdgpu_discovery_set_mm_ip_blocks(adev);
         if (r)
                 return r;

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 4f7c70845785..87f56b61be53 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -86,6 +86,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
         for (i = 0; i < adev->vcn.num_vcn_inst; i++)
                 atomic_set(&adev->vcn.inst[i].dpg_enc_submission_cnt, 0);

+       if (adev->asic_type == CHIP_SIENNA_CICHLID && amdgpu_sriov_vf(adev)) {
+               fw_name = FIRMWARE_SIENNA_CICHLID;
+               goto next;
+       }
         switch (adev->ip_versions[UVD_HWIP][0]) {
         case IP_VERSION(1, 0, 0):
         case IP_VERSION(1, 0, 1):
@@ -168,6 +172,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
                 return -EINVAL;
         }

+next:
+
         r = request_firmware(&adev->vcn.fw, fw_name, adev->dev);
         if (r) {
                 dev_err(adev->dev, "amdgpu_vcn: Can't load firmware \"%s\"\n",
--
2.17.1


[-- Attachment #2: Type: text/html, Size: 5633 bytes --]

  reply	other threads:[~2021-11-23 15:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 11:34 [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID Jane Jian
2021-11-23 15:02 ` Deucher, Alexander [this message]
2021-11-24  2:53   ` Jian, Jane
2021-11-24  3:10     ` Chen, Guchun
  -- strict thread matches above, loose matches on Subject: below --
2021-11-25  3:14 Jane Jian
2021-11-25  3:18 ` Chen, Guchun
2021-11-24 14:20 Jane Jian
2021-11-24 14:22 ` Alex Deucher
2021-11-25  2:18   ` Chen, Guchun
2021-11-25  2:21     ` Chen, Guchun
2021-11-29 16:53       ` Deucher, Alexander
2021-11-24  9:54 Jane Jian
2021-11-24 14:12 ` Alex Deucher
2021-11-23 11:33 Jane Jian

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=BL1PR12MB514481ADF439A81349D03279F7609@BL1PR12MB5144.namprd12.prod.outlook.com \
    --to=alexander.deucher@amd.com \
    --cc=Guchun.Chen@amd.com \
    --cc=Jane.Jian@amd.com \
    --cc=JingWen.Chen2@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 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.