aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2016-02-24 17:10:04 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-06-17 07:13:10 -0400
commit44f4619857766289c99e5d61a87ba1621e8ddef6 (patch)
treee54e29664504d02ee3159bb641b7fa4ef129a91e
parent94fcdf829793b141dc93e20a2bbd9eeaa44ea25f (diff)
[media] v4l: vsp1: Add output node value to routing table
The output node value indicates the value to be used in a sampling point register to use the node as the source of histogram data. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/platform/vsp1/vsp1_entity.c52
-rw-r--r--drivers/media/platform/vsp1/vsp1_entity.h6
2 files changed, 39 insertions, 19 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
index 3d070bcc6053..6a96ea77de69 100644
--- a/drivers/media/platform/vsp1/vsp1_entity.c
+++ b/drivers/media/platform/vsp1/vsp1_entity.c
@@ -274,28 +274,44 @@ int vsp1_entity_link_setup(struct media_entity *entity,
274 * Initialization 274 * Initialization
275 */ 275 */
276 276
277#define VSP1_ENTITY_ROUTE(ent) \
278 { VSP1_ENTITY_##ent, 0, VI6_DPR_##ent##_ROUTE, \
279 { VI6_DPR_NODE_##ent }, VI6_DPR_NODE_##ent }
280
281#define VSP1_ENTITY_ROUTE_RPF(idx) \
282 { VSP1_ENTITY_RPF, idx, VI6_DPR_RPF_ROUTE(idx), \
283 { 0, }, VI6_DPR_NODE_RPF(idx) }
284
285#define VSP1_ENTITY_ROUTE_UDS(idx) \
286 { VSP1_ENTITY_UDS, idx, VI6_DPR_UDS_ROUTE(idx), \
287 { VI6_DPR_NODE_UDS(idx) }, VI6_DPR_NODE_UDS(idx) }
288
289#define VSP1_ENTITY_ROUTE_WPF(idx) \
290 { VSP1_ENTITY_WPF, idx, 0, \
291 { VI6_DPR_NODE_WPF(idx) }, VI6_DPR_NODE_WPF(idx) }
292
277static const struct vsp1_route vsp1_routes[] = { 293static const struct vsp1_route vsp1_routes[] = {
278 { VSP1_ENTITY_BRU, 0, VI6_DPR_BRU_ROUTE, 294 { VSP1_ENTITY_BRU, 0, VI6_DPR_BRU_ROUTE,
279 { VI6_DPR_NODE_BRU_IN(0), VI6_DPR_NODE_BRU_IN(1), 295 { VI6_DPR_NODE_BRU_IN(0), VI6_DPR_NODE_BRU_IN(1),
280 VI6_DPR_NODE_BRU_IN(2), VI6_DPR_NODE_BRU_IN(3), 296 VI6_DPR_NODE_BRU_IN(2), VI6_DPR_NODE_BRU_IN(3),
281 VI6_DPR_NODE_BRU_IN(4) } }, 297 VI6_DPR_NODE_BRU_IN(4) }, VI6_DPR_NODE_BRU_OUT },
282 { VSP1_ENTITY_HSI, 0, VI6_DPR_HSI_ROUTE, { VI6_DPR_NODE_HSI, } }, 298 VSP1_ENTITY_ROUTE(HSI),
283 { VSP1_ENTITY_HST, 0, VI6_DPR_HST_ROUTE, { VI6_DPR_NODE_HST, } }, 299 VSP1_ENTITY_ROUTE(HST),
284 { VSP1_ENTITY_LIF, 0, 0, { VI6_DPR_NODE_LIF, } }, 300 { VSP1_ENTITY_LIF, 0, 0, { VI6_DPR_NODE_LIF, }, VI6_DPR_NODE_LIF },
285 { VSP1_ENTITY_LUT, 0, VI6_DPR_LUT_ROUTE, { VI6_DPR_NODE_LUT, } }, 301 VSP1_ENTITY_ROUTE(LUT),
286 { VSP1_ENTITY_RPF, 0, VI6_DPR_RPF_ROUTE(0), { 0, } }, 302 VSP1_ENTITY_ROUTE_RPF(0),
287 { VSP1_ENTITY_RPF, 1, VI6_DPR_RPF_ROUTE(1), { 0, } }, 303 VSP1_ENTITY_ROUTE_RPF(1),
288 { VSP1_ENTITY_RPF, 2, VI6_DPR_RPF_ROUTE(2), { 0, } }, 304 VSP1_ENTITY_ROUTE_RPF(2),
289 { VSP1_ENTITY_RPF, 3, VI6_DPR_RPF_ROUTE(3), { 0, } }, 305 VSP1_ENTITY_ROUTE_RPF(3),
290 { VSP1_ENTITY_RPF, 4, VI6_DPR_RPF_ROUTE(4), { 0, } }, 306 VSP1_ENTITY_ROUTE_RPF(4),
291 { VSP1_ENTITY_SRU, 0, VI6_DPR_SRU_ROUTE, { VI6_DPR_NODE_SRU, } }, 307 VSP1_ENTITY_ROUTE(SRU),
292 { VSP1_ENTITY_UDS, 0, VI6_DPR_UDS_ROUTE(0), { VI6_DPR_NODE_UDS(0), } }, 308 VSP1_ENTITY_ROUTE_UDS(0),
293 { VSP1_ENTITY_UDS, 1, VI6_DPR_UDS_ROUTE(1), { VI6_DPR_NODE_UDS(1), } }, 309 VSP1_ENTITY_ROUTE_UDS(1),
294 { VSP1_ENTITY_UDS, 2, VI6_DPR_UDS_ROUTE(2), { VI6_DPR_NODE_UDS(2), } }, 310 VSP1_ENTITY_ROUTE_UDS(2),
295 { VSP1_ENTITY_WPF, 0, 0, { VI6_DPR_NODE_WPF(0), } }, 311 VSP1_ENTITY_ROUTE_WPF(0),
296 { VSP1_ENTITY_WPF, 1, 0, { VI6_DPR_NODE_WPF(1), } }, 312 VSP1_ENTITY_ROUTE_WPF(1),
297 { VSP1_ENTITY_WPF, 2, 0, { VI6_DPR_NODE_WPF(2), } }, 313 VSP1_ENTITY_ROUTE_WPF(2),
298 { VSP1_ENTITY_WPF, 3, 0, { VI6_DPR_NODE_WPF(3), } }, 314 VSP1_ENTITY_ROUTE_WPF(3),
299}; 315};
300 316
301int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity, 317int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
index 69eff4e17350..aaab05f4952c 100644
--- a/drivers/media/platform/vsp1/vsp1_entity.h
+++ b/drivers/media/platform/vsp1/vsp1_entity.h
@@ -42,17 +42,21 @@ enum vsp1_entity_type {
42 * @index: Entity index this routing entry is associated with 42 * @index: Entity index this routing entry is associated with
43 * @reg: Output routing configuration register 43 * @reg: Output routing configuration register
44 * @inputs: Target node value for each input 44 * @inputs: Target node value for each input
45 * @output: Target node value for entity output
45 * 46 *
46 * Each $vsp1_route entry describes routing configuration for the entity 47 * Each $vsp1_route entry describes routing configuration for the entity
47 * specified by the entry's @type and @index. @reg indicates the register that 48 * specified by the entry's @type and @index. @reg indicates the register that
48 * holds output routing configuration for the entity, and the @inputs array 49 * holds output routing configuration for the entity, and the @inputs array
49 * store the target node value for each input of the entity. 50 * store the target node value for each input of the entity. The @output field
51 * stores the target node value of the entity output when used as a source for
52 * histogram generation.
50 */ 53 */
51struct vsp1_route { 54struct vsp1_route {
52 enum vsp1_entity_type type; 55 enum vsp1_entity_type type;
53 unsigned int index; 56 unsigned int index;
54 unsigned int reg; 57 unsigned int reg;
55 unsigned int inputs[VSP1_ENTITY_MAX_INPUTS]; 58 unsigned int inputs[VSP1_ENTITY_MAX_INPUTS];
59 unsigned int output;
56}; 60};
57 61
58/** 62/**