diff options
| author | Greg Kroah-Hartman <[email protected]> | 2021-08-09 07:03:47 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-08-09 07:03:47 +0000 |
| commit | bd935a7b21340e2e37f51a7f2d3188145e2fcf1f (patch) | |
| tree | ac8af4e6ea552d32839c415b2f36d416ee327ea4 /drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | |
| parent | Merge tag 'sysfs_defferred_iomem_get_mapping-5.15' of git://git.kernel.org/pu... (diff) | |
| parent | Linux 5.14-rc5 (diff) | |
| download | kernel-bd935a7b21340e2e37f51a7f2d3188145e2fcf1f.tar.gz kernel-bd935a7b21340e2e37f51a7f2d3188145e2fcf1f.zip | |
Merge 5.14-rc5 into driver-core-next
We need the driver core fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h index 59e0fefb15aa..acfa207cf970 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h @@ -54,11 +54,12 @@ static inline void amdgpu_res_first(struct ttm_resource *res, { struct drm_mm_node *node; - if (!res) { + if (!res || res->mem_type == TTM_PL_SYSTEM) { cur->start = start; cur->size = size; cur->remaining = size; cur->node = NULL; + WARN_ON(res && start + size > res->num_pages << PAGE_SHIFT); return; } |
