Lines Matching refs:drm
40 struct drm_device *drm = tegra->drm; in tegra_atomic_complete() local
58 drm_atomic_helper_commit_modeset_disables(drm, state); in tegra_atomic_complete()
59 drm_atomic_helper_commit_planes(drm, state, false); in tegra_atomic_complete()
60 drm_atomic_helper_commit_modeset_enables(drm, state); in tegra_atomic_complete()
62 drm_atomic_helper_wait_for_vblanks(drm, state); in tegra_atomic_complete()
64 drm_atomic_helper_cleanup_planes(drm, state); in tegra_atomic_complete()
76 static int tegra_atomic_commit(struct drm_device *drm, in tegra_atomic_commit() argument
79 struct tegra_drm *tegra = drm->dev_private; in tegra_atomic_commit()
82 err = drm_atomic_helper_prepare_planes(drm, state); in tegra_atomic_commit()
96 drm_atomic_helper_swap_state(drm, state); in tegra_atomic_commit()
116 static int tegra_drm_load(struct drm_device *drm, unsigned long flags) in tegra_drm_load() argument
118 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_load()
151 drm->dev_private = tegra; in tegra_drm_load()
152 tegra->drm = drm; in tegra_drm_load()
154 drm_mode_config_init(drm); in tegra_drm_load()
156 drm->mode_config.min_width = 0; in tegra_drm_load()
157 drm->mode_config.min_height = 0; in tegra_drm_load()
159 drm->mode_config.max_width = 4096; in tegra_drm_load()
160 drm->mode_config.max_height = 4096; in tegra_drm_load()
162 drm->mode_config.funcs = &tegra_drm_mode_funcs; in tegra_drm_load()
164 err = tegra_drm_fb_prepare(drm); in tegra_drm_load()
168 drm_kms_helper_poll_init(drm); in tegra_drm_load()
179 drm->irq_enabled = true; in tegra_drm_load()
182 drm->max_vblank_count = 0xffffffff; in tegra_drm_load()
183 drm->vblank_disable_allowed = true; in tegra_drm_load()
185 err = drm_vblank_init(drm, drm->mode_config.num_crtc); in tegra_drm_load()
189 drm_mode_config_reset(drm); in tegra_drm_load()
191 err = tegra_drm_fb_init(drm); in tegra_drm_load()
198 drm_vblank_cleanup(drm); in tegra_drm_load()
202 drm_kms_helper_poll_fini(drm); in tegra_drm_load()
203 tegra_drm_fb_free(drm); in tegra_drm_load()
205 drm_mode_config_cleanup(drm); in tegra_drm_load()
216 static int tegra_drm_unload(struct drm_device *drm) in tegra_drm_unload() argument
218 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_unload()
219 struct tegra_drm *tegra = drm->dev_private; in tegra_drm_unload()
222 drm_kms_helper_poll_fini(drm); in tegra_drm_unload()
223 tegra_drm_fb_exit(drm); in tegra_drm_unload()
224 drm_mode_config_cleanup(drm); in tegra_drm_unload()
225 drm_vblank_cleanup(drm); in tegra_drm_unload()
241 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) in tegra_drm_open() argument
261 static void tegra_drm_lastclose(struct drm_device *drm) in tegra_drm_lastclose() argument
264 struct tegra_drm *tegra = drm->dev_private; in tegra_drm_lastclose()
271 host1x_bo_lookup(struct drm_device *drm, struct drm_file *file, u32 handle) in host1x_bo_lookup() argument
276 gem = drm_gem_object_lookup(drm, file, handle); in host1x_bo_lookup()
280 mutex_lock(&drm->struct_mutex); in host1x_bo_lookup()
282 mutex_unlock(&drm->struct_mutex); in host1x_bo_lookup()
290 struct drm_device *drm, in host1x_reloc_copy_from_user() argument
316 dest->cmdbuf.bo = host1x_bo_lookup(drm, file, cmdbuf); in host1x_reloc_copy_from_user()
320 dest->target.bo = host1x_bo_lookup(drm, file, target); in host1x_reloc_copy_from_user()
328 struct drm_tegra_submit *args, struct drm_device *drm, in tegra_drm_submit() argument
368 bo = host1x_bo_lookup(drm, file, cmdbuf.handle); in tegra_drm_submit()
382 &relocs[num_relocs], drm, in tegra_drm_submit()
447 static int tegra_gem_create(struct drm_device *drm, void *data, in tegra_gem_create() argument
453 bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, in tegra_gem_create()
461 static int tegra_gem_mmap(struct drm_device *drm, void *data, in tegra_gem_mmap() argument
468 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_mmap()
481 static int tegra_syncpt_read(struct drm_device *drm, void *data, in tegra_syncpt_read() argument
484 struct host1x *host = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_read()
496 static int tegra_syncpt_incr(struct drm_device *drm, void *data, in tegra_syncpt_incr() argument
499 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_incr()
510 static int tegra_syncpt_wait(struct drm_device *drm, void *data, in tegra_syncpt_wait() argument
513 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_wait()
525 static int tegra_open_channel(struct drm_device *drm, void *data, in tegra_open_channel() argument
529 struct tegra_drm *tegra = drm->dev_private; in tegra_open_channel()
555 static int tegra_close_channel(struct drm_device *drm, void *data, in tegra_close_channel() argument
573 static int tegra_get_syncpt(struct drm_device *drm, void *data, in tegra_get_syncpt() argument
595 static int tegra_submit(struct drm_device *drm, void *data, in tegra_submit() argument
607 return context->client->ops->submit(context, args, drm, file); in tegra_submit()
610 static int tegra_get_syncpt_base(struct drm_device *drm, void *data, in tegra_get_syncpt_base() argument
638 static int tegra_gem_set_tiling(struct drm_device *drm, void *data, in tegra_gem_set_tiling() argument
677 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_set_tiling()
691 static int tegra_gem_get_tiling(struct drm_device *drm, void *data, in tegra_gem_get_tiling() argument
699 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_get_tiling()
731 static int tegra_gem_set_flags(struct drm_device *drm, void *data, in tegra_gem_set_flags() argument
741 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_set_flags()
756 static int tegra_gem_get_flags(struct drm_device *drm, void *data, in tegra_gem_get_flags() argument
763 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_get_flags()
812 static struct drm_crtc *tegra_crtc_from_pipe(struct drm_device *drm, in tegra_crtc_from_pipe() argument
817 list_for_each_entry(crtc, &drm->mode_config.crtc_list, head) { in tegra_crtc_from_pipe()
825 static u32 tegra_drm_get_vblank_counter(struct drm_device *drm, in tegra_drm_get_vblank_counter() argument
828 struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe); in tegra_drm_get_vblank_counter()
837 static int tegra_drm_enable_vblank(struct drm_device *drm, unsigned int pipe) in tegra_drm_enable_vblank() argument
839 struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe); in tegra_drm_enable_vblank()
850 static void tegra_drm_disable_vblank(struct drm_device *drm, unsigned int pipe) in tegra_drm_disable_vblank() argument
852 struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe); in tegra_drm_disable_vblank()
859 static void tegra_drm_preclose(struct drm_device *drm, struct drm_file *file) in tegra_drm_preclose() argument
865 list_for_each_entry(crtc, &drm->mode_config.crtc_list, head) in tegra_drm_preclose()
878 struct drm_device *drm = node->minor->dev; in tegra_debugfs_framebuffers() local
881 mutex_lock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
883 list_for_each_entry(fb, &drm->mode_config.fb_list, head) { in tegra_debugfs_framebuffers()
890 mutex_unlock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
898 struct drm_device *drm = node->minor->dev; in tegra_debugfs_iova() local
899 struct tegra_drm *tegra = drm->dev_private; in tegra_debugfs_iova()
987 struct drm_device *drm; in host1x_drm_probe() local
990 drm = drm_dev_alloc(driver, &dev->dev); in host1x_drm_probe()
991 if (!drm) in host1x_drm_probe()
994 drm_dev_set_unique(drm, dev_name(&dev->dev)); in host1x_drm_probe()
995 dev_set_drvdata(&dev->dev, drm); in host1x_drm_probe()
997 err = drm_dev_register(drm, 0); in host1x_drm_probe()
1003 driver->date, drm->primary->index); in host1x_drm_probe()
1008 drm_dev_unref(drm); in host1x_drm_probe()
1014 struct drm_device *drm = dev_get_drvdata(&dev->dev); in host1x_drm_remove() local
1016 drm_dev_unregister(drm); in host1x_drm_remove()
1017 drm_dev_unref(drm); in host1x_drm_remove()
1025 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_suspend() local
1027 drm_kms_helper_poll_disable(drm); in host1x_drm_suspend()
1034 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_resume() local
1036 drm_kms_helper_poll_enable(drm); in host1x_drm_resume()