All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Hawking" <Hawking.Zhang@amd.com>
To: "Chen, Jiansong (Simon)" <Jiansong.Chen@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Zhou1, Tao" <Tao.Zhou1@amd.com>,
	"Chen, Jiansong \(Simon\)" <Jiansong.Chen@amd.com>
Subject: RE: [PATCH] drm/amdgpu: correct releasing the same sdma fw repeatedly
Date: Wed, 30 Dec 2020 10:02:18 +0000	[thread overview]
Message-ID: <DM6PR12MB4075516C663A786B8BC04BF9FCD70@DM6PR12MB4075.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20201230092253.3137-1-Jiansong.Chen@amd.com>

[AMD Public Use]

Shall we ignore this patch and wait for your latest fixes that remove the asic type check for sdma_v5_2.

I agree with you that should be more reasonable approach.

Regards,
Hawking

-----Original Message-----
From: Jiansong Chen <Jiansong.Chen@amd.com> 
Sent: Wednesday, December 30, 2020 17:23
To: amd-gfx@lists.freedesktop.org
Cc: Zhou1, Tao <Tao.Zhou1@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Chen, Jiansong (Simon) <Jiansong.Chen@amd.com>
Subject: [PATCH] drm/amdgpu: correct releasing the same sdma fw repeatedly

Same as sienna_cichlid, dimgrey_cavefish and navy_flounder reuse sdma0 fw for other instances, so free it only once.

Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com>
Change-Id: I9dda4a9b73e20243ee48f54d8f0c7593d7e7354b
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index f1ba36a094da..6ac314c8be32 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -125,7 +125,8 @@ static void sdma_v5_2_destroy_inst_ctx(struct amdgpu_device *adev)
 		release_firmware(adev->sdma.instance[i].fw);
 		adev->sdma.instance[i].fw = NULL;
 
-		if (adev->asic_type == CHIP_SIENNA_CICHLID)
+		if (adev->asic_type >= CHIP_SIENNA_CICHLID &&
+		    adev->asic_type <= CHIP_DIMGREY_CAVEFISH)
 			break;
 	}
 
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-12-30 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30  9:22 [PATCH] drm/amdgpu: correct releasing the same sdma fw repeatedly Jiansong Chen
2020-12-30 10:02 ` Zhang, Hawking [this message]
2020-12-30 10:07   ` Chen, Jiansong (Simon)

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=DM6PR12MB4075516C663A786B8BC04BF9FCD70@DM6PR12MB4075.namprd12.prod.outlook.com \
    --to=hawking.zhang@amd.com \
    --cc=Jiansong.Chen@amd.com \
    --cc=Tao.Zhou1@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.