Lines Matching refs:flow

46 	u32 flow;  member
64 struct ipu_flow flow[IPUV3_NUM_FLOWS]; member
82 struct ipu_flow *flow = to_flow(dp); in ipu_dp_set_global_alpha() local
83 struct ipu_dp_priv *priv = flow->priv; in ipu_dp_set_global_alpha()
88 reg = readl(flow->base + DP_COM_CONF); in ipu_dp_set_global_alpha()
93 writel(reg, flow->base + DP_COM_CONF); in ipu_dp_set_global_alpha()
96 reg = readl(flow->base + DP_GRAPH_WIND_CTRL) & 0x00FFFFFFL; in ipu_dp_set_global_alpha()
98 flow->base + DP_GRAPH_WIND_CTRL); in ipu_dp_set_global_alpha()
100 reg = readl(flow->base + DP_COM_CONF); in ipu_dp_set_global_alpha()
101 writel(reg | DP_COM_CONF_GWAM, flow->base + DP_COM_CONF); in ipu_dp_set_global_alpha()
103 reg = readl(flow->base + DP_COM_CONF); in ipu_dp_set_global_alpha()
104 writel(reg & ~DP_COM_CONF_GWAM, flow->base + DP_COM_CONF); in ipu_dp_set_global_alpha()
117 struct ipu_flow *flow = to_flow(dp); in ipu_dp_set_window_pos() local
118 struct ipu_dp_priv *priv = flow->priv; in ipu_dp_set_window_pos()
120 writel((x_pos << 16) | y_pos, flow->base + DP_FG_POS); in ipu_dp_set_window_pos()
128 static void ipu_dp_csc_init(struct ipu_flow *flow, in ipu_dp_csc_init() argument
137 reg = readl(flow->base + DP_COM_CONF); in ipu_dp_csc_init()
141 writel(reg, flow->base + DP_COM_CONF); in ipu_dp_csc_init()
146 writel(0x099 | (0x12d << 16), flow->base + DP_CSC_A_0); in ipu_dp_csc_init()
147 writel(0x03a | (0x3a9 << 16), flow->base + DP_CSC_A_1); in ipu_dp_csc_init()
148 writel(0x356 | (0x100 << 16), flow->base + DP_CSC_A_2); in ipu_dp_csc_init()
149 writel(0x100 | (0x329 << 16), flow->base + DP_CSC_A_3); in ipu_dp_csc_init()
151 flow->base + DP_CSC_0); in ipu_dp_csc_init()
153 flow->base + DP_CSC_1); in ipu_dp_csc_init()
156 writel(0x095 | (0x000 << 16), flow->base + DP_CSC_A_0); in ipu_dp_csc_init()
157 writel(0x0e5 | (0x095 << 16), flow->base + DP_CSC_A_1); in ipu_dp_csc_init()
158 writel(0x3e5 | (0x3bc << 16), flow->base + DP_CSC_A_2); in ipu_dp_csc_init()
159 writel(0x095 | (0x10e << 16), flow->base + DP_CSC_A_3); in ipu_dp_csc_init()
161 flow->base + DP_CSC_0); in ipu_dp_csc_init()
163 flow->base + DP_CSC_1); in ipu_dp_csc_init()
166 writel(0x095 | (0x000 << 16), flow->base + DP_CSC_A_0); in ipu_dp_csc_init()
167 writel(0x0cc | (0x095 << 16), flow->base + DP_CSC_A_1); in ipu_dp_csc_init()
168 writel(0x3ce | (0x398 << 16), flow->base + DP_CSC_A_2); in ipu_dp_csc_init()
169 writel(0x095 | (0x0ff << 16), flow->base + DP_CSC_A_3); in ipu_dp_csc_init()
171 flow->base + DP_CSC_0); in ipu_dp_csc_init()
173 flow->base + DP_CSC_1); in ipu_dp_csc_init()
178 writel(reg, flow->base + DP_COM_CONF); in ipu_dp_csc_init()
187 struct ipu_flow *flow = to_flow(dp); in ipu_dp_setup_channel() local
188 struct ipu_dp_priv *priv = flow->priv; in ipu_dp_setup_channel()
195 flow->out_cs = out; in ipu_dp_setup_channel()
197 if (flow->foreground.in_cs == flow->background.in_cs) { in ipu_dp_setup_channel()
202 ipu_dp_csc_init(flow, ycbcr_enc, range, in ipu_dp_setup_channel()
203 flow->foreground.in_cs, flow->out_cs, in ipu_dp_setup_channel()
206 if (flow->foreground.in_cs == IPUV3_COLORSPACE_UNKNOWN || in ipu_dp_setup_channel()
207 flow->foreground.in_cs == flow->out_cs) in ipu_dp_setup_channel()
212 ipu_dp_csc_init(flow, ycbcr_enc, range, in ipu_dp_setup_channel()
213 flow->background.in_cs, in ipu_dp_setup_channel()
214 flow->out_cs, DP_COM_CONF_CSC_DEF_BG); in ipu_dp_setup_channel()
216 ipu_dp_csc_init(flow, ycbcr_enc, range, in ipu_dp_setup_channel()
217 flow->foreground.in_cs, in ipu_dp_setup_channel()
218 flow->out_cs, DP_COM_CONF_CSC_DEF_FG); in ipu_dp_setup_channel()
248 struct ipu_flow *flow = to_flow(dp); in ipu_dp_enable_channel() local
249 struct ipu_dp_priv *priv = flow->priv; in ipu_dp_enable_channel()
257 reg = readl(flow->base + DP_COM_CONF); in ipu_dp_enable_channel()
259 writel(reg, flow->base + DP_COM_CONF); in ipu_dp_enable_channel()
271 struct ipu_flow *flow = to_flow(dp); in ipu_dp_disable_channel() local
272 struct ipu_dp_priv *priv = flow->priv; in ipu_dp_disable_channel()
282 reg = readl(flow->base + DP_COM_CONF); in ipu_dp_disable_channel()
289 writel(reg, flow->base + DP_COM_CONF); in ipu_dp_disable_channel()
291 writel(0, flow->base + DP_FG_POS); in ipu_dp_disable_channel()
316 struct ipu_dp *ipu_dp_get(struct ipu_soc *ipu, unsigned int flow) in ipu_dp_get() argument
321 if ((flow >> 1) >= IPUV3_NUM_FLOWS) in ipu_dp_get()
324 if (flow & 1) in ipu_dp_get()
325 dp = &priv->flow[flow >> 1].foreground; in ipu_dp_get()
327 dp = &priv->flow[flow >> 1].background; in ipu_dp_get()
364 priv->flow[i].background.in_cs = IPUV3_COLORSPACE_UNKNOWN; in ipu_dp_init()
365 priv->flow[i].foreground.in_cs = IPUV3_COLORSPACE_UNKNOWN; in ipu_dp_init()
366 priv->flow[i].foreground.foreground = true; in ipu_dp_init()
367 priv->flow[i].base = priv->base + ipu_dp_flow_base[i]; in ipu_dp_init()
368 priv->flow[i].priv = priv; in ipu_dp_init()