gpu: host1x: When out of memory contexts, wait for free context

Instead of immediately returning an error when trying to allocate
a context device and none are free, log a warning and stall the
submit until a usable context becomes available.

Bug 4712458

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I964c906e94a8624ded04a5f3851f8c3dbbe76d8b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227750
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Dane Liu <danel@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
This commit is contained in:
Mikko Perttunen
2024-10-10 12:00:33 +03:00
committed by mobile promotions
parent 276418c013
commit 7ea5704ca3
2 changed files with 56 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ struct host1x_memory_context_list {
struct mutex lock;
struct host1x_hw_memory_context *devs;
unsigned int len;
struct list_head waiters;
};
struct host1x_hw_memory_context {