diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-10-13 01:17:46 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-13 02:07:34 +0200 |
commit | 0e6bb5b7f4c8e6665e76bdafce37ad4a8daf83c5 (patch) | |
tree | 6f71fc5628f01bcf9d2dc6eceb3000ee4e73c79a /drivers/gpu/drm/nouveau/nouveau_exec.h | |
parent | net: gso_test: fix build with gcc-12 and earlier (diff) | |
parent | Merge tag 'net-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
download | linux-0e6bb5b7f4c8e6665e76bdafce37ad4a8daf83c5.tar.xz linux-0e6bb5b7f4c8e6665e76bdafce37ad4a8daf83c5.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts.
Adjacent changes:
kernel/bpf/verifier.c
829955981c55 ("bpf: Fix verifier log for async callback return values")
a923819fb2c5 ("bpf: Treat first argument as return value for bpf_throw")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_exec.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_exec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_exec.h b/drivers/gpu/drm/nouveau/nouveau_exec.h index 778cacd90f65..5488d337bcc0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_exec.h +++ b/drivers/gpu/drm/nouveau/nouveau_exec.h @@ -51,4 +51,14 @@ int nouveau_exec_job_init(struct nouveau_exec_job **job, int nouveau_exec_ioctl_exec(struct drm_device *dev, void *data, struct drm_file *file_priv); +static inline unsigned int +nouveau_exec_push_max_from_ib_max(int ib_max) +{ + /* Limit the number of IBs per job to half the size of the ring in order + * to avoid the ring running dry between submissions and preserve one + * more slot for the job's HW fence. + */ + return ib_max > 1 ? ib_max / 2 - 1 : 0; +} + #endif |