![]() |
|
|||
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_MERGE3D_H 0006 #define _DPU_HW_MERGE3D_H 0007 0008 #include "dpu_hw_catalog.h" 0009 #include "dpu_hw_mdss.h" 0010 #include "dpu_hw_util.h" 0011 0012 struct dpu_hw_merge_3d; 0013 0014 /** 0015 * 0016 * struct dpu_hw_merge_3d_ops : Interface to the merge_3d Hw driver functions 0017 * Assumption is these functions will be called after clocks are enabled 0018 * @setup_3d_mode : enable 3D merge 0019 */ 0020 struct dpu_hw_merge_3d_ops { 0021 void (*setup_3d_mode)(struct dpu_hw_merge_3d *merge_3d, 0022 enum dpu_3d_blend_mode mode_3d); 0023 0024 }; 0025 0026 struct dpu_hw_merge_3d { 0027 struct dpu_hw_blk base; 0028 struct dpu_hw_blk_reg_map hw; 0029 0030 /* merge_3d */ 0031 enum dpu_merge_3d idx; 0032 const struct dpu_merge_3d_cfg *caps; 0033 0034 /* ops */ 0035 struct dpu_hw_merge_3d_ops ops; 0036 }; 0037 0038 /** 0039 * to_dpu_hw_merge_3d - convert base object dpu_hw_base to container 0040 * @hw: Pointer to base hardware block 0041 * return: Pointer to hardware block container 0042 */ 0043 static inline struct dpu_hw_merge_3d *to_dpu_hw_merge_3d(struct dpu_hw_blk *hw) 0044 { 0045 return container_of(hw, struct dpu_hw_merge_3d, base); 0046 } 0047 0048 /** 0049 * dpu_hw_merge_3d_init - initializes the merge_3d driver for the passed 0050 * merge_3d idx. 0051 * @idx: Pingpong index for which driver object is required 0052 * @addr: Mapped register io address of MDP 0053 * @m: Pointer to mdss catalog data 0054 * Returns: Error code or allocated dpu_hw_merge_3d context 0055 */ 0056 struct dpu_hw_merge_3d *dpu_hw_merge_3d_init(enum dpu_merge_3d idx, 0057 void __iomem *addr, 0058 const struct dpu_mdss_cfg *m); 0059 0060 /** 0061 * dpu_hw_merge_3d_destroy - destroys merge_3d driver context 0062 * should be called to free the context 0063 * @pp: Pointer to PP driver context returned by dpu_hw_merge_3d_init 0064 */ 0065 void dpu_hw_merge_3d_destroy(struct dpu_hw_merge_3d *pp); 0066 0067 #endif /*_DPU_HW_MERGE3D_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |