gpu: host1x: Add mlock release code for NVENC/NVJPG

Add definitions to allow mlock releasing on recovery for NVENC/NVJPG
on Tegra234.

Bug 3778105

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Iea33063b0d71add9fe816d93c96401087a12a657
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2772958
(cherry picked from commit e5f17c5842af24bde32e74d6eb2a61b0d90cae3d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2772920
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mikko Perttunen
2022-09-07 13:58:35 +03:00
committed by Laxman Dewangan
parent 5de571fe8d
commit a31d614845
2 changed files with 10 additions and 0 deletions

View File

@@ -260,6 +260,15 @@ static void timeout_release_mlock(struct host1x_cdma *cdma)
case HOST1X_CLASS_NVDEC: case HOST1X_CLASS_NVDEC:
offset = HOST1X_COMMON_NVDEC_MLOCK; offset = HOST1X_COMMON_NVDEC_MLOCK;
break; break;
case HOST1X_CLASS_NVENC:
offset = HOST1X_COMMON_NVENC_MLOCK;
break;
case HOST1X_CLASS_NVJPG:
offset = HOST1X_COMMON_NVJPG_MLOCK;
break;
case HOST1X_CLASS_NVJPG1:
offset = HOST1X_COMMON_NVJPG1_MLOCK;
break;
default: default:
WARN(1, "%s was not updated for class %u", __func__, ch->client->class); WARN(1, "%s was not updated for class %u", __func__, ch->client->class);
return; return;

View File

@@ -13,6 +13,7 @@
enum host1x_class { enum host1x_class {
HOST1X_CLASS_HOST1X = 0x1, HOST1X_CLASS_HOST1X = 0x1,
HOST1X_CLASS_NVJPG1 = 0x7,
HOST1X_CLASS_NVENC = 0x21, HOST1X_CLASS_NVENC = 0x21,
HOST1X_CLASS_NVENC1 = 0x22, HOST1X_CLASS_NVENC1 = 0x22,
HOST1X_CLASS_GR2D = 0x51, HOST1X_CLASS_GR2D = 0x51,