• Home
  • Raw
  • Download

Lines Matching full:drm

40 #include <drm/drmP.h>
41 #include <drm/drm_crtc.h>
42 #include <drm/drm_crtc_helper.h>
43 #include <drm/drm_fb_helper.h>
44 #include <drm/drm_atomic.h>
67 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_fillrect() local
68 struct nvif_device *device = &drm->client.device; in nouveau_fbcon_fillrect()
76 mutex_trylock(&drm->client.mutex)) { in nouveau_fbcon_fillrect()
84 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_fillrect()
99 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_copyarea() local
100 struct nvif_device *device = &drm->client.device; in nouveau_fbcon_copyarea()
108 mutex_trylock(&drm->client.mutex)) { in nouveau_fbcon_copyarea()
116 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_copyarea()
131 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_imageblit() local
132 struct nvif_device *device = &drm->client.device; in nouveau_fbcon_imageblit()
140 mutex_trylock(&drm->client.mutex)) { in nouveau_fbcon_imageblit()
148 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_imageblit()
163 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_sync() local
164 struct nouveau_channel *chan = drm->channel; in nouveau_fbcon_sync()
172 if (!mutex_trylock(&drm->client.mutex)) in nouveau_fbcon_sync()
176 mutex_unlock(&drm->client.mutex); in nouveau_fbcon_sync()
190 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_open() local
191 int ret = pm_runtime_get_sync(drm->dev->dev); in nouveau_fbcon_open()
193 pm_runtime_put(drm->dev->dev); in nouveau_fbcon_open()
203 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_release() local
204 pm_runtime_put(drm->dev->dev); in nouveau_fbcon_release()
232 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_save_disable() local
233 if (drm->fbcon && drm->fbcon->helper.fbdev) { in nouveau_fbcon_accel_save_disable()
234 drm->fbcon->saved_flags = drm->fbcon->helper.fbdev->flags; in nouveau_fbcon_accel_save_disable()
235 drm->fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED; in nouveau_fbcon_accel_save_disable()
242 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_restore() local
243 if (drm->fbcon && drm->fbcon->helper.fbdev) { in nouveau_fbcon_accel_restore()
244 drm->fbcon->helper.fbdev->flags = drm->fbcon->saved_flags; in nouveau_fbcon_accel_restore()
251 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_fini() local
252 struct nouveau_fbdev *fbcon = drm->fbcon; in nouveau_fbcon_accel_fini()
253 if (fbcon && drm->channel) { in nouveau_fbcon_accel_fini()
258 nouveau_channel_idle(drm->channel); in nouveau_fbcon_accel_fini()
272 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_accel_init() local
273 struct nouveau_fbdev *fbcon = drm->fbcon; in nouveau_fbcon_accel_init()
277 if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) in nouveau_fbcon_accel_init()
280 if (drm->client.device.info.family < NV_DEVICE_INFO_V0_FERMI) in nouveau_fbcon_accel_init()
295 /* Clear the entire fbcon. The drm will program every connector in nouveau_fbcon_zfill()
314 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_create() local
315 struct nvif_device *device = &drm->client.device; in nouveau_fbcon_create()
332 ret = nouveau_gem_new(&drm->client, mode_cmd.pitches[0] * in nouveau_fbcon_create()
336 NV_ERROR(drm, "failed to allocate framebuffer\n"); in nouveau_fbcon_create()
346 NV_ERROR(drm, "failed to pin fb: %d\n", ret); in nouveau_fbcon_create()
352 NV_ERROR(drm, "failed to map fb: %d\n", ret); in nouveau_fbcon_create()
356 chan = nouveau_nofbaccel ? NULL : drm->channel; in nouveau_fbcon_create()
358 ret = nouveau_vma_new(nvbo, &drm->client.vmm, &fb->vma); in nouveau_fbcon_create()
360 NV_ERROR(drm, "failed to map fb into chan: %d\n", ret); in nouveau_fbcon_create()
404 NV_INFO(drm, "allocated %dx%d fb: 0x%llx, bo %p\n", in nouveau_fbcon_create()
443 struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_gpu_lockup() local
445 NV_ERROR(drm, "GPU lockup - switching to software fbcon\n"); in nouveau_fbcon_gpu_lockup()
456 struct nouveau_drm *drm = container_of(work, typeof(*drm), fbcon_work); in nouveau_fbcon_set_suspend_work() local
457 int state = READ_ONCE(drm->fbcon_new_state); in nouveau_fbcon_set_suspend_work()
460 pm_runtime_get_sync(drm->dev->dev); in nouveau_fbcon_set_suspend_work()
464 nouveau_fbcon_accel_restore(drm->dev); in nouveau_fbcon_set_suspend_work()
465 drm_fb_helper_set_suspend(&drm->fbcon->helper, state); in nouveau_fbcon_set_suspend_work()
467 nouveau_fbcon_accel_save_disable(drm->dev); in nouveau_fbcon_set_suspend_work()
471 nouveau_fbcon_hotplug_resume(drm->fbcon); in nouveau_fbcon_set_suspend_work()
472 pm_runtime_mark_last_busy(drm->dev->dev); in nouveau_fbcon_set_suspend_work()
473 pm_runtime_put_sync(drm->dev->dev); in nouveau_fbcon_set_suspend_work()
480 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_set_suspend() local
482 if (!drm->fbcon) in nouveau_fbcon_set_suspend()
485 drm->fbcon_new_state = state; in nouveau_fbcon_set_suspend()
490 schedule_work(&drm->fbcon_work); in nouveau_fbcon_set_suspend()
496 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_output_poll_changed() local
497 struct nouveau_fbdev *fbcon = drm->fbcon; in nouveau_fbcon_output_poll_changed()
518 NV_DEBUG(drm, "fbcon HPD event deferred until runtime resume\n"); in nouveau_fbcon_output_poll_changed()
520 pm_runtime_put_noidle(drm->dev->dev); in nouveau_fbcon_output_poll_changed()
532 struct nouveau_drm *drm; in nouveau_fbcon_hotplug_resume() local
536 drm = nouveau_drm(fbcon->helper.dev); in nouveau_fbcon_hotplug_resume()
542 NV_DEBUG(drm, "Handling deferred fbcon HPD events\n"); in nouveau_fbcon_hotplug_resume()
551 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_init() local
564 drm->fbcon = fbcon; in nouveau_fbcon_init()
565 INIT_WORK(&drm->fbcon_work, nouveau_fbcon_set_suspend_work); in nouveau_fbcon_init()
579 if (drm->client.device.info.ram_size <= 32 * 1024 * 1024) in nouveau_fbcon_init()
582 if (drm->client.device.info.ram_size <= 64 * 1024 * 1024) in nouveau_fbcon_init()
604 drm->fbcon = NULL; in nouveau_fbcon_init()
611 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_fbcon_fini() local
613 if (!drm->fbcon) in nouveau_fbcon_fini()
617 nouveau_fbcon_destroy(dev, drm->fbcon); in nouveau_fbcon_fini()
618 kfree(drm->fbcon); in nouveau_fbcon_fini()
619 drm->fbcon = NULL; in nouveau_fbcon_fini()