mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu :nvgpu : Add waiter index in syncpt_wait_ext
Allocated the following two waiter objects for sync point waith path: Job tracking and CE threads. 2. QNX channel specific job tracking thread. The above implementation is only available for QNX. For Linux, waiter index is skipped. JIRA NVGPU-3009 Change-Id: If12ad1dc90a24a7b922b205829ca335805c02c3d Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292080 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Shashank Singh <shashsingh@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
14ce94df43
commit
e445d08022
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2020, 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"),
|
||||
@@ -261,7 +261,7 @@ static int nvgpu_fence_syncpt_wait(struct nvgpu_fence_type *f, u32 timeout)
|
||||
{
|
||||
return nvgpu_nvhost_syncpt_wait_timeout_ext(
|
||||
f->nvhost_dev, f->syncpt_id, f->syncpt_value,
|
||||
timeout);
|
||||
timeout, NVGPU_NVHOST_DEFAULT_WAITER);
|
||||
}
|
||||
|
||||
static bool nvgpu_fence_syncpt_is_expired(struct nvgpu_fence_type *f)
|
||||
|
||||
@@ -72,6 +72,14 @@ int nvgpu_get_nvhost_dev(struct gk20a *g);
|
||||
void nvgpu_free_nvhost_dev(struct gk20a *g);
|
||||
|
||||
#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT
|
||||
/**
|
||||
* Available waiter index is used for sync point wait path.
|
||||
* Maximum supported waiter count is 2U.
|
||||
*/
|
||||
#define NVGPU_NVHOST_DEFAULT_WAITER 0U
|
||||
#define NVGPU_NVHOST_WAITER_1 1U
|
||||
#define NVGPU_NVHOST_MAX_WAITER_COUNT 2U
|
||||
|
||||
int nvgpu_nvhost_module_busy_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev);
|
||||
void nvgpu_nvhost_module_idle_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev);
|
||||
|
||||
@@ -84,7 +92,7 @@ int nvgpu_nvhost_intr_register_notifier(struct nvgpu_nvhost_dev *nvgpu_syncpt_de
|
||||
bool nvgpu_nvhost_syncpt_is_expired_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 thresh);
|
||||
int nvgpu_nvhost_syncpt_wait_timeout_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 thresh, u32 timeout);
|
||||
u32 id, u32 thresh, u32 timeout, u32 waiter_index);
|
||||
|
||||
u32 nvgpu_nvhost_syncpt_incr_max_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 incrs);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -149,7 +149,7 @@ u32 nvgpu_nvhost_get_syncpt_client_managed(
|
||||
|
||||
int nvgpu_nvhost_syncpt_wait_timeout_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id,
|
||||
u32 thresh, u32 timeout)
|
||||
u32 thresh, u32 timeout, u32 waiter_index)
|
||||
{
|
||||
return nvhost_syncpt_wait_timeout_ext(nvhost_dev->host1x_pdev,
|
||||
id, thresh, timeout, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user