aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo_util.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-08-11 17:46:57 +1000
committerDave Airlie <airlied@redhat.com>2020-08-24 17:00:48 +1000
commit098754fe3ce79af2d5772c0356ba5d52e67eb64a (patch)
treedb3456663ba41af96888a3a33bdb37ee8c7d8eed /drivers/gpu/drm/ttm/ttm_bo_util.c
parentf688a345f0d7a6df4dd2aeca8e4f3c05e123a0ee (diff)
downloadkernel_replicant_linux-098754fe3ce79af2d5772c0356ba5d52e67eb64a.tar.gz
kernel_replicant_linux-098754fe3ce79af2d5772c0356ba5d52e67eb64a.tar.bz2
kernel_replicant_linux-098754fe3ce79af2d5772c0356ba5d52e67eb64a.zip
drm/ttm: init mem->bus in common code.
The drivers all do the same thing here. Reviewed-by: Christian König <christian.koenig@amd.com> for both. Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200811074658.58309-1-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 7b372ede12c2..eaed29b81d9e 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -138,6 +138,11 @@ int ttm_mem_io_reserve(struct ttm_bo_device *bdev,
if (!bdev->driver->io_mem_reserve)
return 0;
+ mem->bus.addr = NULL;
+ mem->bus.offset = 0;
+ mem->bus.size = mem->num_pages << PAGE_SHIFT;
+ mem->bus.base = 0;
+ mem->bus.is_iomem = false;
retry:
ret = bdev->driver->io_mem_reserve(bdev, mem);
if (ret == -ENOSPC) {