Lines Matching +full:max +full:- +full:cur
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 = &debugfs->ctrl; in nouveau_debugfs_pstate_get()
81 return -ENODEV; in nouveau_debugfs_pstate_get()
104 info.pwrsrc == 1 ? "AC" : "--"); in nouveau_debugfs_pstate_get()
115 if (attr.min != attr.max) in nouveau_debugfs_pstate_get()
116 seq_printf(m, "-%d", attr.max); in nouveau_debugfs_pstate_get()
128 if (info.ustate_ac < -1) in nouveau_debugfs_pstate_get()
130 if (info.ustate_dc < -1) in nouveau_debugfs_pstate_get()
144 struct seq_file *m = file->private_data; in nouveau_debugfs_pstate_set()
145 struct drm_device *drm = m->private; in nouveau_debugfs_pstate_set()
147 struct nvif_object *ctrl = &debugfs->ctrl; in nouveau_debugfs_pstate_set()
148 struct nvif_control_pstate_user_v0 args = { .pwrsrc = -EINVAL }; in nouveau_debugfs_pstate_set()
149 char buf[32] = {}, *tmp, *cur = buf; 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()
164 if (!strncasecmp(cur, "dc:", 3)) { in nouveau_debugfs_pstate_set()
166 cur += 3; in nouveau_debugfs_pstate_set()
168 if (!strncasecmp(cur, "ac:", 3)) { in nouveau_debugfs_pstate_set()
170 cur += 3; in nouveau_debugfs_pstate_set()
173 if (!strcasecmp(cur, "none")) in nouveau_debugfs_pstate_set()
176 if (!strcasecmp(cur, "auto")) in nouveau_debugfs_pstate_set()
179 ret = kstrtol(cur, 16, &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()
192 pm_runtime_put_autosuspend(drm->dev); in nouveau_debugfs_pstate_set()
202 return single_open(file, nouveau_debugfs_pstate_get, inode->i_private); in nouveau_debugfs_pstate_open()
229 struct nouveau_drm *drm = nouveau_drm(minor->dev); in nouveau_drm_debugfs_init()
236 minor->debugfs_root, minor->dev, in nouveau_drm_debugfs_init()
242 minor->debugfs_root, minor); in nouveau_drm_debugfs_init()
247 dentry = debugfs_lookup("vbios.rom", minor->debugfs_root); in nouveau_drm_debugfs_init()
251 d_inode(dentry)->i_size = drm->vbios.length; in nouveau_drm_debugfs_init()
258 drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL); in nouveau_debugfs_init()
259 if (!drm->debugfs) in nouveau_debugfs_init()
260 return -ENOMEM; in nouveau_debugfs_init()
262 return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0, in nouveau_debugfs_init()
264 &drm->debugfs->ctrl); in nouveau_debugfs_init()
270 if (drm->debugfs && drm->debugfs->ctrl.priv) in nouveau_debugfs_fini()
271 nvif_object_dtor(&drm->debugfs->ctrl); in nouveau_debugfs_fini()
273 kfree(drm->debugfs); in nouveau_debugfs_fini()
274 drm->debugfs = NULL; in nouveau_debugfs_fini()