mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
tegra_hv: Update driver to support Linux 6.2 and above
The IO sys map helpers are used for the IVC communication on Linux 6.2 and above. Update drivers to have compatible with IVC APIs of Linux 6.2 and above. Bug 4370594 Change-Id: I0528248efa9edc3d4962f7b62d8ebfe2ac0a027e Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013108 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c8a83b5692
commit
9647ab8386
@@ -812,7 +812,11 @@ int tegra_hv_ivc_tx_empty(struct tegra_hv_ivc_cookie *ivck)
|
||||
{
|
||||
struct hv_ivc *ivc = cookie_to_ivc_dev(ivck);
|
||||
|
||||
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||
return tegra_ivc_empty(&ivc->ivc, &ivc->ivc.tx.map);
|
||||
#else
|
||||
return tegra_ivc_empty(&ivc->ivc, ivc->ivc.tx.channel);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_hv_ivc_tx_empty);
|
||||
|
||||
@@ -820,7 +824,11 @@ uint32_t tegra_hv_ivc_tx_frames_available(struct tegra_hv_ivc_cookie *ivck)
|
||||
{
|
||||
struct hv_ivc *ivc = cookie_to_ivc_dev(ivck);
|
||||
|
||||
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||
return tegra_ivc_frames_available(&ivc->ivc, &ivc->ivc.tx.map);
|
||||
#else
|
||||
return tegra_ivc_frames_available(&ivc->ivc, ivc->ivc.tx.channel);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_hv_ivc_tx_frames_available);
|
||||
|
||||
@@ -834,16 +842,35 @@ EXPORT_SYMBOL(tegra_hv_ivc_dump);
|
||||
void *tegra_hv_ivc_read_get_next_frame(struct tegra_hv_ivc_cookie *ivck)
|
||||
{
|
||||
struct hv_ivc *ivc = cookie_to_ivc_dev(ivck);
|
||||
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||
struct iosys_map map;
|
||||
int err;
|
||||
|
||||
err = tegra_ivc_read_get_next_frame(&ivc->ivc, &map);
|
||||
if (err)
|
||||
return ERR_PTR(err);
|
||||
return map.vaddr;
|
||||
#else
|
||||
return tegra_ivc_read_get_next_frame(&ivc->ivc);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_hv_ivc_read_get_next_frame);
|
||||
|
||||
void *tegra_hv_ivc_write_get_next_frame(struct tegra_hv_ivc_cookie *ivck)
|
||||
{
|
||||
struct hv_ivc *ivc = cookie_to_ivc_dev(ivck);
|
||||
#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
|
||||
struct iosys_map map;
|
||||
int err;
|
||||
|
||||
err = tegra_ivc_write_get_next_frame(&ivc->ivc, &map);
|
||||
if (err)
|
||||
return ERR_PTR(err);
|
||||
|
||||
return map.vaddr;
|
||||
#else
|
||||
return tegra_ivc_write_get_next_frame(&ivc->ivc);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_hv_ivc_write_get_next_frame);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user