mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: split away power node removal
Presently, gk20a_user_deinit is used to remove all device nodes including "power" node as well. Split removal of power node into a separate function gk20a_power_node_deinit to enable other device removal during the normal runtime_suspend path to facilitate the fast path for MIG reconfiguration. Powernode can be removed only during a call to Rmmod. This also enables separately powering off the device nodes in the unlikely case of a poweron failure. Bug 3308828 Jira NVGPU-6920 Change-Id: Ib045a09a992a63c468492a837b273cca41e20f15 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2543014 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Dinesh T <dt@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a1d0957a9b
commit
8f9ac1dea9
@@ -21,10 +21,25 @@
|
||||
struct device;
|
||||
struct class;
|
||||
|
||||
struct nvgpu_class {
|
||||
struct class *class;
|
||||
struct nvgpu_list_node list_entry;
|
||||
|
||||
struct nvgpu_cdev_class_priv_data *priv_data;
|
||||
|
||||
enum nvgpu_mig_gpu_instance_type instance_type;
|
||||
bool power_node;
|
||||
};
|
||||
|
||||
static inline struct class *nvgpu_class_get_class(struct nvgpu_class *class)
|
||||
{
|
||||
return class->class;
|
||||
}
|
||||
|
||||
struct nvgpu_cdev {
|
||||
struct cdev cdev;
|
||||
struct device *node;
|
||||
struct class *class;
|
||||
struct nvgpu_class *class;
|
||||
struct nvgpu_list_node list_entry;
|
||||
};
|
||||
|
||||
@@ -43,16 +58,6 @@ struct nvgpu_cdev_class_priv_data {
|
||||
bool pci;
|
||||
};
|
||||
|
||||
struct nvgpu_class {
|
||||
struct class *class;
|
||||
struct nvgpu_list_node list_entry;
|
||||
|
||||
struct nvgpu_cdev_class_priv_data *priv_data;
|
||||
|
||||
enum nvgpu_mig_gpu_instance_type instance_type;
|
||||
bool power_node;
|
||||
};
|
||||
|
||||
static inline struct nvgpu_class *
|
||||
nvgpu_class_from_list_entry(struct nvgpu_list_node *node)
|
||||
{
|
||||
@@ -60,9 +65,10 @@ nvgpu_class_from_list_entry(struct nvgpu_list_node *node)
|
||||
((uintptr_t)node - offsetof(struct nvgpu_class, list_entry));
|
||||
};
|
||||
|
||||
int gk20a_user_init(struct device *dev);
|
||||
int gk20a_user_nodes_init(struct device *dev);
|
||||
int gk20a_power_node_init(struct device *dev);
|
||||
void gk20a_user_deinit(struct device *dev);
|
||||
void gk20a_user_nodes_deinit(struct device *dev);
|
||||
void gk20a_power_node_deinit(struct device *dev);
|
||||
|
||||
struct gk20a *nvgpu_get_gk20a_from_cdev(struct nvgpu_cdev *cdev);
|
||||
u32 nvgpu_get_gpu_instance_id_from_cdev(struct gk20a *g, struct nvgpu_cdev *cdev);
|
||||
|
||||
Reference in New Issue
Block a user