mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
video: camera: Modify rtcpu modules for OOT tree
This patch modifies rtcpu modules to use new ivc headers, resolves cyclic dependencies between the modules, reduces the amount of modules built by linking them together and fixes other minor issues encountered with K5.15 Change-Id: I9cf2672df08ffe6c4b8aea9ac21d6cc50a92bb4e Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2787121 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Ankur Pawar <ankurp@nvidia.com> Reviewed-by: Semi Malinen <smalinen@nvidia.com> Reviewed-by: Pekka Pessi <ppessi@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
304123a3bf
commit
dd109353df
@@ -24,7 +24,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/tegra-camera-rtcpu.h>
|
||||
#include <linux/tegra-ivc.h>
|
||||
#include <soc/tegra/ivc_ext.h>
|
||||
#include <linux/tegra-ivc-bus.h>
|
||||
#include <linux/platform/tegra/common.h>
|
||||
#if IS_ENABLED(CONFIG_TEGRA_BWMGR)
|
||||
@@ -32,8 +32,6 @@
|
||||
#endif
|
||||
#include <soc/tegra/fuse.h>
|
||||
|
||||
#include <dt-bindings/memory/tegra-swgroup.h>
|
||||
|
||||
#define CAMRTC_TEST_CAM_DEVICES 4
|
||||
|
||||
struct camrtc_test_device {
|
||||
@@ -287,7 +285,7 @@ static int camrtc_ivc_dbg_full_frame_xact(
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = tegra_ivc_write(&ch->ivc, req, req_size);
|
||||
ret = tegra_ivc_write(&ch->ivc, NULL, req, req_size);
|
||||
if (ret < 0) {
|
||||
dev_err(&ch->dev, "IVC write error: %d\n", ret);
|
||||
goto out;
|
||||
@@ -309,7 +307,7 @@ static int camrtc_ivc_dbg_full_frame_xact(
|
||||
|
||||
dev_dbg(&ch->dev, "rx msg\n");
|
||||
|
||||
ret = tegra_ivc_read_peek(&ch->ivc, resp, 0, resp_size);
|
||||
ret = tegra_ivc_read_peek(&ch->ivc, NULL, resp, 0, resp_size);
|
||||
if (ret < 0) {
|
||||
dev_err(&ch->dev, "IVC read error: %d\n", ret);
|
||||
break;
|
||||
@@ -919,7 +917,7 @@ static void camrtc_membw_set(struct camrtc_run_membw *membw, u32 bw)
|
||||
|
||||
if (bw == 0) {
|
||||
;
|
||||
} else if (tegra_get_chip_id() == TEGRA234) {
|
||||
} else {
|
||||
#if IS_ENABLED(CONFIG_INTERCONNECT)
|
||||
struct icc_path *icc_path;
|
||||
int ret;
|
||||
@@ -936,31 +934,6 @@ static void camrtc_membw_set(struct camrtc_run_membw *membw, u32 bw)
|
||||
|
||||
membw->icc_path = icc_path;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
#if IS_ENABLED(CONFIG_TEGRA_BWMGR)
|
||||
struct tegra_bwmgr_client *bwmgr;
|
||||
unsigned long emc_rate;
|
||||
int ret;
|
||||
|
||||
bwmgr = tegra_bwmgr_register(TEGRA_BWMGR_CLIENT_CAMERA_NON_ISO);
|
||||
|
||||
if (!IS_ERR_OR_NULL(bwmgr)) {
|
||||
if (bw == 0xFFFFFFFFU)
|
||||
emc_rate = tegra_bwmgr_get_max_emc_rate();
|
||||
else
|
||||
emc_rate = tegra_bwmgr_round_rate(bw);
|
||||
|
||||
ret = tegra_bwmgr_set_emc(bwmgr,
|
||||
emc_rate, TEGRA_BWMGR_SET_EMC_SHARED_BW);
|
||||
|
||||
if (ret < 0)
|
||||
dev_info(dev, "emc request rate %lu failed, %d\n", emc_rate, ret);
|
||||
else
|
||||
dev_dbg(dev, "requested emc rate %lu\n", emc_rate);
|
||||
|
||||
membw->bwmgr = bwmgr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1979,6 +1952,7 @@ static const struct of_device_id camrtc_debug_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra186-camera-ivc-protocol-debug" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, camrtc_debug_of_match);
|
||||
|
||||
static struct tegra_ivc_driver camrtc_debug_driver = {
|
||||
.driver = {
|
||||
|
||||
Reference in New Issue
Block a user