mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Remove global gk20a_device
Remove static variable gk20a_device which held a pointer to struct device. nvgpu can serve multiple GPUs, so a static pointer does not work. Change-Id: I79faf5c26658490c955a9b15137e5f671650fd28 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1123940 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com>
This commit is contained in:
@@ -32,7 +32,6 @@
|
|||||||
#include "hw_pbdma_gk20a.h"
|
#include "hw_pbdma_gk20a.h"
|
||||||
|
|
||||||
unsigned int gk20a_debug_trace_cmdbuf;
|
unsigned int gk20a_debug_trace_cmdbuf;
|
||||||
static struct device *gk20a_device;
|
|
||||||
|
|
||||||
struct ch_state {
|
struct ch_state {
|
||||||
int pid;
|
int pid;
|
||||||
@@ -336,12 +335,13 @@ void gk20a_debug_dump_device(void *data)
|
|||||||
.fn = gk20a_debug_write_printk
|
.fn = gk20a_debug_write_printk
|
||||||
};
|
};
|
||||||
struct gk20a *g;
|
struct gk20a *g;
|
||||||
|
struct device *dev = data;
|
||||||
|
|
||||||
/* In pre-silicon we don't need full spew on stuck syncpoint */
|
/* In pre-silicon we don't need full spew on stuck syncpoint */
|
||||||
if (!tegra_platform_is_silicon())
|
if (!tegra_platform_is_silicon())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g = gk20a_from_dev(gk20a_device);
|
g = gk20a_from_dev(dev);
|
||||||
/* HAL only initialized after 1st power-on */
|
/* HAL only initialized after 1st power-on */
|
||||||
if (g->ops.debug.show_dump)
|
if (g->ops.debug.show_dump)
|
||||||
g->ops.debug.show_dump(g, &o);
|
g->ops.debug.show_dump(g, &o);
|
||||||
@@ -397,10 +397,6 @@ void gk20a_debug_init(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
||||||
|
|
||||||
/* Store the first device */
|
|
||||||
if (!gk20a_device)
|
|
||||||
gk20a_device = dev;
|
|
||||||
|
|
||||||
platform->debugfs = debugfs_create_dir(dev_name(dev), NULL);
|
platform->debugfs = debugfs_create_dir(dev_name(dev), NULL);
|
||||||
if (platform->debugfs) {
|
if (platform->debugfs) {
|
||||||
platform->debugfs_alias =
|
platform->debugfs_alias =
|
||||||
|
|||||||
Reference in New Issue
Block a user