]> Gentwo Git Trees - linux/.git/commit
drm/panthor: Simplify mmu_hw_do_operation_locked
authorSteven Price <steven.price@arm.com>
Fri, 15 Aug 2025 13:42:24 +0000 (14:42 +0100)
committerSteven Price <steven.price@arm.com>
Thu, 28 Aug 2025 10:46:20 +0000 (11:46 +0100)
commit24f028b91ed3329b259874e28b54aa715b008153
tree85a8be92fd0037f646d5ad89ca2ca0e56b2be598
parent3c8d31b8937a7ee6e5de74f0274810b8705d77ea
drm/panthor: Simplify mmu_hw_do_operation_locked

The only callers to mmu_hw_do_operation_locked() pass an 'op' of either
AS_COMAND_FLUSH_MEM or AS_COMMAND_FLUSH_PT. This means the code paths
after that are dead. Removing those paths means the
mmu_hw_do_flush_on_gpu_ctrl() function might has well be inlined.

Simplify everything by having a switch statement for the type of 'op'
(warning if we get an unexpected value) and removing the dead cases.

Suggested-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Karunika Choo <karunika.choo@arm.com>
Link: https://lore.kernel.org/r/20250815134226.57703-1-steven.price@arm.com
drivers/gpu/drm/panthor/panthor_mmu.c