Lines Matching +full:charge +full:- +full:ctrl +full:- +full:value
4 * Permission is hereby granted, free of charge, to any person obtaining
40 struct drm_info_node *node = (struct drm_info_node *) m->private; in nouveau_debugfs_vbios_image()
41 struct nouveau_drm *drm = nouveau_drm(node->minor->dev); in nouveau_debugfs_vbios_image()
44 for (i = 0; i < drm->vbios.length; i++) in nouveau_debugfs_vbios_image()
45 seq_printf(m, "%c", drm->vbios.data[i]); in nouveau_debugfs_vbios_image()
52 struct drm_info_node *node = m->private; in nouveau_debugfs_strap_peek()
53 struct nouveau_drm *drm = nouveau_drm(node->minor->dev); in nouveau_debugfs_strap_peek()
56 ret = pm_runtime_get_sync(drm->dev->dev); in nouveau_debugfs_strap_peek()
57 if (ret < 0 && ret != -EACCES) { in nouveau_debugfs_strap_peek()
58 pm_runtime_put_autosuspend(drm->dev->dev); in nouveau_debugfs_strap_peek()
63 nvif_rd32(&drm->client.device.object, 0x101000)); in nouveau_debugfs_strap_peek()
65 pm_runtime_mark_last_busy(drm->dev->dev); in nouveau_debugfs_strap_peek()
66 pm_runtime_put_autosuspend(drm->dev->dev); in nouveau_debugfs_strap_peek()
74 struct drm_device *drm = m->private; in nouveau_debugfs_pstate_get()
76 struct nvif_object *ctrl; in nouveau_debugfs_pstate_get() local
81 return -ENODEV; in nouveau_debugfs_pstate_get()
83 ctrl = &debugfs->ctrl; in nouveau_debugfs_pstate_get()
84 ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_INFO, &info, sizeof(info)); in nouveau_debugfs_pstate_get()
96 ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_ATTR, in nouveau_debugfs_pstate_get()
105 info.pwrsrc == 1 ? "AC" : "--"); in nouveau_debugfs_pstate_get()
110 ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_ATTR, in nouveau_debugfs_pstate_get()
117 seq_printf(m, "-%d", attr.max); in nouveau_debugfs_pstate_get()
129 if (info.ustate_ac < -1) in nouveau_debugfs_pstate_get()
131 if (info.ustate_dc < -1) in nouveau_debugfs_pstate_get()
145 struct seq_file *m = file->private_data; in nouveau_debugfs_pstate_set()
146 struct drm_device *drm = m->private; in nouveau_debugfs_pstate_set()
148 struct nvif_control_pstate_user_v0 args = { .pwrsrc = -EINVAL }; in nouveau_debugfs_pstate_set()
150 long value, ret; in nouveau_debugfs_pstate_set() local
153 return -ENODEV; in nouveau_debugfs_pstate_set()
156 return -EINVAL; in nouveau_debugfs_pstate_set()
159 return -EFAULT; in nouveau_debugfs_pstate_set()
179 ret = kstrtol(cur, 16, &value); in nouveau_debugfs_pstate_set()
182 args.ustate = value; in nouveau_debugfs_pstate_set()
185 ret = pm_runtime_get_sync(drm->dev); in nouveau_debugfs_pstate_set()
186 if (ret < 0 && ret != -EACCES) { in nouveau_debugfs_pstate_set()
187 pm_runtime_put_autosuspend(drm->dev); in nouveau_debugfs_pstate_set()
191 ret = nvif_mthd(&debugfs->ctrl, NVIF_CONTROL_PSTATE_USER, in nouveau_debugfs_pstate_set()
193 pm_runtime_put_autosuspend(drm->dev); in nouveau_debugfs_pstate_set()
203 return single_open(file, nouveau_debugfs_pstate_get, inode->i_private); in nouveau_debugfs_pstate_open()
209 MA_STATE(mas, &uvmm->region_mt, 0, 0); in nouveau_debugfs_gpuva_regions()
213 seq_puts (m, "----------------------------------------------------------------------------\n"); in nouveau_debugfs_gpuva_regions()
216 reg->va.addr, reg->va.range, reg->va.addr + reg->va.range); in nouveau_debugfs_gpuva_regions()
222 struct drm_info_node *node = (struct drm_info_node *) m->private; in nouveau_debugfs_gpuva()
223 struct nouveau_drm *drm = nouveau_drm(node->minor->dev); in nouveau_debugfs_gpuva()
226 mutex_lock(&drm->clients_lock); in nouveau_debugfs_gpuva()
227 list_for_each_entry(cli, &drm->clients, head) { in nouveau_debugfs_gpuva()
234 drm_debugfs_gpuva_info(m, &uvmm->base); in nouveau_debugfs_gpuva()
239 mutex_unlock(&drm->clients_lock); in nouveau_debugfs_gpuva()
269 struct nouveau_drm *drm = nouveau_drm(minor->dev); in nouveau_drm_debugfs_init()
276 minor->debugfs_root, minor->dev, in nouveau_drm_debugfs_init()
282 minor->debugfs_root, minor); in nouveau_drm_debugfs_init()
287 dentry = debugfs_lookup("vbios.rom", minor->debugfs_root); in nouveau_drm_debugfs_init()
291 d_inode(dentry)->i_size = drm->vbios.length; in nouveau_drm_debugfs_init()
298 drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL); in nouveau_debugfs_init()
299 if (!drm->debugfs) in nouveau_debugfs_init()
300 return -ENOMEM; in nouveau_debugfs_init()
302 return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0, in nouveau_debugfs_init()
304 &drm->debugfs->ctrl); in nouveau_debugfs_init()
310 if (drm->debugfs && drm->debugfs->ctrl.priv) in nouveau_debugfs_fini()
311 nvif_object_dtor(&drm->debugfs->ctrl); in nouveau_debugfs_fini()
313 kfree(drm->debugfs); in nouveau_debugfs_fini()
314 drm->debugfs = NULL; in nouveau_debugfs_fini()