diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index b5d0572e..af40c969 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -58,7 +58,6 @@ struct dbg_profiler_object_data; | |||
58 | #include "pmu_gk20a.h" | 58 | #include "pmu_gk20a.h" |
59 | #include "priv_ring_gk20a.h" | 59 | #include "priv_ring_gk20a.h" |
60 | #include "therm_gk20a.h" | 60 | #include "therm_gk20a.h" |
61 | #include "platform_gk20a.h" | ||
62 | #include "gm20b/acr_gm20b.h" | 61 | #include "gm20b/acr_gm20b.h" |
63 | #include "cde_gk20a.h" | 62 | #include "cde_gk20a.h" |
64 | #include "debug_gk20a.h" | 63 | #include "debug_gk20a.h" |
@@ -1232,11 +1231,6 @@ static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) | |||
1232 | g->gr_idle_timeout_default : MAX_SCHEDULE_TIMEOUT; | 1231 | g->gr_idle_timeout_default : MAX_SCHEDULE_TIMEOUT; |
1233 | } | 1232 | } |
1234 | 1233 | ||
1235 | static inline struct gk20a *get_gk20a(struct device *dev) | ||
1236 | { | ||
1237 | return gk20a_get_platform(dev)->g; | ||
1238 | } | ||
1239 | |||
1240 | enum BAR0_DEBUG_OPERATION { | 1234 | enum BAR0_DEBUG_OPERATION { |
1241 | BARO_ZERO_NOP = 0, | 1235 | BARO_ZERO_NOP = 0, |
1242 | OP_END = 'DONE', | 1236 | OP_END = 'DONE', |
@@ -1352,17 +1346,6 @@ static inline u32 gk20a_bar1_readl(struct gk20a *g, u32 b) | |||
1352 | } | 1346 | } |
1353 | 1347 | ||
1354 | /* convenience */ | 1348 | /* convenience */ |
1355 | static inline struct device *dev_from_gk20a(struct gk20a *g) | ||
1356 | { | ||
1357 | return g->dev; | ||
1358 | } | ||
1359 | static inline struct gk20a *gk20a_from_dev(struct device *dev) | ||
1360 | { | ||
1361 | if (!dev) | ||
1362 | return NULL; | ||
1363 | |||
1364 | return ((struct gk20a_platform *)dev_get_drvdata(dev))->g; | ||
1365 | } | ||
1366 | static inline struct gk20a *gk20a_from_as(struct gk20a_as *as) | 1349 | static inline struct gk20a *gk20a_from_as(struct gk20a_as *as) |
1367 | { | 1350 | { |
1368 | return container_of(as, struct gk20a, as); | 1351 | return container_of(as, struct gk20a, as); |
@@ -1418,23 +1401,6 @@ enum { | |||
1418 | KEPLER_CHANNEL_GPFIFO_C = 0xA26F, | 1401 | KEPLER_CHANNEL_GPFIFO_C = 0xA26F, |
1419 | }; | 1402 | }; |
1420 | 1403 | ||
1421 | static inline bool gk20a_gpu_is_virtual(struct device *dev) | ||
1422 | { | ||
1423 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
1424 | |||
1425 | return platform->virtual_dev; | ||
1426 | } | ||
1427 | |||
1428 | static inline int support_gk20a_pmu(struct device *dev) | ||
1429 | { | ||
1430 | if (IS_ENABLED(CONFIG_GK20A_PMU)) { | ||
1431 | /* gPMU is not supported for vgpu */ | ||
1432 | return !gk20a_gpu_is_virtual(dev); | ||
1433 | } | ||
1434 | |||
1435 | return 0; | ||
1436 | } | ||
1437 | |||
1438 | void gk20a_create_sysfs(struct device *dev); | 1404 | void gk20a_create_sysfs(struct device *dev); |
1439 | void gk20a_remove_sysfs(struct device *dev); | 1405 | void gk20a_remove_sysfs(struct device *dev); |
1440 | 1406 | ||