mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
camera: set CSI port-index when preparing graph
When preparing graph, device tree endpoints are are found to be in reverse order. This leads to incorrect csi port index associated with video nodes. Read csi port while preparing graph and assign it to tegra_channel struct. Bug 3898807 Change-Id: I39af68386d85bc6299b164864e4503850d606e69 Signed-off-by: Ankur Pawar <ankurp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855852 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Sudhir Vyas <svyas@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c41266d8b0
commit
8b04ed92cb
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* NVIDIA Media controller graph management
|
||||
*
|
||||
* Copyright (c) 2015-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
#include <linux/clk.h>
|
||||
#include <linux/list.h>
|
||||
@@ -403,6 +403,7 @@ static int tegra_vi_graph_parse_one(struct tegra_channel *chan,
|
||||
struct device_node *next;
|
||||
struct device_node *remote = NULL;
|
||||
struct tegra_vi_graph_entity *entity;
|
||||
int value = 0;
|
||||
int ret = 0;
|
||||
|
||||
dev_dbg(chan->vi->dev, "parsing node %s\n", node->full_name);
|
||||
@@ -427,6 +428,10 @@ static int tegra_vi_graph_parse_one(struct tegra_channel *chan,
|
||||
!of_device_is_available(remote))
|
||||
continue;
|
||||
|
||||
ret = of_property_read_u32(ep, "port-index", &value);
|
||||
if (!ret)
|
||||
chan->port[0] = value;
|
||||
|
||||
entity = devm_kzalloc(chan->vi->dev, sizeof(*entity),
|
||||
GFP_KERNEL);
|
||||
if (entity == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user