summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fifo/submit.c
diff options
context:
space:
mode:
authorVedashree Vidwans <vvidwans@nvidia.com>2019-08-07 17:07:57 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2019-08-30 04:24:52 -0400
commit84f48df530a6ce0423920ebd8fd4e1dde52dd09f (patch)
tree71c596e18d0e8e35f1cdb6d6fe3f641a216c7203 /drivers/gpu/nvgpu/common/fifo/submit.c
parent6500ce7581b7fa2360657a8e58d327e0cf311f25 (diff)
gpu: nvgpu: use vpr resize API
This patch adds nvgpu API in linux and qnx 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. This requires non-determinstic channel job tracking 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/2167082 Reviewed-on: https://git-master.nvidia.com/r/2180581 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/fifo/submit.c')
-rw-r--r--drivers/gpu/nvgpu/common/fifo/submit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/fifo/submit.c b/drivers/gpu/nvgpu/common/fifo/submit.c
index 4effc663..d518fbfb 100644
--- a/drivers/gpu/nvgpu/common/fifo/submit.c
+++ b/drivers/gpu/nvgpu/common/fifo/submit.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -26,6 +26,7 @@
26#include <nvgpu/os_sched.h> 26#include <nvgpu/os_sched.h>
27#include <nvgpu/utils.h> 27#include <nvgpu/utils.h>
28#include <nvgpu/channel_sync.h> 28#include <nvgpu/channel_sync.h>
29#include <nvgpu/vpr.h>
29 30
30#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h> 31#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h>
31 32
@@ -387,6 +388,7 @@ static int nvgpu_submit_channel_gpfifo(struct channel_gk20a *c,
387 * - pre- or post-fence functionality 388 * - pre- or post-fence functionality
388 * - channel wdt 389 * - channel wdt
389 * - GPU rail-gating with non-deterministic channels 390 * - GPU rail-gating with non-deterministic channels
391 * - VPR resize enabled with non-deterministic channels
390 * - buffer refcounting 392 * - buffer refcounting
391 * 393 *
392 * If none of the conditions are met, then job tracking is not 394 * If none of the conditions are met, then job tracking is not
@@ -396,8 +398,9 @@ static int nvgpu_submit_channel_gpfifo(struct channel_gk20a *c,
396 need_job_tracking = (flags & NVGPU_SUBMIT_FLAGS_FENCE_WAIT) || 398 need_job_tracking = (flags & NVGPU_SUBMIT_FLAGS_FENCE_WAIT) ||
397 (flags & NVGPU_SUBMIT_FLAGS_FENCE_GET) || 399 (flags & NVGPU_SUBMIT_FLAGS_FENCE_GET) ||
398 c->timeout.enabled || 400 c->timeout.enabled ||
399 (nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE) 401 ((nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE) ||
400 && !c->deterministic) || 402 nvgpu_is_vpr_resize_enabled()) &&
403 !c->deterministic) ||
401 !skip_buffer_refcounting; 404 !skip_buffer_refcounting;
402 405
403 if (need_job_tracking) { 406 if (need_job_tracking) {