FILE
panthor_gpu.h
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/panthor/panthor_gpu.h
1/* SPDX-License-Identifier: GPL-2.0 or MIT */ 2/* Copyright 2018 Marty E. Plummer <hanetzer@startmail.com> */ 3/* Copyright 2019 Collabora ltd. */ 4 5#ifndef __PANTHOR_GPU_H__ 6#define __PANTHOR_GPU_H__ 7 8#include <linux/types.h> 9 10struct panthor_device; 11 12int panthor_gpu_init(struct panthor_device *ptdev); 13void panthor_gpu_unplug(struct panthor_device *ptdev); 14void panthor_gpu_suspend(struct panthor_device *ptdev); 15void panthor_gpu_resume(struct panthor_device *ptdev); 16 17int panthor_gpu_block_power_on(struct panthor_device *ptdev, 18 const char *blk_name, 19 u32 pwron_reg, u32 pwrtrans_reg, 20 u32 rdy_reg, u64 mask, u32 timeout_us); 21int panthor_gpu_block_power_off(struct panthor_device *ptdev, 22 const char *blk_name, 23 u32 pwroff_reg, u32 pwrtrans_reg, 24 u64 mask, u32 timeout_us); 25 26/** 27 * panthor_gpu_power_on() - Power on the GPU block. 28 * 29 * Return: 0 on success, a negative error code otherwise. 30 */ 31#define panthor_gpu_power_on(ptdev, type, mask, timeout_us) \ 32 panthor_gpu_block_power_on(ptdev, #type, \ 33 type ## _PWRON, \ 34 type ## _PWRTRANS, \ 35 type ## _READY, \ 36 mask, timeout_us) 37 38/** 39 * panthor_gpu_power_off() - Power off the GPU block. 40 * 41 * Return: 0 on success, a negative error code otherwise. 42 */ 43#define panthor_gpu_power_off(ptdev, type, mask, timeout_us) \ 44 panthor_gpu_block_power_off(ptdev, #type, \ 45 type ## _PWROFF, \ 46 type ## _PWRTRANS, \ 47 mask, timeout_us) 48 49void panthor_gpu_l2_power_off(struct panthor_device *ptdev); 50int panthor_gpu_l2_power_on(struct panthor_device *ptdev); 51int panthor_gpu_flush_caches(struct panthor_device *ptdev, 52 u32 l2, u32 lsc, u32 other); 53int panthor_gpu_soft_reset(struct panthor_device *ptdev); 54 55#endif
~/
Read-only file preview.