summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-23 02:49:48 +0300
committerDave Airlie <airlied@redhat.com>2020-09-23 02:52:24 +0300
commit6ea6be77086f23d4b346c9946dae24593befda2e (patch)
treedc3926a543ed2b8270aa111d97ee603970560eda /drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
parentfc88fef916e8971eefeacc62241b7408b7e7939d (diff)
parent089d83418914abd4d908db117d9a3eca7f51a68c (diff)
downloadlinux-6ea6be77086f23d4b346c9946dae24593befda2e.tar.xz
Merge tag 'drm-misc-next-2020-09-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.10: UAPI Changes: Cross-subsystem Changes: - virtio: Merged a PR for patches that will affect drm/virtio Core Changes: - dev: More devm_drm convertions and removal of drm_dev_init - atomic: Split out drm_atomic_helper_calc_timestamping_constants of drm_atomic_helper_update_legacy_modeset_state - ttm: More rework Driver Changes: - i915: selftests improvements - panfrost: support for Amlogic SoC - vc4: one fix - tree-wide: conversions to devm_drm_dev_alloc, - ast: simplifications of the atomic modesetting code - panfrost: multiple fixes - vc4: multiple fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20200921152956.2gxnsdgxmwhvjyut@gilmour.lan
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_thp.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_thp.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
index 3c00a9e7cfcc..63fe7da4cbf4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
@@ -123,25 +123,20 @@ static void vmw_thp_put_node(struct ttm_resource_manager *man,
int vmw_thp_init(struct vmw_private *dev_priv)
{
- struct ttm_resource_manager *man;
struct vmw_thp_manager *rman;
rman = kzalloc(sizeof(*rman), GFP_KERNEL);
if (!rman)
return -ENOMEM;
- man = &rman->manager;
- man->available_caching = TTM_PL_FLAG_CACHED;
- man->default_caching = TTM_PL_FLAG_CACHED;
-
- ttm_resource_manager_init(man,
+ ttm_resource_manager_init(&rman->manager,
dev_priv->vram_size >> PAGE_SHIFT);
- drm_mm_init(&rman->mm, 0, man->size);
+ drm_mm_init(&rman->mm, 0, rman->manager.size);
spin_lock_init(&rman->lock);
ttm_set_driver_manager(&dev_priv->bdev, TTM_PL_VRAM, &rman->manager);
- ttm_resource_manager_set_used(man, true);
+ ttm_resource_manager_set_used(&rman->manager, true);
return 0;
}