diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2022-06-27 17:19:54 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2022-07-08 17:27:52 +0300 |
commit | bf0297ac77f3c3187a79a612082ce7ddb64c1e4b (patch) | |
tree | a956991a61dea2dab00d0899187e97837b4c120c /drivers/gpu/drm/tegra/nvdec.c | |
parent | e09db97889ec647ad373f7a7422c83099c6120c5 (diff) | |
download | linux-bf0297ac77f3c3187a79a612082ce7ddb64c1e4b.tar.xz |
drm/tegra: Implement stream ID related callbacks on engines
Implement the get_streamid_offset and can_use_memory_ctx callbacks
required for supporting context isolation. Since old firmware on VIC
cannot support context isolation without hacks that we don't want to
implement, check the firmware binary to see if context isolation
should be enabled.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/nvdec.c')
-rw-r--r-- | drivers/gpu/drm/tegra/nvdec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/nvdec.c b/drivers/gpu/drm/tegra/nvdec.c index 386f9b2e78c4..a84f61709679 100644 --- a/drivers/gpu/drm/tegra/nvdec.c +++ b/drivers/gpu/drm/tegra/nvdec.c @@ -306,10 +306,19 @@ static void nvdec_close_channel(struct tegra_drm_context *context) host1x_channel_put(context->channel); } +static int nvdec_can_use_memory_ctx(struct tegra_drm_client *client, bool *supported) +{ + *supported = true; + + return 0; +} + static const struct tegra_drm_client_ops nvdec_ops = { .open_channel = nvdec_open_channel, .close_channel = nvdec_close_channel, .submit = tegra_drm_submit, + .get_streamid_offset = tegra_drm_get_streamid_offset_thi, + .can_use_memory_ctx = nvdec_can_use_memory_ctx, }; #define NVIDIA_TEGRA_210_NVDEC_FIRMWARE "nvidia/tegra210/nvdec.bin" |