Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.17 101 lines 2.4 kB view raw
1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * Copyright 2024 NXP 4 */ 5 6#ifndef __DC_PIXEL_ENGINE_H__ 7#define __DC_PIXEL_ENGINE_H__ 8 9#include <linux/clk.h> 10#include <linux/device.h> 11#include <linux/regmap.h> 12 13#include "dc-de.h" 14 15#define SHDEN BIT(0) 16 17#define CLKEN_MASK_SHIFT 24 18#define CLKEN_MASK (0x3 << CLKEN_MASK_SHIFT) 19#define CLKEN(n) ((n) << CLKEN_MASK_SHIFT) 20 21#define DC_DISP_FU_CNT 2 22#define DC_LB_CNT 4 23 24enum dc_link_id { 25 LINK_ID_NONE = 0x00, 26 LINK_ID_CONSTFRAME0 = 0x0c, 27 LINK_ID_CONSTFRAME4 = 0x0e, 28 LINK_ID_CONSTFRAME1 = 0x10, 29 LINK_ID_CONSTFRAME5 = 0x12, 30 LINK_ID_FETCHWARP2 = 0x14, 31 LINK_ID_FETCHLAYER0 = 0x1a, 32 LINK_ID_LAYERBLEND0 = 0x21, 33 LINK_ID_LAYERBLEND1 = 0x22, 34 LINK_ID_LAYERBLEND2 = 0x23, 35 LINK_ID_LAYERBLEND3 = 0x24, 36}; 37 38enum dc_lb_mode { 39 LB_NEUTRAL, /* Output is same as primary input. */ 40 LB_BLEND, 41}; 42 43enum dc_pec_clken { 44 CLKEN_DISABLE, 45 CLKEN_AUTOMATIC, 46}; 47 48struct dc_cf { 49 struct regmap *reg_cfg; 50 enum dc_link_id link; 51}; 52 53struct dc_ed { 54 struct device *dev; 55 struct regmap *reg_pec; 56 struct regmap *reg_cfg; 57 int irq_shdload; 58}; 59 60struct dc_lb { 61 struct device *dev; 62 struct regmap *reg_pec; 63 struct regmap *reg_cfg; 64 int id; 65 enum dc_link_id link; 66}; 67 68struct dc_pe { 69 struct device *dev; 70 struct clk *clk_axi; 71 struct dc_cf *cf_safe[DC_DISPLAYS]; 72 struct dc_cf *cf_cont[DC_DISPLAYS]; 73 struct dc_ed *ed_safe[DC_DISPLAYS]; 74 struct dc_ed *ed_cont[DC_DISPLAYS]; 75 struct dc_fu *fu_disp[DC_DISP_FU_CNT]; 76 struct dc_lb *lb[DC_LB_CNT]; 77}; 78 79/* Constant Frame Unit */ 80enum dc_link_id dc_cf_get_link_id(struct dc_cf *cf); 81void dc_cf_framedimensions(struct dc_cf *cf, unsigned int w, unsigned int h); 82void dc_cf_constantcolor_black(struct dc_cf *cf); 83void dc_cf_constantcolor_blue(struct dc_cf *cf); 84void dc_cf_init(struct dc_cf *cf); 85 86/* External Destination Unit */ 87void dc_ed_pec_src_sel(struct dc_ed *ed, enum dc_link_id src); 88void dc_ed_pec_sync_trigger(struct dc_ed *ed); 89void dc_ed_init(struct dc_ed *ed); 90 91/* Layer Blend Unit */ 92enum dc_link_id dc_lb_get_link_id(struct dc_lb *lb); 93void dc_lb_pec_dynamic_prim_sel(struct dc_lb *lb, enum dc_link_id prim); 94void dc_lb_pec_dynamic_sec_sel(struct dc_lb *lb, enum dc_link_id sec); 95void dc_lb_pec_clken(struct dc_lb *lb, enum dc_pec_clken clken); 96void dc_lb_mode(struct dc_lb *lb, enum dc_lb_mode mode); 97void dc_lb_position(struct dc_lb *lb, int x, int y); 98int dc_lb_get_id(struct dc_lb *lb); 99void dc_lb_init(struct dc_lb *lb); 100 101#endif /* __DC_PIXEL_ENGINE_H__ */