Lines Matching refs:drm
62 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_fillrect() local
63 struct nvif_device *device = &drm->device; in nouveau_fbcon_fillrect()
71 mutex_trylock(&drm->client.mutex)) { in nouveau_fbcon_fillrect()
79 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_fillrect()
94 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_copyarea() local
95 struct nvif_device *device = &drm->device; in nouveau_fbcon_copyarea()
103 mutex_trylock(&drm->client.mutex)) { in nouveau_fbcon_copyarea()
111 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_copyarea()
126 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_imageblit() local
127 struct nvif_device *device = &drm->device; in nouveau_fbcon_imageblit()
135 mutex_trylock(&drm->client.mutex)) { in nouveau_fbcon_imageblit()
143 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_imageblit()
158 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_sync() local
159 struct nouveau_channel *chan = drm->channel; in nouveau_fbcon_sync()
167 if (!mutex_trylock(&drm->client.mutex)) in nouveau_fbcon_sync()
171 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_sync()
185 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_open() local
186 int ret = pm_runtime_get_sync(drm->dev->dev); in nouveau_fbcon_open()
196 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_release() local
197 pm_runtime_put(drm->dev->dev); in nouveau_fbcon_release()
237 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_save_disable() local
238 if (drm->fbcon) { in nouveau_fbcon_accel_save_disable()
239 drm->fbcon->saved_flags = drm->fbcon->helper.fbdev->flags; in nouveau_fbcon_accel_save_disable()
240 drm->fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED; in nouveau_fbcon_accel_save_disable()
247 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_restore() local
248 if (drm->fbcon) { in nouveau_fbcon_accel_restore()
249 drm->fbcon->helper.fbdev->flags = drm->fbcon->saved_flags; in nouveau_fbcon_accel_restore()
256 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_fini() local
257 struct nouveau_fbdev *fbcon = drm->fbcon; in nouveau_fbcon_accel_fini()
258 if (fbcon && drm->channel) { in nouveau_fbcon_accel_fini()
262 nouveau_channel_idle(drm->channel); in nouveau_fbcon_accel_fini()
276 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_init() local
277 struct nouveau_fbdev *fbcon = drm->fbcon; in nouveau_fbcon_accel_init()
281 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) in nouveau_fbcon_accel_init()
284 if (drm->device.info.family < NV_DEVICE_INFO_V0_FERMI) in nouveau_fbcon_accel_init()
338 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_create() local
339 struct nvif_device *device = &drm->device; in nouveau_fbcon_create()
363 NV_ERROR(drm, "failed to allocate framebuffer\n"); in nouveau_fbcon_create()
369 NV_ERROR(drm, "failed to pin fb: %d\n", ret); in nouveau_fbcon_create()
375 NV_ERROR(drm, "failed to map fb: %d\n", ret); in nouveau_fbcon_create()
379 chan = nouveau_nofbaccel ? NULL : drm->channel; in nouveau_fbcon_create()
381 ret = nouveau_bo_vma_add(nvbo, drm->client.vm, in nouveau_fbcon_create()
384 NV_ERROR(drm, "failed to map fb into chan: %d\n", ret); in nouveau_fbcon_create()
436 NV_INFO(drm, "allocated %dx%d fb: 0x%llx, bo %p\n", in nouveau_fbcon_create()
459 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_output_poll_changed() local
460 if (drm->fbcon) in nouveau_fbcon_output_poll_changed()
461 drm_fb_helper_hotplug_event(&drm->fbcon->helper); in nouveau_fbcon_output_poll_changed()
488 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_gpu_lockup() local
490 NV_ERROR(drm, "GPU lockup - switching to software fbcon\n"); in nouveau_fbcon_gpu_lockup()
503 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_set_suspend() local
504 if (drm->fbcon) { in nouveau_fbcon_set_suspend()
508 drm_fb_helper_set_suspend(&drm->fbcon->helper, state); in nouveau_fbcon_set_suspend()
518 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_init() local
532 drm->fbcon = fbcon; in nouveau_fbcon_init()
545 if (drm->device.info.ram_size <= 32 * 1024 * 1024) in nouveau_fbcon_init()
548 if (drm->device.info.ram_size <= 64 * 1024 * 1024) in nouveau_fbcon_init()
572 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_fini() local
574 if (!drm->fbcon) in nouveau_fbcon_fini()
578 nouveau_fbcon_destroy(dev, drm->fbcon); in nouveau_fbcon_fini()
579 kfree(drm->fbcon); in nouveau_fbcon_fini()
580 drm->fbcon = NULL; in nouveau_fbcon_fini()