summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
index e9a73baf..be999930 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
@@ -53,23 +53,18 @@ static inline struct vgpu_priv_data *vgpu_get_priv_data(struct gk20a *g)
53 return vgpu_get_priv_data_from_dev(dev_from_gk20a(g)); 53 return vgpu_get_priv_data_from_dev(dev_from_gk20a(g));
54} 54}
55 55
56static inline u64 vgpu_get_handle_from_dev(struct device *dev) 56static inline u64 vgpu_get_handle(struct gk20a *g)
57{ 57{
58 struct vgpu_priv_data *priv = vgpu_get_priv_data_from_dev(dev); 58 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
59 59
60 if (unlikely(!priv)) { 60 if (unlikely(!priv)) {
61 dev_err(dev, "invalid vgpu_priv_data in %s\n", __func__); 61 nvgpu_err(g, "invalid vgpu_priv_data in %s", __func__);
62 return INT_MAX; 62 return INT_MAX;
63 } 63 }
64 64
65 return priv->virt_handle; 65 return priv->virt_handle;
66} 66}
67 67
68static inline u64 vgpu_get_handle(struct gk20a *g)
69{
70 return vgpu_get_handle_from_dev(dev_from_gk20a(g));
71}
72
73int vgpu_pm_prepare_poweroff(struct device *dev); 68int vgpu_pm_prepare_poweroff(struct device *dev);
74int vgpu_pm_finalize_poweron(struct device *dev); 69int vgpu_pm_finalize_poweron(struct device *dev);
75int vgpu_probe(struct platform_device *dev); 70int vgpu_probe(struct platform_device *dev);