mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
Move init_ce_engine_info from fifo to hal/engine unit as implementation is chip specific. Rename init_ce_engine_info to init_ce_info Rename gp10b_fifo_init_ce_engine_info to gp10b_engine_init_ce_info Rename gm20b_fifo_init_ce_engine_info to gm20b_engine_init_ce_info JIRA NVGPU-1313 Change-Id: Idb9ba3f2550eff6bbe7163d12e48086f47d3f319 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2085427 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
61 lines
2.1 KiB
C
61 lines
2.1 KiB
C
/*
|
|
* GM20B Fifo
|
|
*
|
|
* Copyright (c) 2014-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"),
|
|
* 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.
|
|
*/
|
|
|
|
#include <nvgpu/timers.h>
|
|
#include <nvgpu/log.h>
|
|
#include <nvgpu/atomic.h>
|
|
#include <nvgpu/barrier.h>
|
|
#include <nvgpu/mm.h>
|
|
#include <nvgpu/enabled.h>
|
|
#include <nvgpu/io.h>
|
|
#include <nvgpu/bug.h>
|
|
#include <nvgpu/gk20a.h>
|
|
#include <nvgpu/channel.h>
|
|
#include <nvgpu/top.h>
|
|
#include <nvgpu/engines.h>
|
|
|
|
#include "gk20a/fifo_gk20a.h"
|
|
#include "fifo_gm20b.h"
|
|
|
|
void gm20b_fifo_tsg_verify_status_ctx_reload(struct channel_gk20a *ch)
|
|
{
|
|
struct gk20a *g = ch->g;
|
|
struct tsg_gk20a *tsg = &g->fifo.tsg[ch->tsgid];
|
|
struct channel_gk20a *temp_ch;
|
|
struct nvgpu_channel_hw_state hw_state;
|
|
|
|
/* If CTX_RELOAD is set on a channel, move it to some other channel */
|
|
g->ops.channel.read_state(g, ch, &hw_state);
|
|
if (hw_state.ctx_reload) {
|
|
nvgpu_rwsem_down_read(&tsg->ch_list_lock);
|
|
nvgpu_list_for_each_entry(temp_ch, &tsg->ch_list, channel_gk20a, ch_entry) {
|
|
if (temp_ch->chid != ch->chid) {
|
|
g->ops.channel.force_ctx_reload(temp_ch);
|
|
break;
|
|
}
|
|
}
|
|
nvgpu_rwsem_up_read(&tsg->ch_list_lock);
|
|
}
|
|
}
|