Lines Matching refs:vip

21 #include "vip.h"
54 struct tegra_vip *vip = vip_channel_to_vip(vip_chan);
58 err = pm_runtime_resume_and_get(vip->dev);
60 return dev_err_probe(vip->dev, err, "failed to get runtime PM\n");
62 err = vip->soc->ops->vip_start_streaming(vip_chan);
74 pm_runtime_put(vip->dev);
81 struct tegra_vip *vip = vip_channel_to_vip(vip_chan);
86 pm_runtime_put(vip->dev);
111 static int tegra_vip_channel_of_parse(struct tegra_vip *vip)
113 struct device *dev = vip->dev;
147 vip->chan.of_node = of_node_get(np);
148 vip->chan.pads[TEGRA_VIP_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
149 vip->chan.pads[TEGRA_VIP_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
158 static int tegra_vip_channel_init(struct tegra_vip *vip)
163 subdev = &vip->chan.subdev;
165 subdev->dev = vip->dev;
167 kbasename(vip->chan.of_node->full_name));
169 v4l2_set_subdevdata(subdev, &vip->chan);
170 subdev->fwnode = of_fwnode_handle(vip->chan.of_node);
173 err = media_entity_pads_init(&subdev->entity, TEGRA_VIP_PADS_NUM, vip->chan.pads);
175 return dev_err_probe(vip->dev, err, "failed to initialize media entity\n");
179 dev_err_probe(vip->dev, err, "failed to register subdev\n");
192 struct tegra_vip *vip = host1x_client_to_vip(client);
195 err = tegra_vip_channel_of_parse(vip);
199 err = tegra_vip_channel_init(vip);
206 of_node_put(vip->chan.of_node);
212 struct tegra_vip *vip = host1x_client_to_vip(client);
213 struct v4l2_subdev *subdev = &vip->chan.subdev;
217 of_node_put(vip->chan.of_node);
229 struct tegra_vip *vip;
234 vip = devm_kzalloc(&pdev->dev, sizeof(*vip), GFP_KERNEL);
235 if (!vip)
238 vip->soc = of_device_get_match_data(&pdev->dev);
240 vip->dev = &pdev->dev;
241 platform_set_drvdata(pdev, vip);
244 INIT_LIST_HEAD(&vip->client.list);
245 vip->client.ops = &vip_client_ops;
246 vip->client.dev = &pdev->dev;
248 err = host1x_client_register(&vip->client);
259 struct tegra_vip *vip = platform_get_drvdata(pdev);
261 host1x_client_unregister(&vip->client);
272 { .compatible = "nvidia,tegra20-vip", .data = &tegra20_vip_soc },
280 .name = "tegra-vip",