Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/ttm: Tidy ttm_operation_ctx initialization

No need to initialize a subset of fields to zero.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://lore.kernel.org/r/20250919131530.91247-4-tvrtko.ursulin@igalia.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
[tursulin: fixup conflict in ttm_resource_manager_evict_all]

authored by

Tvrtko Ursulin and committed by
Tvrtko Ursulin
802620f5 feb06515

+5 -17
+2 -8
drivers/gpu/drm/ttm/ttm_bo_util.c
··· 343 343 struct ttm_bo_kmap_obj *map) 344 344 { 345 345 struct ttm_resource *mem = bo->resource; 346 - struct ttm_operation_ctx ctx = { 347 - .interruptible = false, 348 - .no_wait_gpu = false 349 - }; 346 + struct ttm_operation_ctx ctx = { }; 350 347 struct ttm_tt *ttm = bo->ttm; 351 348 struct ttm_resource_manager *man = 352 349 ttm_manager_type(bo->bdev, bo->resource->mem_type); ··· 527 530 iosys_map_set_vaddr_iomem(map, vaddr_iomem); 528 531 529 532 } else { 530 - struct ttm_operation_ctx ctx = { 531 - .interruptible = false, 532 - .no_wait_gpu = false 533 - }; 533 + struct ttm_operation_ctx ctx = { }; 534 534 struct ttm_tt *ttm = bo->ttm; 535 535 pgprot_t prot; 536 536 void *vaddr;
+1 -4
drivers/gpu/drm/ttm/ttm_device.c
··· 135 135 */ 136 136 int ttm_device_prepare_hibernation(struct ttm_device *bdev) 137 137 { 138 - struct ttm_operation_ctx ctx = { 139 - .interruptible = false, 140 - .no_wait_gpu = false, 141 - }; 138 + struct ttm_operation_ctx ctx = { }; 142 139 int ret; 143 140 144 141 do {
+1 -4
drivers/gpu/drm/ttm/ttm_resource.c
··· 545 545 int ttm_resource_manager_evict_all(struct ttm_device *bdev, 546 546 struct ttm_resource_manager *man) 547 547 { 548 - struct ttm_operation_ctx ctx = { 549 - .interruptible = false, 550 - .no_wait_gpu = false, 551 - }; 548 + struct ttm_operation_ctx ctx = { }; 552 549 struct dma_fence *fence; 553 550 int ret, i; 554 551
+1 -1
drivers/gpu/drm/ttm/ttm_tt.c
··· 456 456 /* Test the shrinker functions and dump the result */ 457 457 static int ttm_tt_debugfs_shrink_show(struct seq_file *m, void *data) 458 458 { 459 - struct ttm_operation_ctx ctx = { false, false }; 459 + struct ttm_operation_ctx ctx = { }; 460 460 461 461 seq_printf(m, "%d\n", ttm_global_swapout(&ctx, GFP_KERNEL)); 462 462 return 0;