Skip to contentSkip to conversation

drm/amdgpu/: use VCN firmware offset for cache window

PATCH In review Liu, Leo 4 participants 6 messages Jul 18, 2019 – Jul 19, 2019 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Liu, Leo

author
#0 lore raw

PATCH 1/1 drm/amdgpu/: use VCN firmware offset for cache window

Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
index 3cb62e448a37..88e3dedcf926 100644
@@ -379,11 +379,8 @@ static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)
 		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
 			upper_32_bits(adev->vcn.inst->gpu_addr));
 		offset = size;
-		/* No signed header for now from firmware
 		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
 			AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
-		*/
-		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0, 0);
 	}
 
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#2 lore raw

PATCH 1/1 drm/amdgpu: use VCN firmware offset for cache window

Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
index 3cb62e448a37..88e3dedcf926 100644
@@ -379,11 +379,8 @@ static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)
 		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
 			upper_32_bits(adev->vcn.inst->gpu_addr));
 		offset = size;
-		/* No signed header for now from firmware
 		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
 			AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
-		*/
-		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0, 0);
 	}
 
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [PATCH] drm/amdgpu: use VCN firmware offset for cache window

Am 18.07.19 um 17:49 schrieb Liu, Leo:

Quoted 5 lines

Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset.

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -0
index 3cb62e448a37..88e3dedcf926 100644
@@ -379,11 +379,8 @@ static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)
  		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static void vcn_v2_0_mc_resume(struct amdgpu_device *adev) · line 386

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
  			upper_32_bits(adev->vcn.inst->gpu_addr));
  		offset = size;
-		/* No signed header for now from firmware
  		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
  			AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
-		*/
-		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0, 0);
  	}
 
  	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): ebd4bfbf-2c08-8a54-fba4-2a8bf347fc0f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by Huang Rui
#6 lore raw

RE: [PATCH] drm/amdgpu: use VCN firmware offset for cache window

Quoted 8 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Friday, July 19, 2019 3:33 PM
To: Liu, Leo <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: use VCN firmware offset for cache window

Quoted 8 lines

Am 18.07.19 um 17:49 schrieb Liu, Leo:

Quoted 5 lines

Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset.

Thanks Leo!

Patch is

Quoted 22 lines

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static void vcn_v2_0_mc_resume(struct

Quoted 11 lines
---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -0
index 3cb62e448a37..88e3dedcf926 100644
@@ -379,11 +379,8 @@ static void vcn_v2_0_mc_resume(struct

amdgpu_device *adev)

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static void vcn_v2_0_mc_resume(struct · line 379

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -0
  		WREG32_SOC15(UVD, 0,

mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
  			upper_32_bits(adev->vcn.inst->gpu_addr));
  		offset = size;
-		/* No signed header for now from firmware
  		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
  			AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
-		*/
-		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,

0);

Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static void vcn_v2_0_mc_resume(struct amdgpu_device *adev) · line 386

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -0
  	}
 
  	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Huang Rui
#7 lore raw

RE: [PATCH] drm/amdgpu: use VCN firmware offset for cache window

In reply to a message not in the archive
Quoted 8 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liu, Leo
Sent: Thursday, July 18, 2019 11:50 PM
To: [email protected]
Cc: Liu, Leo <[email protected]>
Subject: [PATCH] drm/amdgpu: use VCN firmware offset for cache window

Quoted 5 lines

Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset.

Thanks Leo!
+ Aaron to give a test in our side.

Quoted 27 lines
---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
index 3cb62e448a37..88e3dedcf926 100644
@@ -379,11 +379,8 @@ static void vcn_v2_0_mc_resume(struct
 amdgpu_device *adev)
 		WREG32_SOC15(UVD, 0,
 mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
 			upper_32_bits(adev->vcn.inst->gpu_addr));
 		offset = size;
-		/* No signed header for now from firmware
 		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
 			AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
-		*/
-		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
 0);
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -1
 	}
 
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);
--

2.20.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#8 lore raw
In reply to a message not in the archive

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Liu, Leo <[email protected]>
Sent: Thursday, July 18, 2019 11:46 AM
To: [email protected]
Cc: Liu, Leo
Subject: [PATCH] drm/amdgpu/: use VCN firmware offset for cache window

Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
index 3cb62e448a37..88e3dedcf926 100644
@@ -379,11 +379,8 @@ static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)
                 WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
                         upper_32_bits(adev->vcn.inst->gpu_addr));
                 offset = size;
-               /* No signed header for now from firmware
                 WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
                         AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
-               */
-               WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0, 0);
         }
 
         WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);

--
2.20.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx