mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: add deterministic submit flag
This change adds a new ioctl flag, NVGPU_SUBMIT_GPFIFO_FLAGS_DETERMINISTIC, which indicates that a gpfifo submission must exhibit deterministic behavior within the kernel. For submissions that require job tracking and also set this flag, we require the channel to have previously pre-allocated job tracking resources. Bug 1795076 Change-Id: I0496a2513c6c683fcda161b32db9e7ee6712d45c Signed-off-by: Sachit Kadle <skadle@nvidia.com> Reviewed-on: http://git-master/r/1210527 (cherry picked from commit 0a36a0ce3a6cbe398931993e742fc928f7b2c0aa) Reviewed-on: http://git-master/r/1223935 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
733fb79b39
commit
418fc5338e
@@ -2628,6 +2628,15 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
|
|||||||
!skip_buffer_refcounting;
|
!skip_buffer_refcounting;
|
||||||
|
|
||||||
if (need_job_tracking) {
|
if (need_job_tracking) {
|
||||||
|
/*
|
||||||
|
* If the submit is to have deterministic latency and
|
||||||
|
* job tracking is required, the channel must have
|
||||||
|
* pre-allocated resources. Otherwise, we fail the submit here
|
||||||
|
*/
|
||||||
|
if ((flags & NVGPU_SUBMIT_GPFIFO_FLAGS_DETERMINISTIC) &&
|
||||||
|
!channel_gk20a_is_prealloc_enabled(c))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* gk20a_channel_update releases this ref. */
|
/* gk20a_channel_update releases this ref. */
|
||||||
err = gk20a_busy(g->dev);
|
err = gk20a_busy(g->dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
@@ -994,6 +994,8 @@ struct nvgpu_fence {
|
|||||||
#define NVGPU_SUBMIT_GPFIFO_FLAGS_SUPPRESS_WFI (1 << 4)
|
#define NVGPU_SUBMIT_GPFIFO_FLAGS_SUPPRESS_WFI (1 << 4)
|
||||||
/* skip buffer refcounting during submit */
|
/* skip buffer refcounting during submit */
|
||||||
#define NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING (1 << 5)
|
#define NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING (1 << 5)
|
||||||
|
/* submit should exhibit deterministic latency */
|
||||||
|
#define NVGPU_SUBMIT_GPFIFO_FLAGS_DETERMINISTIC (1 << 6)
|
||||||
|
|
||||||
struct nvgpu_submit_gpfifo_args {
|
struct nvgpu_submit_gpfifo_args {
|
||||||
__u64 gpfifo;
|
__u64 gpfifo;
|
||||||
|
|||||||
Reference in New Issue
Block a user