drm/amdgpu: remove extra TT unpopulated check
authorChristian König <christian.koenig@amd.com>
Thu, 1 Feb 2018 13:40:35 +0000 (14:40 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:19:53 +0000 (14:19 -0500)
The subsystem should check that, not the driver.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index a021de9629aded3de0885e6fc076c5c5d0f7e6ef..b372d8d650a58b0ec325da9395b3f347c2094653 100644 (file)
@@ -997,9 +997,6 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm,
        struct amdgpu_ttm_tt *gtt = (void *)ttm;
        bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
 
-       if (ttm->state != tt_unpopulated)
-               return 0;
-
        if (gtt && gtt->userptr) {
                ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL);
                if (!ttm->sg)