diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-10-03 03:51:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-04 06:37:14 -0400 |
commit | 3cd0603c4218ee33eb1e5a36322b25d369ed487b (patch) | |
tree | 05f9ce31c00335e308841a454918ceec38e8c413 /drivers/gpu/nvgpu/gk20a | |
parent | e400475a915f73abb823b00945179eec470f73e0 (diff) |
gpu: nvgpu: verify channel status while closing per-platform
We right now call gk20a_fifo_tsg_unbind_channel_verify_status() to verify
channel status while unbinding a channel from TSG while closing
Add support to do this verification per-platform and keep this disabled
for vgpu platforms
Bug 200327095
Change-Id: I19fab41c74d10d528d22bd9b3982a4ed73c3b4ca
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1572368
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 7fc773f8..8e78b95e 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1908,7 +1908,7 @@ int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, | |||
1908 | return 0; | 1908 | return 0; |
1909 | } | 1909 | } |
1910 | 1910 | ||
1911 | static int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch) | 1911 | int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch) |
1912 | { | 1912 | { |
1913 | struct gk20a *g = ch->g; | 1913 | struct gk20a *g = ch->g; |
1914 | 1914 | ||
@@ -1939,9 +1939,11 @@ int gk20a_fifo_tsg_unbind_channel(struct channel_gk20a *ch) | |||
1939 | if (err) | 1939 | if (err) |
1940 | goto fail_enable_tsg; | 1940 | goto fail_enable_tsg; |
1941 | 1941 | ||
1942 | err = gk20a_fifo_tsg_unbind_channel_verify_status(ch); | 1942 | if (g->ops.fifo.tsg_verify_channel_status) { |
1943 | if (err) | 1943 | err = g->ops.fifo.tsg_verify_channel_status(ch); |
1944 | goto fail_enable_tsg; | 1944 | if (err) |
1945 | goto fail_enable_tsg; | ||
1946 | } | ||
1945 | 1947 | ||
1946 | /* Channel should be seen as TSG channel while updating runlist */ | 1948 | /* Channel should be seen as TSG channel while updating runlist */ |
1947 | err = channel_gk20a_update_runlist(ch, false); | 1949 | err = channel_gk20a_update_runlist(ch, false); |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index ceea21fa..68f53316 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -373,6 +373,7 @@ void gk20a_fifo_disable_channel(struct channel_gk20a *ch); | |||
373 | 373 | ||
374 | bool gk20a_fifo_channel_status_is_next(struct gk20a *g, u32 chid); | 374 | bool gk20a_fifo_channel_status_is_next(struct gk20a *g, u32 chid); |
375 | bool gk20a_fifo_channel_status_is_ctx_reload(struct gk20a *g, u32 chid); | 375 | bool gk20a_fifo_channel_status_is_ctx_reload(struct gk20a *g, u32 chid); |
376 | int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch); | ||
376 | 377 | ||
377 | struct channel_gk20a *gk20a_refch_from_inst_ptr(struct gk20a *g, u64 inst_ptr); | 378 | struct channel_gk20a *gk20a_refch_from_inst_ptr(struct gk20a *g, u64 inst_ptr); |
378 | void gk20a_fifo_channel_unbind(struct channel_gk20a *ch_gk20a); | 379 | void gk20a_fifo_channel_unbind(struct channel_gk20a *ch_gk20a); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index db38fae4..97b40474 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -491,6 +491,7 @@ struct gpu_ops { | |||
491 | int (*preempt_tsg)(struct gk20a *g, u32 tsgid); | 491 | int (*preempt_tsg)(struct gk20a *g, u32 tsgid); |
492 | int (*enable_tsg)(struct tsg_gk20a *tsg); | 492 | int (*enable_tsg)(struct tsg_gk20a *tsg); |
493 | int (*disable_tsg)(struct tsg_gk20a *tsg); | 493 | int (*disable_tsg)(struct tsg_gk20a *tsg); |
494 | int (*tsg_verify_channel_status)(struct channel_gk20a *ch); | ||
494 | void (*tsg_verify_status_ctx_reload)(struct channel_gk20a *ch); | 495 | void (*tsg_verify_status_ctx_reload)(struct channel_gk20a *ch); |
495 | void (*tsg_verify_status_faulted)(struct channel_gk20a *ch); | 496 | void (*tsg_verify_status_faulted)(struct channel_gk20a *ch); |
496 | int (*reschedule_runlist)(struct gk20a *g, u32 runlist_id); | 497 | int (*reschedule_runlist)(struct gk20a *g, u32 runlist_id); |