From: Dave Airlie <airl...@redhat.com>

The driver now controls these, the core just controls the system
memory one.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c    | 2 --
 include/drm/ttm/ttm_bo_driver.h | 6 ++++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index f2b41c4d7d51..f35548ff17e8 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1608,8 +1608,6 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
 
        bdev->driver = driver;
 
-       memset(bdev->man_priv, 0, sizeof(bdev->man_priv));
-
        ttm_bo_init_sysman(bdev);
 
        bdev->vma_manager = vma_manager;
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index bfc549782775..b2ffeaed94e7 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -414,7 +414,7 @@ struct ttm_bo_device {
        /*
         * access via ttm_manager_type.
         */
-       struct ttm_mem_type_manager man_priv[TTM_NUM_MEM_TYPES];
+       struct ttm_mem_type_manager sysman; /* move to global */
        struct ttm_mem_type_manager *man_drv[TTM_NUM_MEM_TYPES];
        /*
         * Protected by internal locks.
@@ -446,9 +446,11 @@ struct ttm_bo_device {
 static inline struct ttm_mem_type_manager *ttm_manager_type(struct 
ttm_bo_device *bdev,
                                                            int mem_type)
 {
+       if (mem_type == TTM_PL_SYSTEM)
+               return &bdev->sysman;
        if (bdev->man_drv[mem_type])
                return bdev->man_drv[mem_type];
-       return &bdev->man_priv[mem_type];
+       return NULL;
 }
 
 static inline void ttm_set_driver_manager(struct ttm_bo_device *bdev,
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to