gpu: nvgpu: use vpr resize enabled API

This patch adds nvgpu API in linux and posix to query vpr resize.
The new API nvgpu_is_vpr_resize_enabled() is used in
nvgpu_submit_channel_gpfifo().
Previously, if non-deterministic channel has timeout disabled and
GPU cannot railgate on some platform, then channel doesn't power ref
count and results in video freeze. To resolve non-determinstic channel
job tracking needs to be enabled if vpr resize is supported or if GPU
can railgate.

Bug 200532122

Change-Id: Icfbff6253762b195b2f5955749343974b1a7a269
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2171093
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2019-08-12 11:58:59 -07:00
committed by mobile promotions
parent 5e88e7d931
commit 7bc3cdcf95
9 changed files with 89 additions and 5 deletions

View File

@@ -30,6 +30,7 @@
#include <nvgpu/bug.h>
#include <nvgpu/fence.h>
#include <nvgpu/profile.h>
#include <nvgpu/vpr.h>
#ifdef CONFIG_NVGPU_TRACE
#include <trace/events/gk20a.h>
@@ -405,6 +406,7 @@ static int nvgpu_submit_channel_gpfifo(struct nvgpu_channel *c,
* - pre- or post-fence functionality
* - channel wdt
* - GPU rail-gating with non-deterministic channels
* - VPR resize enabled with non-deterministic channels
* - buffer refcounting
*
* If none of the conditions are met, then job tracking is not
@@ -413,8 +415,9 @@ static int nvgpu_submit_channel_gpfifo(struct nvgpu_channel *c,
*/
need_job_tracking = (flag_fence_wait ||
flag_fence_get ||
(nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE)
&& !c->deterministic) ||
((nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE) ||
nvgpu_is_vpr_resize_enabled()) &&
!c->deterministic) ||
!skip_buffer_refcounting);
#ifdef CONFIG_NVGPU_CHANNEL_WDT