From 84f48df530a6ce0423920ebd8fd4e1dde52dd09f Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Wed, 7 Aug 2019 14:07:57 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/2167082 Reviewed-on: https://git-master.nvidia.com/r/2180581 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/submit.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/common/fifo') 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 @@ /* - * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -387,6 +388,7 @@ static int nvgpu_submit_channel_gpfifo(struct channel_gk20a *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 @@ -396,8 +398,9 @@ static int nvgpu_submit_channel_gpfifo(struct channel_gk20a *c, need_job_tracking = (flags & NVGPU_SUBMIT_FLAGS_FENCE_WAIT) || (flags & NVGPU_SUBMIT_FLAGS_FENCE_GET) || c->timeout.enabled || - (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; if (need_job_tracking) { -- cgit v1.2.2