1 // SPDX-License-Identifier: GPL-2.0+
3 * vsp1_pipe.c -- R-Car VSP1 Pipeline
5 * Copyright (C) 2013-2015 Renesas Electronics Corporation
7 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
10 #include <linux/delay.h>
11 #include <linux/list.h>
12 #include <linux/sched.h>
13 #include <linux/wait.h>
15 #include <media/media-entity.h>
16 #include <media/v4l2-subdev.h>
21 #include "vsp1_entity.h"
24 #include "vsp1_pipe.h"
25 #include "vsp1_rwpf.h"
28 /* -----------------------------------------------------------------------------
32 static const struct vsp1_format_info vsp1_video_formats[] = {
33 { V4L2_PIX_FMT_RGB332, MEDIA_BUS_FMT_ARGB8888_1X32,
34 VI6_FMT_RGB_332, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
35 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
36 1, { 8, 0, 0 }, false, false, 1, 1, false },
37 { V4L2_PIX_FMT_ARGB444, MEDIA_BUS_FMT_ARGB8888_1X32,
38 VI6_FMT_ARGB_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
40 1, { 16, 0, 0 }, false, false, 1, 1, true },
41 { V4L2_PIX_FMT_XRGB444, MEDIA_BUS_FMT_ARGB8888_1X32,
42 VI6_FMT_XRGB_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
44 1, { 16, 0, 0 }, false, false, 1, 1, false },
45 { V4L2_PIX_FMT_RGBA444, MEDIA_BUS_FMT_ARGB8888_1X32,
46 VI6_FMT_RGBA_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
48 1, { 16, 0, 0 }, false, false, 1, 1, true },
49 { V4L2_PIX_FMT_RGBX444, MEDIA_BUS_FMT_ARGB8888_1X32,
50 VI6_FMT_RGBX_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
52 1, { 16, 0, 0 }, false, false, 1, 1, false },
53 { V4L2_PIX_FMT_ABGR444, MEDIA_BUS_FMT_ARGB8888_1X32,
54 VI6_FMT_ABGR_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
56 1, { 16, 0, 0 }, false, false, 1, 1, true },
57 { V4L2_PIX_FMT_XBGR444, MEDIA_BUS_FMT_ARGB8888_1X32,
58 VI6_FMT_ABGR_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
60 1, { 16, 0, 0 }, false, false, 1, 1, false },
61 { V4L2_PIX_FMT_BGRA444, MEDIA_BUS_FMT_ARGB8888_1X32,
62 VI6_FMT_BGRA_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
64 1, { 16, 0, 0 }, false, false, 1, 1, true },
65 { V4L2_PIX_FMT_BGRX444, MEDIA_BUS_FMT_ARGB8888_1X32,
66 VI6_FMT_BGRA_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
68 1, { 16, 0, 0 }, false, false, 1, 1, false },
69 { V4L2_PIX_FMT_ARGB555, MEDIA_BUS_FMT_ARGB8888_1X32,
70 VI6_FMT_ARGB_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
72 1, { 16, 0, 0 }, false, false, 1, 1, true },
73 { V4L2_PIX_FMT_XRGB555, MEDIA_BUS_FMT_ARGB8888_1X32,
74 VI6_FMT_XRGB_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
76 1, { 16, 0, 0 }, false, false, 1, 1, false },
77 { V4L2_PIX_FMT_RGBA555, MEDIA_BUS_FMT_ARGB8888_1X32,
78 VI6_FMT_RGBA_5551, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
80 1, { 16, 0, 0 }, false, false, 1, 1, true },
81 { V4L2_PIX_FMT_RGBX555, MEDIA_BUS_FMT_ARGB8888_1X32,
82 VI6_FMT_RGBX_5551, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
84 1, { 16, 0, 0 }, false, false, 1, 1, false },
85 { V4L2_PIX_FMT_ABGR555, MEDIA_BUS_FMT_ARGB8888_1X32,
86 VI6_FMT_ABGR_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
88 1, { 16, 0, 0 }, false, false, 1, 1, true },
89 { V4L2_PIX_FMT_XBGR555, MEDIA_BUS_FMT_ARGB8888_1X32,
90 VI6_FMT_ABGR_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
92 1, { 16, 0, 0 }, false, false, 1, 1, false },
93 { V4L2_PIX_FMT_BGRA555, MEDIA_BUS_FMT_ARGB8888_1X32,
94 VI6_FMT_BGRA_5551, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
96 1, { 16, 0, 0 }, false, false, 1, 1, true },
97 { V4L2_PIX_FMT_BGRX555, MEDIA_BUS_FMT_ARGB8888_1X32,
98 VI6_FMT_BGRA_5551, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
100 1, { 16, 0, 0 }, false, false, 1, 1, false },
101 { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_ARGB8888_1X32,
102 VI6_FMT_RGB_565, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
104 1, { 16, 0, 0 }, false, false, 1, 1, false },
105 { V4L2_PIX_FMT_BGR24, MEDIA_BUS_FMT_ARGB8888_1X32,
106 VI6_FMT_BGR_888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
107 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
108 1, { 24, 0, 0 }, false, false, 1, 1, false },
109 { V4L2_PIX_FMT_RGB24, MEDIA_BUS_FMT_ARGB8888_1X32,
110 VI6_FMT_RGB_888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
111 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
112 1, { 24, 0, 0 }, false, false, 1, 1, false },
113 { V4L2_PIX_FMT_ABGR32, MEDIA_BUS_FMT_ARGB8888_1X32,
114 VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
115 1, { 32, 0, 0 }, false, false, 1, 1, true },
116 { V4L2_PIX_FMT_XBGR32, MEDIA_BUS_FMT_ARGB8888_1X32,
117 VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
118 1, { 32, 0, 0 }, false, false, 1, 1, false },
119 { V4L2_PIX_FMT_BGRA32, MEDIA_BUS_FMT_ARGB8888_1X32,
120 VI6_FMT_RGBA_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
121 1, { 32, 0, 0 }, false, false, 1, 1, true },
122 { V4L2_PIX_FMT_BGRX32, MEDIA_BUS_FMT_ARGB8888_1X32,
123 VI6_FMT_RGBA_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
124 1, { 32, 0, 0 }, false, false, 1, 1, false },
125 { V4L2_PIX_FMT_RGBA32, MEDIA_BUS_FMT_ARGB8888_1X32,
126 VI6_FMT_RGBA_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
127 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
128 1, { 32, 0, 0 }, false, false, 1, 1, true },
129 { V4L2_PIX_FMT_RGBX32, MEDIA_BUS_FMT_ARGB8888_1X32,
130 VI6_FMT_RGBA_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
131 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
132 1, { 32, 0, 0 }, false, false, 1, 1, false },
133 { V4L2_PIX_FMT_ARGB32, MEDIA_BUS_FMT_ARGB8888_1X32,
134 VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
135 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
136 1, { 32, 0, 0 }, false, false, 1, 1, true },
137 { V4L2_PIX_FMT_XRGB32, MEDIA_BUS_FMT_ARGB8888_1X32,
138 VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
139 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
140 1, { 32, 0, 0 }, false, false, 1, 1, false },
141 { V4L2_PIX_FMT_HSV24, MEDIA_BUS_FMT_AHSV8888_1X32,
142 VI6_FMT_RGB_888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
143 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
144 1, { 24, 0, 0 }, false, false, 1, 1, false },
145 { V4L2_PIX_FMT_HSV32, MEDIA_BUS_FMT_AHSV8888_1X32,
146 VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
147 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
148 1, { 32, 0, 0 }, false, false, 1, 1, false },
149 { V4L2_PIX_FMT_RGBX1010102, MEDIA_BUS_FMT_ARGB8888_1X32,
150 VI6_FMT_RGB10_RGB10A2_A2RGB10,
151 VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
152 1, { 32, 0, 0 }, false, false, 1, 1, false },
153 { V4L2_PIX_FMT_RGBA1010102, MEDIA_BUS_FMT_ARGB8888_1X32,
154 VI6_FMT_RGB10_RGB10A2_A2RGB10,
155 VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
156 1, { 32, 0, 0 }, false, false, 1, 1, false },
157 { V4L2_PIX_FMT_ARGB2101010, MEDIA_BUS_FMT_ARGB8888_1X32,
158 VI6_FMT_RGB10_RGB10A2_A2RGB10,
159 VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
160 1, { 32, 0, 0 }, false, false, 1, 1, false },
161 { V4L2_PIX_FMT_UYVY, MEDIA_BUS_FMT_AYUV8_1X32,
162 VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
163 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
164 1, { 16, 0, 0 }, false, false, 2, 1, false },
165 { V4L2_PIX_FMT_VYUY, MEDIA_BUS_FMT_AYUV8_1X32,
166 VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
167 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
168 1, { 16, 0, 0 }, false, true, 2, 1, false },
169 { V4L2_PIX_FMT_YUYV, MEDIA_BUS_FMT_AYUV8_1X32,
170 VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
171 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
172 1, { 16, 0, 0 }, true, false, 2, 1, false },
173 { V4L2_PIX_FMT_YVYU, MEDIA_BUS_FMT_AYUV8_1X32,
174 VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
175 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
176 1, { 16, 0, 0 }, true, true, 2, 1, false },
177 { V4L2_PIX_FMT_NV12M, MEDIA_BUS_FMT_AYUV8_1X32,
178 VI6_FMT_Y_UV_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
179 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
180 2, { 8, 16, 0 }, false, false, 2, 2, false },
181 { V4L2_PIX_FMT_NV21M, MEDIA_BUS_FMT_AYUV8_1X32,
182 VI6_FMT_Y_UV_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
183 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
184 2, { 8, 16, 0 }, false, true, 2, 2, false },
185 { V4L2_PIX_FMT_NV16M, MEDIA_BUS_FMT_AYUV8_1X32,
186 VI6_FMT_Y_UV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
187 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
188 2, { 8, 16, 0 }, false, false, 2, 1, false },
189 { V4L2_PIX_FMT_NV61M, MEDIA_BUS_FMT_AYUV8_1X32,
190 VI6_FMT_Y_UV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
191 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
192 2, { 8, 16, 0 }, false, true, 2, 1, false },
193 { V4L2_PIX_FMT_YUV420M, MEDIA_BUS_FMT_AYUV8_1X32,
194 VI6_FMT_Y_U_V_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
195 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
196 3, { 8, 8, 8 }, false, false, 2, 2, false },
197 { V4L2_PIX_FMT_YVU420M, MEDIA_BUS_FMT_AYUV8_1X32,
198 VI6_FMT_Y_U_V_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
199 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
200 3, { 8, 8, 8 }, false, true, 2, 2, false },
201 { V4L2_PIX_FMT_YUV422M, MEDIA_BUS_FMT_AYUV8_1X32,
202 VI6_FMT_Y_U_V_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
203 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
204 3, { 8, 8, 8 }, false, false, 2, 1, false },
205 { V4L2_PIX_FMT_YVU422M, MEDIA_BUS_FMT_AYUV8_1X32,
206 VI6_FMT_Y_U_V_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
207 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
208 3, { 8, 8, 8 }, false, true, 2, 1, false },
209 { V4L2_PIX_FMT_YUV444M, MEDIA_BUS_FMT_AYUV8_1X32,
210 VI6_FMT_Y_U_V_444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
211 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
212 3, { 8, 8, 8 }, false, false, 1, 1, false },
213 { V4L2_PIX_FMT_YVU444M, MEDIA_BUS_FMT_AYUV8_1X32,
214 VI6_FMT_Y_U_V_444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
215 VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
216 3, { 8, 8, 8 }, false, true, 1, 1, false },
217 { V4L2_PIX_FMT_Y210, MEDIA_BUS_FMT_AYUV8_1X32,
218 VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
219 1, { 32, 0, 0 }, false, false, 2, 1, false },
220 { V4L2_PIX_FMT_Y212, MEDIA_BUS_FMT_AYUV8_1X32,
221 VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
222 1, { 32, 0, 0 }, false, false, 2, 1, false },
226 * vsp1_get_format_info - Retrieve format information for a 4CC
227 * @vsp1: the VSP1 device
228 * @fourcc: the format 4CC
230 * Return a pointer to the format information structure corresponding to the
231 * given V4L2 format 4CC, or NULL if no corresponding format can be found.
233 const struct vsp1_format_info *vsp1_get_format_info(struct vsp1_device *vsp1,
238 /* Special case, the VYUY and HSV formats are supported on Gen2 only. */
239 if (vsp1->info->gen != 2) {
241 case V4L2_PIX_FMT_VYUY:
242 case V4L2_PIX_FMT_HSV24:
243 case V4L2_PIX_FMT_HSV32:
248 for (i = 0; i < ARRAY_SIZE(vsp1_video_formats); ++i) {
249 const struct vsp1_format_info *info = &vsp1_video_formats[i];
251 if (info->fourcc == fourcc)
258 /* -----------------------------------------------------------------------------
259 * Pipeline Management
262 void vsp1_pipeline_reset(struct vsp1_pipeline *pipe)
264 struct vsp1_entity *entity;
268 struct vsp1_brx *brx = to_brx(&pipe->brx->subdev);
270 for (i = 0; i < ARRAY_SIZE(brx->inputs); ++i)
271 brx->inputs[i].rpf = NULL;
274 for (i = 0; i < ARRAY_SIZE(pipe->inputs); ++i)
275 pipe->inputs[i] = NULL;
279 list_for_each_entry(entity, &pipe->entities, list_pipe)
282 INIT_LIST_HEAD(&pipe->entities);
283 pipe->state = VSP1_PIPELINE_STOPPED;
284 pipe->buffers_ready = 0;
285 pipe->num_inputs = 0;
293 void vsp1_pipeline_init(struct vsp1_pipeline *pipe)
295 mutex_init(&pipe->lock);
296 spin_lock_init(&pipe->irqlock);
297 init_waitqueue_head(&pipe->wq);
298 kref_init(&pipe->kref);
300 INIT_LIST_HEAD(&pipe->entities);
301 pipe->state = VSP1_PIPELINE_STOPPED;
304 /* Must be called with the pipe irqlock held. */
305 void vsp1_pipeline_run(struct vsp1_pipeline *pipe)
307 struct vsp1_device *vsp1 = pipe->output->entity.vsp1;
309 if (pipe->state == VSP1_PIPELINE_STOPPED) {
310 vsp1_write(vsp1, VI6_CMD(pipe->output->entity.index),
312 pipe->state = VSP1_PIPELINE_RUNNING;
315 pipe->buffers_ready = 0;
318 bool vsp1_pipeline_stopped(struct vsp1_pipeline *pipe)
323 spin_lock_irqsave(&pipe->irqlock, flags);
324 stopped = pipe->state == VSP1_PIPELINE_STOPPED;
325 spin_unlock_irqrestore(&pipe->irqlock, flags);
330 int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
332 struct vsp1_device *vsp1 = pipe->output->entity.vsp1;
333 struct vsp1_entity *entity;
339 * When using display lists in continuous frame mode the only
340 * way to stop the pipeline is to reset the hardware.
342 ret = vsp1_reset_wpf(vsp1, pipe->output->entity.index);
344 spin_lock_irqsave(&pipe->irqlock, flags);
345 pipe->state = VSP1_PIPELINE_STOPPED;
346 spin_unlock_irqrestore(&pipe->irqlock, flags);
349 /* Otherwise just request a stop and wait. */
350 spin_lock_irqsave(&pipe->irqlock, flags);
351 if (pipe->state == VSP1_PIPELINE_RUNNING)
352 pipe->state = VSP1_PIPELINE_STOPPING;
353 spin_unlock_irqrestore(&pipe->irqlock, flags);
355 ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
356 msecs_to_jiffies(500));
357 ret = ret == 0 ? -ETIMEDOUT : 0;
360 list_for_each_entry(entity, &pipe->entities, list_pipe) {
361 if (entity->route && entity->route->reg)
362 vsp1_write(vsp1, entity->route->reg,
363 VI6_DPR_NODE_UNUSED);
367 vsp1_write(vsp1, VI6_DPR_HGO_SMPPT,
368 (7 << VI6_DPR_SMPPT_TGW_SHIFT) |
369 (VI6_DPR_NODE_UNUSED << VI6_DPR_SMPPT_PT_SHIFT));
372 vsp1_write(vsp1, VI6_DPR_HGT_SMPPT,
373 (7 << VI6_DPR_SMPPT_TGW_SHIFT) |
374 (VI6_DPR_NODE_UNUSED << VI6_DPR_SMPPT_PT_SHIFT));
376 v4l2_subdev_call(&pipe->output->entity.subdev, video, s_stream, 0);
381 bool vsp1_pipeline_ready(struct vsp1_pipeline *pipe)
385 mask = ((1 << pipe->num_inputs) - 1) << 1;
389 return pipe->buffers_ready == mask;
392 void vsp1_pipeline_frame_end(struct vsp1_pipeline *pipe)
400 * If the DL commit raced with the frame end interrupt, the commit ends
401 * up being postponed by one frame. The returned flags tell whether the
402 * active frame was finished or postponed.
404 flags = vsp1_dlm_irq_frame_end(pipe->output->dlm);
407 vsp1_hgo_frame_end(pipe->hgo);
410 vsp1_hgt_frame_end(pipe->hgt);
413 * Regardless of frame completion we still need to notify the pipe
414 * frame_end to account for vblank events.
417 pipe->frame_end(pipe, flags);
423 * Propagate the alpha value through the pipeline.
425 * As the UDS has restricted scaling capabilities when the alpha component needs
426 * to be scaled, we disable alpha scaling when the UDS input has a fixed alpha
427 * value. The UDS then outputs a fixed alpha value which needs to be programmed
428 * from the input RPF alpha.
430 void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
431 struct vsp1_dl_body *dlb, unsigned int alpha)
437 * The BRU and BRS background color has a fixed alpha value set to 255,
438 * the output alpha value is thus always equal to 255.
440 if (pipe->uds_input->type == VSP1_ENTITY_BRU ||
441 pipe->uds_input->type == VSP1_ENTITY_BRS)
444 vsp1_uds_set_alpha(pipe->uds, dlb, alpha);
448 * Propagate the partition calculations through the pipeline
450 * Work backwards through the pipe, allowing each entity to update the partition
451 * parameters based on its configuration, and the entity connected to its
452 * source. Each entity must produce the partition required for the previous
453 * entity in the pipeline.
455 void vsp1_pipeline_propagate_partition(struct vsp1_pipeline *pipe,
456 struct vsp1_partition *partition,
458 struct vsp1_partition_window *window)
460 struct vsp1_entity *entity;
462 list_for_each_entry_reverse(entity, &pipe->entities, list_pipe) {
463 if (entity->ops->partition)
464 entity->ops->partition(entity, pipe, partition, index,