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()
364 NV_ERROR(drm, "failed to allocate framebuffer\n"); in nouveau_fbcon_create()
370 NV_ERROR(drm, "failed to pin fb: %d\n", ret); in nouveau_fbcon_create()
376 NV_ERROR(drm, "failed to map fb: %d\n", ret); in nouveau_fbcon_create()
380 chan = nouveau_nofbaccel ? NULL : drm->channel; in nouveau_fbcon_create()
382 ret = nouveau_bo_vma_add(nvbo, drm->client.vm, in nouveau_fbcon_create()
385 NV_ERROR(drm, "failed to map fb into chan: %d\n", ret); in nouveau_fbcon_create()
445 NV_INFO(drm, "allocated %dx%d fb: 0x%llx, bo %p\n", in nouveau_fbcon_create()
468 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_output_poll_changed() local
469 if (drm->fbcon) in nouveau_fbcon_output_poll_changed()
470 drm_fb_helper_hotplug_event(&drm->fbcon->helper); in nouveau_fbcon_output_poll_changed()
503 struct nouveau_drm *drm = nouveau_drm(fbcon->dev); in nouveau_fbcon_gpu_lockup() local
505 NV_ERROR(drm, "GPU lockup - switching to software fbcon\n"); in nouveau_fbcon_gpu_lockup()
518 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_set_suspend() local
519 if (drm->fbcon) { in nouveau_fbcon_set_suspend()
523 fb_set_suspend(drm->fbcon->helper.fbdev, state); in nouveau_fbcon_set_suspend()
533 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_init() local
547 drm->fbcon = fbcon; in nouveau_fbcon_init()
560 if (drm->device.info.ram_size <= 32 * 1024 * 1024) in nouveau_fbcon_init()
563 if (drm->device.info.ram_size <= 64 * 1024 * 1024) in nouveau_fbcon_init()
588 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_fini() local
590 if (!drm->fbcon) in nouveau_fbcon_fini()
594 nouveau_fbcon_destroy(dev, drm->fbcon); in nouveau_fbcon_fini()
595 kfree(drm->fbcon); in nouveau_fbcon_fini()
596 drm->fbcon = NULL; in nouveau_fbcon_fini()