From 44d847b7439bdea0b6c5640446427daa3ebcc7fa Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 13 Aug 2013 19:10:30 +0200 Subject: drm: init TTM dev_mapping in ttm_bo_device_init() With dev->anon_inode we have a global address_space ready for operation right from the beginning. Therefore, there is no need to do a delayed setup with TTM. Instead, set dev_mapping during initialization in ttm_bo_device_init() and remove any "if (dev_mapping)" conditions. Cc: Dave Airlie Cc: Ben Skeggs Cc: Maarten Lankhorst Cc: Alex Deucher Cc: Thomas Hellstrom Signed-off-by: David Herrmann --- drivers/gpu/drm/bochs/bochs_mm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/bochs/bochs_mm.c') diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index 2d8546d..f488be5 100644 --- a/drivers/gpu/drm/bochs/bochs_mm.c +++ b/drivers/gpu/drm/bochs/bochs_mm.c @@ -225,7 +225,9 @@ int bochs_mm_init(struct bochs_device *bochs) ret = ttm_bo_device_init(&bochs->ttm.bdev, bochs->ttm.bo_global_ref.ref.object, - &bochs_bo_driver, DRM_FILE_PAGE_OFFSET, + &bochs_bo_driver, + bochs->dev->anon_inode->i_mapping, + DRM_FILE_PAGE_OFFSET, true); if (ret) { DRM_ERROR("Error initialising bo driver; %d\n", ret); -- cgit v1.1