diff options
| author | Philip Yang <Philip.Yang@amd.com> | 2025-04-22 16:15:58 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-12-08 13:56:30 -0500 |
| commit | cf856ca9b999bc81d27bf8c4e1d7b5c7740bcea8 (patch) | |
| tree | 3f0fd99885ff7ef4b6e17dd856cab22bff8453c7 /drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | |
| parent | f6b1c1f5fd7237f77fc3880603ea54dcf0371a20 (diff) | |
| download | linux-next-cf856ca9b999bc81d27bf8c4e1d7b5c7740bcea8.tar.gz linux-next-cf856ca9b999bc81d27bf8c4e1d7b5c7740bcea8.zip | |
drm/amdgpu: Update vm start, end, hole to support 57bit address
Change gmc macro AMDGPU_GMC_HOLE_START/END/MASK to 57bit if vm root
level is PDB3 for 5-level page tables.
The macro access adev without passing adev as parameter is to minimize
the code change to support 57bit, then we have to add adev variable in
several places to use the macro.
Because adev definition is not available in all amdgpu c files which
include amdgpu_gmc.h, change inline function amdgpu_gmc_sign_extend to
macro.
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c index eba9fb359047..f44cb17b1e2f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c @@ -352,6 +352,7 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = { /** * amdgpu_userq_fence_read_wptr - Read the userq wptr value * + * @adev: amdgpu_device pointer * @queue: user mode queue structure pointer * @wptr: write pointer value * @@ -361,7 +362,8 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = { * * Returns wptr value on success, error on failure. */ -static int amdgpu_userq_fence_read_wptr(struct amdgpu_usermode_queue *queue, +static int amdgpu_userq_fence_read_wptr(struct amdgpu_device *adev, + struct amdgpu_usermode_queue *queue, u64 *wptr) { struct amdgpu_bo_va_mapping *mapping; @@ -455,6 +457,7 @@ amdgpu_userq_fence_driver_force_completion(struct amdgpu_usermode_queue *userq) int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) { + struct amdgpu_device *adev = drm_to_adev(dev); struct amdgpu_fpriv *fpriv = filp->driver_priv; struct amdgpu_userq_mgr *userq_mgr = &fpriv->userq_mgr; struct drm_amdgpu_userq_signal *args = data; @@ -545,7 +548,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data, goto put_gobj_write; } - r = amdgpu_userq_fence_read_wptr(queue, &wptr); + r = amdgpu_userq_fence_read_wptr(adev, queue, &wptr); if (r) goto put_gobj_write; |
