History

[media] v4l: vsp1: Configure device based on IP version

The IP version number carries enough information to identify the exact device instance features. Drop the related DT properties and use the IP version instead.

Laurent Pinchart committed 10 years ago

Commit 5aa2eb31 parent 1517b0311 files · +116 −117Browse files

Unified · Split

11 files
  1. Documentation/devicetree/bindings/media/renesas,vsp1.txt +0 −21
  2. drivers/media/platform/vsp1/vsp1.h +3 −2
  3. drivers/media/platform/vsp1/vsp1_bru.c +1 −1
  4. drivers/media/platform/vsp1/vsp1_drm.c +3 −3
  5. drivers/media/platform/vsp1/vsp1_drv.c +96 −77
  6. drivers/media/platform/vsp1/vsp1_entity.c +1 −1
  7. drivers/media/platform/vsp1/vsp1_pipe.c +3 −3
  8. drivers/media/platform/vsp1/vsp1_rpf.c +2 −2
  9. drivers/media/platform/vsp1/vsp1_sru.c +2 −2
  10. drivers/media/platform/vsp1/vsp1_video.c +2 −2
  11. drivers/media/platform/vsp1/vsp1_wpf.c +3 −3
Documentation/devicetree/bindings/media/renesas,vsp1.txt+0−21
@@ -14,21 +14,6 @@ Required properties: · 13 unmodified lines
1414 - interrupts: VSP interrupt specifier.
1515 - clocks: A phandle + clock-specifier pair for the VSP functional clock.
1616
17− - renesas,#rpf: Number of Read Pixel Formatter (RPF) modules in the VSP.
18− - renesas,#wpf: Number of Write Pixel Formatter (WPF) modules in the VSP.
19−
20−
21−Optional properties:
22−
23− - renesas,#uds: Number of Up Down Scaler (UDS) modules in the VSP. Defaults
24− to 0 if not present.
25− - renesas,has-lif: Boolean, indicates that the LCD Interface (LIF) module is
26− available.
27− - renesas,has-lut: Boolean, indicates that the Look Up Table (LUT) module is
28− available.
29− - renesas,has-sru: Boolean, indicates that the Super Resolution Unit (SRU)
30− module is available.
31−
3217
3318 Example: R8A7790 (R-Car H2) VSP1-S node
3419
@@ -37,10 +22,4 @@ Example: R8A7790 (R-Car H2) VSP1-S node · 2 unmodified lines
3722 reg = <0 0xfe928000 0 0x8000>;
3823 interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
3924 clocks = <&mstp1_clks R8A7790_CLK_VSP1_S>;
40−
41− renesas,has-lut;
42− renesas,has-sru;
43− renesas,#rpf = <5>;
44− renesas,#uds = <3>;
45− renesas,#wpf = <4>;
4625 };
drivers/media/platform/vsp1/vsp1.h+3−2
@@ -47,7 +47,8 @@ struct vsp1_uds; · 46 unmodified lines
4747 #define VSP1_HAS_SRU (1 << 2)
4848 #define VSP1_HAS_BRU (1 << 3)
4949
50−struct vsp1_platform_data {
50+struct vsp1_device_info {
51+ u32 version;
5152 unsigned int features;
5253 unsigned int rpf_count;
5354 unsigned int uds_count;
@@ -58,7 +59,7 @@ struct vsp1_platform_data { · 4 unmodified lines
5859
5960 struct vsp1_device {
6061 struct device *dev;
61− struct vsp1_platform_data pdata;
62+ const struct vsp1_device_info *info;
6263
6364 void __iomem *mmio;
6465 struct clk *clock;
drivers/media/platform/vsp1/vsp1_bru.c+1−1
@@ -416,7 +416,7 @@ struct vsp1_bru *vsp1_bru_create(struct vsp1_device *vsp1) · 415 unmodified lines
416416 bru->entity.type = VSP1_ENTITY_BRU;
417417
418418 ret = vsp1_entity_init(vsp1, &bru->entity,
419− vsp1->pdata.num_bru_inputs + 1);
419+ vsp1->info->num_bru_inputs + 1);
420420 if (ret < 0)
421421 return ERR_PTR(ret);
422422
drivers/media/platform/vsp1/vsp1_drm.c+3−3
@@ -285,7 +285,7 @@ int vsp1_du_atomic_update(struct device *dev, unsigned int rpf_index, · 284 unmodified lines
285285 unsigned long flags;
286286 int ret;
287287
288− if (rpf_index >= vsp1->pdata.rpf_count)
288+ if (rpf_index >= vsp1->info->rpf_count)
289289 return -EINVAL;
290290
291291 rpf = vsp1->rpf[rpf_index];
@@ -519,7 +519,7 @@ int vsp1_drm_create_links(struct vsp1_device *vsp1) · 227 unmodified lines
519519 if (!vsp1->bru || !vsp1->lif)
520520 return -ENXIO;
521521
522− for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
522+ for (i = 0; i < vsp1->info->rpf_count; ++i) {
523523 struct vsp1_rwpf *rpf = vsp1->rpf[i];
524524
525525 ret = media_create_pad_link(&rpf->entity.subdev.entity,
@@ -572,7 +572,7 @@ int vsp1_drm_init(struct vsp1_device *vsp1) · 46 unmodified lines
572572 pipe->frame_end = vsp1_drm_pipeline_frame_end;
573573
574574 /* The DRM pipeline is static, add entities manually. */
575− for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
575+ for (i = 0; i < vsp1->info->rpf_count; ++i) {
576576 struct vsp1_rwpf *input = vsp1->rpf[i];
577577
578578 list_add_tail(&input->entity.list_pipe, &pipe->entities);
drivers/media/platform/vsp1/vsp1_drv.c+96−77
@@ -47,7 +47,7 @@ static irqreturn_t vsp1_irq_handler(int irq, void *data) · 46 unmodified lines
4747 unsigned int i;
4848 u32 status;
4949
50− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
50+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
5151 struct vsp1_rwpf *wpf = vsp1->wpf[i];
5252 struct vsp1_pipeline *pipe;
5353
@@ -153,7 +153,7 @@ static int vsp1_uapi_create_links(struct vsp1_device *vsp1) · 99 unmodified lines
153153 return ret;
154154 }
155155
156− if (vsp1->pdata.features & VSP1_HAS_LIF) {
156+ if (vsp1->info->features & VSP1_HAS_LIF) {
157157 ret = media_create_pad_link(&vsp1->wpf[0]->entity.subdev.entity,
158158 RWPF_PAD_SOURCE,
159159 &vsp1->lif->entity.subdev.entity,
@@ -162,7 +162,7 @@ static int vsp1_uapi_create_links(struct vsp1_device *vsp1) · 2 unmodified lines
162162 return ret;
163163 }
164164
165− for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
165+ for (i = 0; i < vsp1->info->rpf_count; ++i) {
166166 struct vsp1_rwpf *rpf = vsp1->rpf[i];
167167
168168 ret = media_create_pad_link(&rpf->video->video.entity, 0,
@@ -174,7 +174,7 @@ static int vsp1_uapi_create_links(struct vsp1_device *vsp1) · 5 unmodified lines
174174 return ret;
175175 }
176176
177− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
177+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
178178 /* Connect the video device to the WPF. All connections are
179179 * immutable except for the WPF0 source link if a LIF is
180180 * present.
@@ -182,7 +182,7 @@ static int vsp1_uapi_create_links(struct vsp1_device *vsp1) · 1 unmodified line
182182 struct vsp1_rwpf *wpf = vsp1->wpf[i];
183183 unsigned int flags = MEDIA_LNK_FL_ENABLED;
184184
185− if (!(vsp1->pdata.features & VSP1_HAS_LIF) || i != 0)
185+ if (!(vsp1->info->features & VSP1_HAS_LIF) || i != 0)
186186 flags |= MEDIA_LNK_FL_IMMUTABLE;
187187
188188 ret = media_create_pad_link(&wpf->entity.subdev.entity,
@@ -215,7 +215,7 @@ static void vsp1_destroy_entities(struct vsp1_device *vsp1) · 26 unmodified lines
215215 media_device_unregister(&vsp1->media_dev);
216216 media_device_cleanup(&vsp1->media_dev);
217217
218− if (!vsp1->pdata.uapi)
218+ if (!vsp1->info->uapi)
219219 vsp1_drm_cleanup(vsp1);
220220 }
221221
@@ -238,7 +238,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 16 unmodified lines
238238 * the pipeline is configured internally by the driver in that case, and
239239 * its configuration can thus be trusted.
240240 */
241− if (vsp1->pdata.uapi)
241+ if (vsp1->info->uapi)
242242 vsp1->media_ops.link_validate = v4l2_subdev_link_validate;
243243
244244 vdev->mdev = mdev;
@@ -250,7 +250,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 5 unmodified lines
250250 }
251251
252252 /* Instantiate all the entities. */
253− if (vsp1->pdata.features & VSP1_HAS_BRU) {
253+ if (vsp1->info->features & VSP1_HAS_BRU) {
254254 vsp1->bru = vsp1_bru_create(vsp1);
255255 if (IS_ERR(vsp1->bru)) {
256256 ret = PTR_ERR(vsp1->bru);
@@ -276,7 +276,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 19 unmodified lines
276276
277277 list_add_tail(&vsp1->hst->entity.list_dev, &vsp1->entities);
278278
279− if (vsp1->pdata.features & VSP1_HAS_LIF) {
279+ if (vsp1->info->features & VSP1_HAS_LIF) {
280280 vsp1->lif = vsp1_lif_create(vsp1);
281281 if (IS_ERR(vsp1->lif)) {
282282 ret = PTR_ERR(vsp1->lif);
@@ -286,7 +286,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 3 unmodified lines
286286 list_add_tail(&vsp1->lif->entity.list_dev, &vsp1->entities);
287287 }
288288
289− if (vsp1->pdata.features & VSP1_HAS_LUT) {
289+ if (vsp1->info->features & VSP1_HAS_LUT) {
290290 vsp1->lut = vsp1_lut_create(vsp1);
291291 if (IS_ERR(vsp1->lut)) {
292292 ret = PTR_ERR(vsp1->lut);
@@ -296,7 +296,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 3 unmodified lines
296296 list_add_tail(&vsp1->lut->entity.list_dev, &vsp1->entities);
297297 }
298298
299− for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
299+ for (i = 0; i < vsp1->info->rpf_count; ++i) {
300300 struct vsp1_rwpf *rpf;
301301
302302 rpf = vsp1_rpf_create(vsp1, i);
@@ -308,7 +308,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 5 unmodified lines
308308 vsp1->rpf[i] = rpf;
309309 list_add_tail(&rpf->entity.list_dev, &vsp1->entities);
310310
311− if (vsp1->pdata.uapi) {
311+ if (vsp1->info->uapi) {
312312 struct vsp1_video *video = vsp1_video_create(vsp1, rpf);
313313
314314 if (IS_ERR(video)) {
@@ -320,7 +320,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 5 unmodified lines
320320 }
321321 }
322322
323− if (vsp1->pdata.features & VSP1_HAS_SRU) {
323+ if (vsp1->info->features & VSP1_HAS_SRU) {
324324 vsp1->sru = vsp1_sru_create(vsp1);
325325 if (IS_ERR(vsp1->sru)) {
326326 ret = PTR_ERR(vsp1->sru);
@@ -330,7 +330,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 3 unmodified lines
330330 list_add_tail(&vsp1->sru->entity.list_dev, &vsp1->entities);
331331 }
332332
333− for (i = 0; i < vsp1->pdata.uds_count; ++i) {
333+ for (i = 0; i < vsp1->info->uds_count; ++i) {
334334 struct vsp1_uds *uds;
335335
336336 uds = vsp1_uds_create(vsp1, i);
@@ -343,7 +343,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 6 unmodified lines
343343 list_add_tail(&uds->entity.list_dev, &vsp1->entities);
344344 }
345345
346− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
346+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
347347 struct vsp1_rwpf *wpf;
348348
349349 wpf = vsp1_wpf_create(vsp1, i);
@@ -355,7 +355,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 5 unmodified lines
355355 vsp1->wpf[i] = wpf;
356356 list_add_tail(&wpf->entity.list_dev, &vsp1->entities);
357357
358− if (vsp1->pdata.uapi) {
358+ if (vsp1->info->uapi) {
359359 struct vsp1_video *video = vsp1_video_create(vsp1, wpf);
360360
361361 if (IS_ERR(video)) {
@@ -377,7 +377,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 15 unmodified lines
377377 }
378378
379379 /* Create links. */
380− if (vsp1->pdata.uapi)
380+ if (vsp1->info->uapi)
381381 ret = vsp1_uapi_create_links(vsp1);
382382 else
383383 ret = vsp1_drm_create_links(vsp1);
@@ -387,7 +387,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) · 3 unmodified lines
387387 /* Register subdev nodes if the userspace API is enabled or initialize
388388 * the DRM pipeline otherwise.
389389 */
390− if (vsp1->pdata.uapi) {
390+ if (vsp1->info->uapi) {
391391 vsp1->use_dl = false;
392392 ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
393393 } else {
@@ -438,7 +438,7 @@ static int vsp1_device_init(struct vsp1_device *vsp1) · 44 unmodified lines
438438 int ret;
439439
440440 /* Reset any channel that might be running. */
441− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
441+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
442442 ret = vsp1_reset_wpf(vsp1, i);
443443 if (ret < 0)
444444 return ret;
@@ -447,10 +447,10 @@ static int vsp1_device_init(struct vsp1_device *vsp1) · 2 unmodified lines
447447 vsp1_write(vsp1, VI6_CLK_DCSWT, (8 << VI6_CLK_DCSWT_CSTPW_SHIFT) |
448448 (8 << VI6_CLK_DCSWT_CSTRW_SHIFT));
449449
450− for (i = 0; i < vsp1->pdata.rpf_count; ++i)
450+ for (i = 0; i < vsp1->info->rpf_count; ++i)
451451 vsp1_write(vsp1, VI6_DPR_RPF_ROUTE(i), VI6_DPR_NODE_UNUSED);
452452
453− for (i = 0; i < vsp1->pdata.uds_count; ++i)
453+ for (i = 0; i < vsp1->info->uds_count; ++i)
454454 vsp1_write(vsp1, VI6_DPR_UDS_ROUTE(i), VI6_DPR_NODE_UNUSED);
455455
456456 vsp1_write(vsp1, VI6_DPR_SRU_ROUTE, VI6_DPR_NODE_UNUSED);
@@ -567,52 +567,75 @@ static const struct dev_pm_ops vsp1_pm_ops = { · 110 unmodified lines
567567 * Platform Driver
568568 */
569569
570−static int vsp1_parse_dt(struct vsp1_device *vsp1)
571−{
572− struct device_node *np = vsp1->dev->of_node;
573− struct vsp1_platform_data *pdata = &vsp1->pdata;
574−
575− if (of_property_read_bool(np, "renesas,has-lif"))
576− pdata->features |= VSP1_HAS_LIF;
577− if (of_property_read_bool(np, "renesas,has-lut"))
578− pdata->features |= VSP1_HAS_LUT;
579− if (of_property_read_bool(np, "renesas,has-sru"))
580− pdata->features |= VSP1_HAS_SRU;
581−
582− of_property_read_u32(np, "renesas,#rpf", &pdata->rpf_count);
583− of_property_read_u32(np, "renesas,#uds", &pdata->uds_count);
584− of_property_read_u32(np, "renesas,#wpf", &pdata->wpf_count);
585−
586− if (pdata->rpf_count <= 0 || pdata->rpf_count > VSP1_MAX_RPF) {
587− dev_err(vsp1->dev, "invalid number of RPF (%u)\n",
588− pdata->rpf_count);
589− return -EINVAL;
590− }
591−
592− if (pdata->uds_count > VSP1_MAX_UDS) {
593− dev_err(vsp1->dev, "invalid number of UDS (%u)\n",
594− pdata->uds_count);
595− return -EINVAL;
596− }
597−
598− if (pdata->wpf_count <= 0 || pdata->wpf_count > VSP1_MAX_WPF) {
599− dev_err(vsp1->dev, "invalid number of WPF (%u)\n",
600− pdata->wpf_count);
601− return -EINVAL;
602− }
603−
604− pdata->features |= VSP1_HAS_BRU;
605− pdata->num_bru_inputs = 4;
606− pdata->uapi = true;
607−
608− return 0;
609−}
570+static const struct vsp1_device_info vsp1_device_infos[] = {
571+ {
572+ .version = VI6_IP_VERSION_MODEL_VSPS_H2,
573+ .features = VSP1_HAS_BRU | VSP1_HAS_LUT | VSP1_HAS_SRU,
574+ .rpf_count = 5,
575+ .uds_count = 3,
576+ .wpf_count = 4,
577+ .num_bru_inputs = 4,
578+ .uapi = true,
579+ }, {
580+ .version = VI6_IP_VERSION_MODEL_VSPR_H2,
581+ .features = VSP1_HAS_BRU | VSP1_HAS_SRU,
582+ .rpf_count = 5,
583+ .uds_count = 1,
584+ .wpf_count = 4,
585+ .num_bru_inputs = 4,
586+ .uapi = true,
587+ }, {
588+ .version = VI6_IP_VERSION_MODEL_VSPD_GEN2,
589+ .features = VSP1_HAS_BRU | VSP1_HAS_LIF | VSP1_HAS_LUT,
590+ .rpf_count = 4,
591+ .uds_count = 1,
592+ .wpf_count = 4,
593+ .num_bru_inputs = 4,
594+ .uapi = true,
595+ }, {
596+ .version = VI6_IP_VERSION_MODEL_VSPS_M2,
597+ .features = VSP1_HAS_BRU | VSP1_HAS_LUT | VSP1_HAS_SRU,
598+ .rpf_count = 5,
599+ .uds_count = 3,
600+ .wpf_count = 4,
601+ .num_bru_inputs = 4,
602+ .uapi = true,
603+ }, {
604+ .version = VI6_IP_VERSION_MODEL_VSPI_GEN3,
605+ .features = VSP1_HAS_LUT | VSP1_HAS_SRU,
606+ .rpf_count = 1,
607+ .uds_count = 1,
608+ .wpf_count = 1,
609+ .uapi = true,
610+ }, {
611+ .version = VI6_IP_VERSION_MODEL_VSPBD_GEN3,
612+ .features = VSP1_HAS_BRU,
613+ .rpf_count = 5,
614+ .wpf_count = 1,
615+ .num_bru_inputs = 5,
616+ .uapi = true,
617+ }, {
618+ .version = VI6_IP_VERSION_MODEL_VSPBC_GEN3,
619+ .features = VSP1_HAS_BRU | VSP1_HAS_LUT,
620+ .rpf_count = 5,
621+ .wpf_count = 1,
622+ .num_bru_inputs = 5,
623+ .uapi = true,
624+ }, {
625+ .version = VI6_IP_VERSION_MODEL_VSPD_GEN3,
626+ .features = VSP1_HAS_BRU | VSP1_HAS_LIF | VSP1_HAS_LUT,
627+ .rpf_count = 5,
628+ .wpf_count = 2,
629+ .num_bru_inputs = 5,
630+ },
631+};
610632
611633 static int vsp1_probe(struct platform_device *pdev)
612634 {
613635 struct vsp1_device *vsp1;
614636 struct resource *irq;
615637 struct resource *io;
638+ unsigned int i;
616639 u32 version;
617640 int ret;
618641
@@ -625,10 +648,6 @@ static int vsp1_probe(struct platform_device *pdev) · 6 unmodified lines
625648 INIT_LIST_HEAD(&vsp1->entities);
626649 INIT_LIST_HEAD(&vsp1->videos);
627650
628− ret = vsp1_parse_dt(vsp1);
629− if (ret < 0)
630− return ret;
631−
632651 /* I/O, IRQ and clock resources */
633652 io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
634653 vsp1->mmio = devm_ioremap_resource(&pdev->dev, io);
@@ -662,21 +681,21 @@ static int vsp1_probe(struct platform_device *pdev) · 27 unmodified lines
662681 version = vsp1_read(vsp1, VI6_IP_VERSION);
663682 clk_disable_unprepare(vsp1->clock);
664683
665− dev_dbg(&pdev->dev, "IP version 0x%08x\n", version);
684+ for (i = 0; i < ARRAY_SIZE(vsp1_device_infos); ++i) {
685+ if ((version & VI6_IP_VERSION_MODEL_MASK) ==
686+ vsp1_device_infos[i].version) {
687+ vsp1->info = &vsp1_device_infos[i];
688+ break;
689+ }
690+ }
666691
667− switch (version & VI6_IP_VERSION_MODEL_MASK) {
668− case VI6_IP_VERSION_MODEL_VSPD_GEN3:
669− vsp1->pdata.num_bru_inputs = 5;
670− vsp1->pdata.uapi = false;
671− break;
672−
673− case VI6_IP_VERSION_MODEL_VSPI_GEN3:
674− case VI6_IP_VERSION_MODEL_VSPBD_GEN3:
675− case VI6_IP_VERSION_MODEL_VSPBC_GEN3:
676− vsp1->pdata.features &= ~VSP1_HAS_BRU;
677− break;
692+ if (!vsp1->info) {
693+ dev_err(&pdev->dev, "unsupported IP version 0x%08x\n", version);
694+ return -ENXIO;
678695 }
679696
697+ dev_dbg(&pdev->dev, "IP version 0x%08x\n", version);
698+
680699 /* Instanciate entities */
681700 ret = vsp1_create_entities(vsp1);
682701 if (ret < 0) {
drivers/media/platform/vsp1/vsp1_entity.c+1−1
@@ -45,7 +45,7 @@ int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming) · 44 unmodified lines
4545 if (!streaming)
4646 return 0;
4747
48− if (!entity->vsp1->pdata.uapi || !entity->subdev.ctrl_handler)
48+ if (!entity->vsp1->info->uapi || !entity->subdev.ctrl_handler)
4949 return 0;
5050
5151 ret = v4l2_ctrl_handler_setup(entity->subdev.ctrl_handler);
drivers/media/platform/vsp1/vsp1_pipe.c+3−3
@@ -368,7 +368,7 @@ void vsp1_pipelines_suspend(struct vsp1_device *vsp1) · 367 unmodified lines
368368 * pipelines twice, first to set them all to the stopping state, and
369369 * then to wait for the stop to complete.
370370 */
371− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
371+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
372372 struct vsp1_rwpf *wpf = vsp1->wpf[i];
373373 struct vsp1_pipeline *pipe;
374374
@@ -385,7 +385,7 @@ void vsp1_pipelines_suspend(struct vsp1_device *vsp1) · 10 unmodified lines
385385 spin_unlock_irqrestore(&pipe->irqlock, flags);
386386 }
387387
388− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
388+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
389389 struct vsp1_rwpf *wpf = vsp1->wpf[i];
390390 struct vsp1_pipeline *pipe;
391391
@@ -409,7 +409,7 @@ void vsp1_pipelines_resume(struct vsp1_device *vsp1) · 17 unmodified lines
409409 unsigned int i;
410410
411411 /* Resume pipeline all running pipelines. */
412− for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
412+ for (i = 0; i < vsp1->info->wpf_count; ++i) {
413413 struct vsp1_rwpf *wpf = vsp1->wpf[i];
414414 struct vsp1_pipeline *pipe;
415415
drivers/media/platform/vsp1/vsp1_rpf.c+2−2
@@ -151,12 +151,12 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable) · 150 unmodified lines
151151 (fmtinfo->alpha ? VI6_RPF_ALPH_SEL_ASEL_PACKED
152152 : VI6_RPF_ALPH_SEL_ASEL_FIXED));
153153
154− if (vsp1->pdata.uapi)
154+ if (vsp1->info->uapi)
155155 mutex_lock(rpf->ctrls.lock);
156156 vsp1_rpf_write(rpf, VI6_RPF_VRTCOL_SET,
157157 rpf->alpha->cur.val << VI6_RPF_VRTCOL_SET_LAYA_SHIFT);
158158 vsp1_pipeline_propagate_alpha(pipe, &rpf->entity, rpf->alpha->cur.val);
159− if (vsp1->pdata.uapi)
159+ if (vsp1->info->uapi)
160160 mutex_unlock(rpf->ctrls.lock);
161161
162162 vsp1_rpf_write(rpf, VI6_RPF_MSK_CTRL, 0);
drivers/media/platform/vsp1/vsp1_sru.c+2−2
@@ -151,12 +151,12 @@ static int sru_s_stream(struct v4l2_subdev *subdev, int enable) · 150 unmodified lines
151151 /* Take the control handler lock to ensure that the CTRL0 value won't be
152152 * changed behind our back by a set control operation.
153153 */
154− if (sru->entity.vsp1->pdata.uapi)
154+ if (sru->entity.vsp1->info->uapi)
155155 mutex_lock(sru->ctrls.lock);
156156 ctrl0 |= vsp1_sru_read(sru, VI6_SRU_CTRL0)
157157 & (VI6_SRU_CTRL0_PARAM0_MASK | VI6_SRU_CTRL0_PARAM1_MASK);
158158 vsp1_sru_write(sru, VI6_SRU_CTRL0, ctrl0);
159− if (sru->entity.vsp1->pdata.uapi)
159+ if (sru->entity.vsp1->info->uapi)
160160 mutex_unlock(sru->ctrls.lock);
161161
162162 vsp1_sru_write(sru, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5);
drivers/media/platform/vsp1/vsp1_video.c+2−2
@@ -324,7 +324,7 @@ static int vsp1_video_pipeline_validate(struct vsp1_pipeline *pipe, · 323 unmodified lines
324324 /* Follow links downstream for each input and make sure the graph
325325 * contains no loop and that all branches end at the output WPF.
326326 */
327− for (i = 0; i < video->vsp1->pdata.rpf_count; ++i) {
327+ for (i = 0; i < video->vsp1->info->rpf_count; ++i) {
328328 if (!pipe->inputs[i])
329329 continue;
330330
@@ -456,7 +456,7 @@ static void vsp1_video_pipeline_frame_end(struct vsp1_pipeline *pipe) · 125 unmodified lines
456456 unsigned int i;
457457
458458 /* Complete buffers on all video nodes. */
459− for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
459+ for (i = 0; i < vsp1->info->rpf_count; ++i) {
460460 if (!pipe->inputs[i])
461461 continue;
462462
drivers/media/platform/vsp1/vsp1_wpf.c+3−3
@@ -98,7 +98,7 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) · 97 unmodified lines
9898 * inputs as sub-layers and select the virtual RPF as the master
9999 * layer.
100100 */
101− for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
101+ for (i = 0; i < vsp1->info->rpf_count; ++i) {
102102 struct vsp1_rwpf *input = pipe->inputs[i];
103103
104104 if (!input)
@@ -155,11 +155,11 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) · 50 unmodified lines
155155 /* Take the control handler lock to ensure that the PDV value won't be
156156 * changed behind our back by a set control operation.
157157 */
158− if (vsp1->pdata.uapi)
158+ if (vsp1->info->uapi)
159159 mutex_lock(wpf->ctrls.lock);
160160 outfmt |= wpf->alpha->cur.val << VI6_WPF_OUTFMT_PDV_SHIFT;
161161 vsp1_wpf_write(wpf, VI6_WPF_OUTFMT, outfmt);
162− if (vsp1->pdata.uapi)
162+ if (vsp1->info->uapi)
163163 mutex_unlock(wpf->ctrls.lock);
164164
165165 vsp1_mod_write(&wpf->entity, VI6_DPR_WPF_FPORCH(wpf->entity.index),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t