![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. 0003 */ 0004 0005 #ifndef _DPU_HW_DSPP_H 0006 #define _DPU_HW_DSPP_H 0007 0008 struct dpu_hw_dspp; 0009 0010 /** 0011 * struct dpu_hw_pcc_coeff - PCC coefficient structure for each color 0012 * component. 0013 * @r: red coefficient. 0014 * @g: green coefficient. 0015 * @b: blue coefficient. 0016 */ 0017 0018 struct dpu_hw_pcc_coeff { 0019 __u32 r; 0020 __u32 g; 0021 __u32 b; 0022 }; 0023 0024 /** 0025 * struct dpu_hw_pcc - pcc feature structure 0026 * @r: red coefficients. 0027 * @g: green coefficients. 0028 * @b: blue coefficients. 0029 */ 0030 struct dpu_hw_pcc_cfg { 0031 struct dpu_hw_pcc_coeff r; 0032 struct dpu_hw_pcc_coeff g; 0033 struct dpu_hw_pcc_coeff b; 0034 }; 0035 0036 /** 0037 * struct dpu_hw_dspp_ops - interface to the dspp hardware driver functions 0038 * Caller must call the init function to get the dspp context for each dspp 0039 * Assumption is these functions will be called after clocks are enabled 0040 */ 0041 struct dpu_hw_dspp_ops { 0042 /** 0043 * setup_pcc - setup dspp pcc 0044 * @ctx: Pointer to dspp context 0045 * @cfg: Pointer to configuration 0046 */ 0047 void (*setup_pcc)(struct dpu_hw_dspp *ctx, struct dpu_hw_pcc_cfg *cfg); 0048 0049 }; 0050 0051 /** 0052 * struct dpu_hw_dspp - dspp description 0053 * @base: Hardware block base structure 0054 * @hw: Block hardware details 0055 * @idx: DSPP index 0056 * @cap: Pointer to layer_cfg 0057 * @ops: Pointer to operations possible for this DSPP 0058 */ 0059 struct dpu_hw_dspp { 0060 struct dpu_hw_blk base; 0061 struct dpu_hw_blk_reg_map hw; 0062 0063 /* dspp */ 0064 int idx; 0065 const struct dpu_dspp_cfg *cap; 0066 0067 /* Ops */ 0068 struct dpu_hw_dspp_ops ops; 0069 }; 0070 0071 /** 0072 * dpu_hw_dspp - convert base object dpu_hw_base to container 0073 * @hw: Pointer to base hardware block 0074 * return: Pointer to hardware block container 0075 */ 0076 static inline struct dpu_hw_dspp *to_dpu_hw_dspp(struct dpu_hw_blk *hw) 0077 { 0078 return container_of(hw, struct dpu_hw_dspp, base); 0079 } 0080 0081 /** 0082 * dpu_hw_dspp_init - initializes the dspp hw driver object. 0083 * should be called once before accessing every dspp. 0084 * @idx: DSPP index for which driver object is required 0085 * @addr: Mapped register io address of MDP 0086 * @Return: pointer to structure or ERR_PTR 0087 */ 0088 struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx, 0089 void __iomem *addr, const struct dpu_mdss_cfg *m); 0090 0091 /** 0092 * dpu_hw_dspp_destroy(): Destroys DSPP driver context 0093 * @dspp: Pointer to DSPP driver context 0094 */ 0095 void dpu_hw_dspp_destroy(struct dpu_hw_dspp *dspp); 0096 0097 #endif /*_DPU_HW_DSPP_H */ 0098
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |