diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-02-28 06:08:50 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-01 16:53:24 -0500 |
commit | aa1da74a75aca5d85d1a78546fec381423bf5836 (patch) | |
tree | 199bdcf12bb98392675daff69a5c04919584a9b6 | |
parent | abe829338c128d18fd2c7af3387a537f55abd24d (diff) |
Revert "gpu: nvgpu: support user fence updates"
This reverts commit 0c46f8a5e112c08c172ee2c692832e1753ffbcce.
We should not support tracking of MAX/threshold value for syncpoint allocated
by user space
Hence revert this patch
Bug 200326065
Jira NVGPU-179
Change-Id: I2df8f8c13fdac91c0814b11a2b7dee30153409d4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1665827
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/channel.c | 22 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/nvgpu.h | 2 |
4 files changed, 1 insertions, 41 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/channel.c b/drivers/gpu/nvgpu/common/linux/channel.c index 35fb3023..a725cd6b 100644 --- a/drivers/gpu/nvgpu/common/linux/channel.c +++ b/drivers/gpu/nvgpu/common/linux/channel.c | |||
@@ -720,8 +720,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
720 | return -EINVAL; | 720 | return -EINVAL; |
721 | 721 | ||
722 | if ((flags & (NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT | | 722 | if ((flags & (NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT | |
723 | NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_GET | | 723 | NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_GET)) && |
724 | NVGPU_SUBMIT_GPFIFO_FLAGS_USER_FENCE_UPDATE)) && | ||
725 | !fence) | 724 | !fence) |
726 | return -EINVAL; | 725 | return -EINVAL; |
727 | 726 | ||
@@ -758,16 +757,6 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
758 | (g->can_railgate && !c->deterministic) || | 757 | (g->can_railgate && !c->deterministic) || |
759 | !skip_buffer_refcounting; | 758 | !skip_buffer_refcounting; |
760 | 759 | ||
761 | /* | ||
762 | * If User is adding increments to the pushbuffer and doing all job | ||
763 | * tracking, then no need for kernel tracking here | ||
764 | * User should ensure that all pre-requisites for fast submit are met | ||
765 | * Fail the submit if that's not the case | ||
766 | */ | ||
767 | if (need_job_tracking && | ||
768 | (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_USER_FENCE_UPDATE)) | ||
769 | return -EINVAL; | ||
770 | |||
771 | if (need_job_tracking) { | 760 | if (need_job_tracking) { |
772 | bool need_sync_framework = false; | 761 | bool need_sync_framework = false; |
773 | 762 | ||
@@ -879,15 +868,6 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
879 | goto clean_up; | 868 | goto clean_up; |
880 | } | 869 | } |
881 | 870 | ||
882 | if (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_USER_FENCE_UPDATE) { | ||
883 | /* | ||
884 | * User space adds increments in the pushbuffer, so just | ||
885 | * handle the threshold book keeping in kernel by adding | ||
886 | * number of syncpoint increments to threshold | ||
887 | */ | ||
888 | c->sync->add_user_incrs(c->sync, fence->value); | ||
889 | } | ||
890 | |||
891 | if (need_job_tracking) { | 871 | if (need_job_tracking) { |
892 | err = channel_gk20a_alloc_job(c, &job); | 872 | err = channel_gk20a_alloc_job(c, &job); |
893 | if (err) | 873 | if (err) |
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 18d61faa..e965a329 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -301,13 +301,6 @@ static u64 gk20a_channel_syncpt_address(struct gk20a_channel_sync *s) | |||
301 | return sp->syncpt_buf.gpu_va; | 301 | return sp->syncpt_buf.gpu_va; |
302 | } | 302 | } |
303 | 303 | ||
304 | static u32 gk20a_channel_add_user_incrs(struct gk20a_channel_sync *s, u32 val) | ||
305 | { | ||
306 | struct gk20a_channel_syncpt *sp = | ||
307 | container_of(s, struct gk20a_channel_syncpt, ops); | ||
308 | return nvgpu_nvhost_syncpt_incr_max_ext(sp->nvhost_dev, sp->id, val); | ||
309 | } | ||
310 | |||
311 | static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s) | 304 | static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s) |
312 | { | 305 | { |
313 | struct gk20a_channel_syncpt *sp = | 306 | struct gk20a_channel_syncpt *sp = |
@@ -360,7 +353,6 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c) | |||
360 | sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline; | 353 | sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline; |
361 | sp->ops.syncpt_id = gk20a_channel_syncpt_id; | 354 | sp->ops.syncpt_id = gk20a_channel_syncpt_id; |
362 | sp->ops.syncpt_address = gk20a_channel_syncpt_address; | 355 | sp->ops.syncpt_address = gk20a_channel_syncpt_address; |
363 | sp->ops.add_user_incrs = gk20a_channel_add_user_incrs; | ||
364 | sp->ops.destroy = gk20a_channel_syncpt_destroy; | 356 | sp->ops.destroy = gk20a_channel_syncpt_destroy; |
365 | 357 | ||
366 | return &sp->ops; | 358 | return &sp->ops; |
@@ -886,12 +878,6 @@ static u64 gk20a_channel_semaphore_syncpt_address(struct gk20a_channel_sync *s) | |||
886 | return 0; | 878 | return 0; |
887 | } | 879 | } |
888 | 880 | ||
889 | static u32 gk20a_channel_semaphore_add_user_incrs(struct gk20a_channel_sync *s, | ||
890 | u32 val) | ||
891 | { | ||
892 | return 0; | ||
893 | } | ||
894 | |||
895 | static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s) | 881 | static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s) |
896 | { | 882 | { |
897 | struct gk20a_channel_semaphore *sema = | 883 | struct gk20a_channel_semaphore *sema = |
@@ -944,7 +930,6 @@ gk20a_channel_semaphore_create(struct channel_gk20a *c) | |||
944 | sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline; | 930 | sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline; |
945 | sema->ops.syncpt_id = gk20a_channel_semaphore_syncpt_id; | 931 | sema->ops.syncpt_id = gk20a_channel_semaphore_syncpt_id; |
946 | sema->ops.syncpt_address = gk20a_channel_semaphore_syncpt_address; | 932 | sema->ops.syncpt_address = gk20a_channel_semaphore_syncpt_address; |
947 | sema->ops.add_user_incrs = gk20a_channel_semaphore_add_user_incrs; | ||
948 | sema->ops.destroy = gk20a_channel_semaphore_destroy; | 933 | sema->ops.destroy = gk20a_channel_semaphore_destroy; |
949 | 934 | ||
950 | return &sema->ops; | 935 | return &sema->ops; |
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h index c80ebd38..fe1d8526 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | |||
@@ -105,9 +105,6 @@ struct gk20a_channel_sync { | |||
105 | /* Returns the sync point address of sync point or 0 if not supported */ | 105 | /* Returns the sync point address of sync point or 0 if not supported */ |
106 | u64 (*syncpt_address)(struct gk20a_channel_sync *s); | 106 | u64 (*syncpt_address)(struct gk20a_channel_sync *s); |
107 | 107 | ||
108 | /* Handle user added increments in the push buffer */ | ||
109 | u32 (*add_user_incrs)(struct gk20a_channel_sync *s, u32 val); | ||
110 | |||
111 | /* Free the resources allocated by gk20a_channel_sync_create. */ | 108 | /* Free the resources allocated by gk20a_channel_sync_create. */ |
112 | void (*destroy)(struct gk20a_channel_sync *s); | 109 | void (*destroy)(struct gk20a_channel_sync *s); |
113 | }; | 110 | }; |
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 18168158..cf75595a 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -1478,8 +1478,6 @@ struct nvgpu_fence { | |||
1478 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING (1 << 5) | 1478 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING (1 << 5) |
1479 | /* expire current timeslice and reschedule runlist from front */ | 1479 | /* expire current timeslice and reschedule runlist from front */ |
1480 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_RESCHEDULE_RUNLIST (1 << 6) | 1480 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_RESCHEDULE_RUNLIST (1 << 6) |
1481 | /* user space has added syncpoint increments in the pushbuffer */ | ||
1482 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_USER_FENCE_UPDATE (1 << 7) | ||
1483 | 1481 | ||
1484 | struct nvgpu_submit_gpfifo_args { | 1482 | struct nvgpu_submit_gpfifo_args { |
1485 | __u64 gpfifo; | 1483 | __u64 gpfifo; |