RE: [PATCH] drm/amdgpu: drop the extra sign extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Reviewed-by: Yang Wang <kevinyang.wang@xxxxxxx>

Best Regards,
Kevin

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex Deucher
Sent: Thursday, March 16, 2023 1:53 AM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Subject: [PATCH] drm/amdgpu: drop the extra sign extension

amdgpu_bo_gpu_offset_no_check() already calls
amdgpu_gmc_sign_extend() so no need to call it twice.

Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index 69e105fa41f6..ce2afd7e775b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -152,7 +152,7 @@ static void amdgpu_vm_sdma_copy_ptes(struct amdgpu_vm_update_params *p,

        src += p->num_dw_left * 4;

-       pe += amdgpu_gmc_sign_extend(amdgpu_bo_gpu_offset_no_check(bo));
+       pe += amdgpu_bo_gpu_offset_no_check(bo);
        trace_amdgpu_vm_copy_ptes(pe, src, count, p->immediate);

        amdgpu_vm_copy_pte(p->adev, ib, pe, src, count); @@ -179,7 +179,7 @@ static void amdgpu_vm_sdma_set_ptes(struct amdgpu_vm_update_params *p,  {
        struct amdgpu_ib *ib = p->job->ibs;

-       pe += amdgpu_gmc_sign_extend(amdgpu_bo_gpu_offset_no_check(bo));
+       pe += amdgpu_bo_gpu_offset_no_check(bo);
        trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags, p->immediate);
        if (count < 3) {
                amdgpu_vm_write_pte(p->adev, ib, pe, addr | flags,
--
2.39.2





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux