]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h
1934c2f7e8fa684ca7ad0bf5740823c5b7e381c1
1 /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
16 #include <linux/types.h>
17 #include <linux/list.h>
18 #include <linux/atomic.h>
23 * struct dpu_hw_blk_ops - common hardware block operations
24 * @start: start operation on first get
25 * @stop: stop operation on last put
27 struct dpu_hw_blk_ops
{
28 int (*start
)(struct dpu_hw_blk
*);
29 void (*stop
)(struct dpu_hw_blk
*);
33 * struct dpu_hw_blk - definition of hardware block object
34 * @list: list of hardware blocks
35 * @type: hardware block type
37 * @refcount: reference/usage count
40 struct list_head list
;
44 struct dpu_hw_blk_ops ops
;
47 void dpu_hw_blk_init(struct dpu_hw_blk
*hw_blk
, u32 type
, int id
,
48 struct dpu_hw_blk_ops
*ops
);
49 void dpu_hw_blk_destroy(struct dpu_hw_blk
*hw_blk
);
51 struct dpu_hw_blk
*dpu_hw_blk_get(struct dpu_hw_blk
*hw_blk
, u32 type
, int id
);
52 void dpu_hw_blk_put(struct dpu_hw_blk
*hw_blk
);
53 #endif /*_DPU_HW_BLK_H */