mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: move init_ltc_support sequence
Currently, ltc fs_state is initialized during ltc init support. However, ltc cbc_param and cbc_param2 registers do not seem to be providing correct data if ltc.init_fs_state is called before fb.init_fs_state. - Create fb.init_fb_support hal to initialize fb. - Trigger init_fb_support before init_ltc_support. Bug 2969956 Bug 2957808 JIRA NVGPU-4666 Change-Id: I54d697d27b9d9c6318c4ef459d215b6f82cd5571 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2345673 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
32bdf8cc2d
commit
fc5b45ea83
@@ -483,6 +483,12 @@ gr:
|
|||||||
sources: [ common/gr/gr_ecc.c,
|
sources: [ common/gr/gr_ecc.c,
|
||||||
include/nvgpu/gr/gr_ecc.h ]
|
include/nvgpu/gr/gr_ecc.h ]
|
||||||
|
|
||||||
|
fb:
|
||||||
|
safe: yes
|
||||||
|
owner: Vedashree V
|
||||||
|
sources: [ common/fb/fb.c,
|
||||||
|
include/nvgpu/fb.h ]
|
||||||
|
|
||||||
fbp:
|
fbp:
|
||||||
safe: yes
|
safe: yes
|
||||||
owner: Deepak N
|
owner: Deepak N
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ nvgpu-y += \
|
|||||||
common/semaphore/semaphore.o \
|
common/semaphore/semaphore.o \
|
||||||
common/regops/regops.o \
|
common/regops/regops.o \
|
||||||
common/ltc/ltc.o \
|
common/ltc/ltc.o \
|
||||||
|
common/fb/fb.o \
|
||||||
common/fbp/fbp.o \
|
common/fbp/fbp.o \
|
||||||
common/gr/gr_utils.o \
|
common/gr/gr_utils.o \
|
||||||
common/gr/gr.o \
|
common/gr/gr.o \
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ srcs += common/utils/enabled.c \
|
|||||||
common/mm/dma.c \
|
common/mm/dma.c \
|
||||||
common/therm/therm.c \
|
common/therm/therm.c \
|
||||||
common/ltc/ltc.c \
|
common/ltc/ltc.c \
|
||||||
|
common/fb/fb.c \
|
||||||
common/fbp/fbp.c \
|
common/fbp/fbp.c \
|
||||||
common/io/io.c \
|
common/io/io.c \
|
||||||
common/ecc.c \
|
common/ecc.c \
|
||||||
|
|||||||
42
drivers/gpu/nvgpu/common/fb/fb.c
Normal file
42
drivers/gpu/nvgpu/common/fb/fb.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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"),
|
||||||
|
* 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/gk20a.h>
|
||||||
|
#include <nvgpu/power_features/cg.h>
|
||||||
|
#include <nvgpu/gops_fb.h>
|
||||||
|
#include <nvgpu/fb.h>
|
||||||
|
|
||||||
|
int nvgpu_init_fb_support(struct gk20a *g)
|
||||||
|
{
|
||||||
|
if (g->ops.mc.fb_reset != NULL) {
|
||||||
|
g->ops.mc.fb_reset(g);
|
||||||
|
}
|
||||||
|
|
||||||
|
nvgpu_cg_slcg_fb_ltc_load_enable(g);
|
||||||
|
|
||||||
|
nvgpu_cg_blcg_fb_ltc_load_enable(g);
|
||||||
|
|
||||||
|
if (g->ops.fb.init_fs_state != NULL) {
|
||||||
|
g->ops.fb.init_fs_state(g);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
#include <nvgpu/gops_mc.h>
|
#include <nvgpu/gops_mc.h>
|
||||||
#include <nvgpu/trace.h>
|
#include <nvgpu/trace.h>
|
||||||
#include <nvgpu/nvhost.h>
|
#include <nvgpu/nvhost.h>
|
||||||
|
#include <nvgpu/fb.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NVGPU_LS_PMU
|
#ifdef CONFIG_NVGPU_LS_PMU
|
||||||
#include <nvgpu/pmu/pmu_pstate.h>
|
#include <nvgpu/pmu/pmu_pstate.h>
|
||||||
@@ -617,6 +618,7 @@ int nvgpu_finalize_poweron(struct gk20a *g)
|
|||||||
NVGPU_INIT_TABLE_ENTRY(&nvgpu_init_fb_mem_unlock, NO_FLAG),
|
NVGPU_INIT_TABLE_ENTRY(&nvgpu_init_fb_mem_unlock, NO_FLAG),
|
||||||
#endif
|
#endif
|
||||||
NVGPU_INIT_TABLE_ENTRY(g->ops.fifo.reset_enable_hw, NO_FLAG),
|
NVGPU_INIT_TABLE_ENTRY(g->ops.fifo.reset_enable_hw, NO_FLAG),
|
||||||
|
NVGPU_INIT_TABLE_ENTRY(&nvgpu_init_fb_support, NO_FLAG),
|
||||||
NVGPU_INIT_TABLE_ENTRY(g->ops.ltc.init_ltc_support, NO_FLAG),
|
NVGPU_INIT_TABLE_ENTRY(g->ops.ltc.init_ltc_support, NO_FLAG),
|
||||||
NVGPU_INIT_TABLE_ENTRY(g->ops.mm.init_mm_support, NO_FLAG),
|
NVGPU_INIT_TABLE_ENTRY(g->ops.mm.init_mm_support, NO_FLAG),
|
||||||
NVGPU_INIT_TABLE_ENTRY(g->ops.fifo.fifo_init_support, NO_FLAG),
|
NVGPU_INIT_TABLE_ENTRY(g->ops.fifo.fifo_init_support, NO_FLAG),
|
||||||
|
|||||||
@@ -321,21 +321,6 @@ void nvgpu_init_mm_ce_context(struct gk20a *g)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void nvgpu_init_mm_reset_enable_hw(struct gk20a *g)
|
|
||||||
{
|
|
||||||
if (g->ops.mc.fb_reset != NULL) {
|
|
||||||
g->ops.mc.fb_reset(g);
|
|
||||||
}
|
|
||||||
|
|
||||||
nvgpu_cg_slcg_fb_ltc_load_enable(g);
|
|
||||||
|
|
||||||
nvgpu_cg_blcg_fb_ltc_load_enable(g);
|
|
||||||
|
|
||||||
if (g->ops.fb.init_fs_state != NULL) {
|
|
||||||
g->ops.fb.init_fs_state(g);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int nvgpu_init_bar1_vm(struct mm_gk20a *mm)
|
static int nvgpu_init_bar1_vm(struct mm_gk20a *mm)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
@@ -652,8 +637,6 @@ int nvgpu_init_mm_support(struct gk20a *g)
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
nvgpu_init_mm_reset_enable_hw(g);
|
|
||||||
|
|
||||||
#ifdef CONFIG_NVGPU_DGPU
|
#ifdef CONFIG_NVGPU_DGPU
|
||||||
err = nvgpu_init_mm_pdb_cache_war(g);
|
err = nvgpu_init_mm_pdb_cache_war(g);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ void fb_gm20b_init_fs_state(struct gk20a *g)
|
|||||||
nvgpu_log_info(g, "initialize gm20b fb");
|
nvgpu_log_info(g, "initialize gm20b fb");
|
||||||
|
|
||||||
gk20a_writel(g, fb_fbhub_num_active_ltcs_r(),
|
gk20a_writel(g, fb_fbhub_num_active_ltcs_r(),
|
||||||
nvgpu_ltc_get_ltc_count(g));
|
g->ops.priv_ring.enum_ltc(g));
|
||||||
|
|
||||||
if (!nvgpu_is_enabled(g, NVGPU_SEC_PRIVSECURITY)) {
|
if (!nvgpu_is_enabled(g, NVGPU_SEC_PRIVSECURITY)) {
|
||||||
/* Bypass MMU check for non-secure boot. For
|
/* Bypass MMU check for non-secure boot. For
|
||||||
|
|||||||
39
drivers/gpu/nvgpu/include/nvgpu/fb.h
Normal file
39
drivers/gpu/nvgpu/include/nvgpu/fb.h
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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"),
|
||||||
|
* 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_FB_H
|
||||||
|
#define NVGPU_FB_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes the FB unit.
|
||||||
|
*
|
||||||
|
* @param g [in] The GPU.
|
||||||
|
*
|
||||||
|
* - Request common/power_features/cg to load the prod values for
|
||||||
|
* slcg and blcg.
|
||||||
|
* - Initializes the fbhub mmu.
|
||||||
|
*
|
||||||
|
* @return 0 in case of success, < 0 in case of failure.
|
||||||
|
*/
|
||||||
|
int nvgpu_init_fb_support(struct gk20a *g);
|
||||||
|
|
||||||
|
#endif /* NVGPU_FB_H */
|
||||||
@@ -58,9 +58,6 @@ struct gops_mm {
|
|||||||
* @param g [in] The GPU.
|
* @param g [in] The GPU.
|
||||||
*
|
*
|
||||||
* MM init:
|
* MM init:
|
||||||
* - Request common.fb and common.ltc to load the prod values for
|
|
||||||
* slcg and blcg.
|
|
||||||
* - Initializes the fbhub mmu.
|
|
||||||
* - MM S/W init:
|
* - MM S/W init:
|
||||||
* - Resets the current pramin window index to 0.
|
* - Resets the current pramin window index to 0.
|
||||||
* - Initializes the vidmem page allocator with size, flags and etc.
|
* - Initializes the vidmem page allocator with size, flags and etc.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -520,9 +520,6 @@ void nvgpu_init_mm_ce_context(struct gk20a *g);
|
|||||||
* @param g [in] The GPU.
|
* @param g [in] The GPU.
|
||||||
*
|
*
|
||||||
* MM init:
|
* MM init:
|
||||||
* - Request common.fb and common.ltc to load the prod values for
|
|
||||||
* slcg and blcg.
|
|
||||||
* - Initializes the fbhub mmu.
|
|
||||||
* - MM S/W init:
|
* - MM S/W init:
|
||||||
* - Resets the current pramin window index to 0.
|
* - Resets the current pramin window index to 0.
|
||||||
* - Initializes the vidmem page allocator with size, flags and etc.
|
* - Initializes the vidmem page allocator with size, flags and etc.
|
||||||
|
|||||||
@@ -522,6 +522,7 @@ nvgpu_gr_suspend
|
|||||||
nvgpu_gr_sw_ready
|
nvgpu_gr_sw_ready
|
||||||
nvgpu_has_syncpoints
|
nvgpu_has_syncpoints
|
||||||
nvgpu_init_enabled_flags
|
nvgpu_init_enabled_flags
|
||||||
|
nvgpu_init_fb_support
|
||||||
nvgpu_init_hal
|
nvgpu_init_hal
|
||||||
nvgpu_init_ltc_support
|
nvgpu_init_ltc_support
|
||||||
nvgpu_init_mm_support
|
nvgpu_init_mm_support
|
||||||
|
|||||||
Reference in New Issue
Block a user