mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
Add new unit common/gr/subctx.c to manage GR subcontext This unit provides interfaces to allocate/free/load GR subcontext Add new header file include/nvgpu/gr/subctx.h to declare all the interfaces. Right now channel_gk20a structure directly includes a nvgpu_mem for context header. Declare a new structure nvgpu_gr_subctx for subcontext and include this from channel_gk20a Make all necessary changes to refer ctx_header from subctx instead of directly referencing it from channel Jira NVGPU-1613 Change-Id: I9eb1ee8f26fa88d2881f9b294935b65e9cbcc9b4 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1990129 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
35 lines
1.4 KiB
C
35 lines
1.4 KiB
C
/*
|
|
*
|
|
* Volta GPU series Subcontext
|
|
*
|
|
* Copyright (c) 2016 - 2018, 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"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
#ifndef NVGPU_SUBCTX_GV11B_H
|
|
#define NVGPU_SUBCTX_GV11B_H
|
|
|
|
void gv11b_free_subctx_header(struct channel_gk20a *c);
|
|
|
|
void gv11b_init_subcontext_pdb(struct vm_gk20a *vm,
|
|
struct nvgpu_mem *inst_block,
|
|
bool replayable);
|
|
|
|
#endif /* NVGPU_SUBCTX_GV11B_H */
|