Skip to content

Commit edb8998

Browse files
committed
drm/vmwgfx: fix regression in thp code due to ttm init refactor.
When I refactored this code with the new init paths, I failed to set the funcs back up properly, this caused a failure to bringup gdm properly. Fixes: 252f8d7 ("drm/vmwgfx/ttm: convert vram mm init to new code paths") Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2101bfc commit edb8998

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_thp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ static struct vmw_thp_manager *to_thp_manager(struct ttm_resource_manager *man)
2626
return container_of(man, struct vmw_thp_manager, manager);
2727
}
2828

29+
static const struct ttm_resource_manager_func vmw_thp_func;
30+
2931
static int vmw_thp_insert_aligned(struct drm_mm *mm, struct drm_mm_node *node,
3032
unsigned long align_pages,
3133
const struct ttm_place *place,
@@ -132,6 +134,7 @@ int vmw_thp_init(struct vmw_private *dev_priv)
132134
ttm_resource_manager_init(&rman->manager,
133135
dev_priv->vram_size >> PAGE_SHIFT);
134136

137+
rman->manager.func = &vmw_thp_func;
135138
drm_mm_init(&rman->mm, 0, rman->manager.size);
136139
spin_lock_init(&rman->lock);
137140

@@ -171,7 +174,7 @@ static void vmw_thp_debug(struct ttm_resource_manager *man,
171174
spin_unlock(&rman->lock);
172175
}
173176

174-
const struct ttm_resource_manager_func vmw_thp_func = {
177+
static const struct ttm_resource_manager_func vmw_thp_func = {
175178
.alloc = vmw_thp_get_node,
176179
.free = vmw_thp_put_node,
177180
.debug = vmw_thp_debug

0 commit comments

Comments
 (0)