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); 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()
143 drm->dev_private = tegra; in tegra_drm_load()
144 tegra->drm = drm; in tegra_drm_load()
146 drm_mode_config_init(drm); in tegra_drm_load()
148 drm->mode_config.min_width = 0; in tegra_drm_load()
149 drm->mode_config.min_height = 0; in tegra_drm_load()
151 drm->mode_config.max_width = 4096; in tegra_drm_load()
152 drm->mode_config.max_height = 4096; in tegra_drm_load()
154 drm->mode_config.funcs = &tegra_drm_mode_funcs; in tegra_drm_load()
156 err = tegra_drm_fb_prepare(drm); in tegra_drm_load()
160 drm_kms_helper_poll_init(drm); in tegra_drm_load()
166 drm_mode_config_reset(drm); in tegra_drm_load()
173 drm->irq_enabled = true; in tegra_drm_load()
176 drm->max_vblank_count = 0xffffffff; in tegra_drm_load()
178 err = drm_vblank_init(drm, drm->mode_config.num_crtc); in tegra_drm_load()
182 err = tegra_drm_fb_init(drm); in tegra_drm_load()
189 drm_vblank_cleanup(drm); in tegra_drm_load()
193 drm_kms_helper_poll_fini(drm); in tegra_drm_load()
194 tegra_drm_fb_free(drm); in tegra_drm_load()
196 drm_mode_config_cleanup(drm); in tegra_drm_load()
207 static int tegra_drm_unload(struct drm_device *drm) in tegra_drm_unload() argument
209 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_unload()
210 struct tegra_drm *tegra = drm->dev_private; in tegra_drm_unload()
213 drm_kms_helper_poll_fini(drm); in tegra_drm_unload()
214 tegra_drm_fb_exit(drm); in tegra_drm_unload()
215 drm_mode_config_cleanup(drm); in tegra_drm_unload()
216 drm_vblank_cleanup(drm); in tegra_drm_unload()
232 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) in tegra_drm_open() argument
252 static void tegra_drm_lastclose(struct drm_device *drm) in tegra_drm_lastclose() argument
255 struct tegra_drm *tegra = drm->dev_private; in tegra_drm_lastclose()
262 host1x_bo_lookup(struct drm_device *drm, struct drm_file *file, u32 handle) in host1x_bo_lookup() argument
267 gem = drm_gem_object_lookup(drm, file, handle); in host1x_bo_lookup()
271 mutex_lock(&drm->struct_mutex); in host1x_bo_lookup()
273 mutex_unlock(&drm->struct_mutex); in host1x_bo_lookup()
281 struct drm_device *drm, in host1x_reloc_copy_from_user() argument
307 dest->cmdbuf.bo = host1x_bo_lookup(drm, file, cmdbuf); in host1x_reloc_copy_from_user()
311 dest->target.bo = host1x_bo_lookup(drm, file, target); in host1x_reloc_copy_from_user()
319 struct drm_tegra_submit *args, struct drm_device *drm, in tegra_drm_submit() argument
359 bo = host1x_bo_lookup(drm, file, cmdbuf.handle); in tegra_drm_submit()
373 &relocs[num_relocs], drm, in tegra_drm_submit()
438 static int tegra_gem_create(struct drm_device *drm, void *data, in tegra_gem_create() argument
444 bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, in tegra_gem_create()
452 static int tegra_gem_mmap(struct drm_device *drm, void *data, in tegra_gem_mmap() argument
459 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_mmap()
472 static int tegra_syncpt_read(struct drm_device *drm, void *data, in tegra_syncpt_read() argument
475 struct host1x *host = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_read()
487 static int tegra_syncpt_incr(struct drm_device *drm, void *data, in tegra_syncpt_incr() argument
490 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_incr()
501 static int tegra_syncpt_wait(struct drm_device *drm, void *data, in tegra_syncpt_wait() argument
504 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_wait()
516 static int tegra_open_channel(struct drm_device *drm, void *data, in tegra_open_channel() argument
520 struct tegra_drm *tegra = drm->dev_private; in tegra_open_channel()
546 static int tegra_close_channel(struct drm_device *drm, void *data, in tegra_close_channel() argument
564 static int tegra_get_syncpt(struct drm_device *drm, void *data, in tegra_get_syncpt() argument
586 static int tegra_submit(struct drm_device *drm, void *data, in tegra_submit() argument
598 return context->client->ops->submit(context, args, drm, file); in tegra_submit()
601 static int tegra_get_syncpt_base(struct drm_device *drm, void *data, in tegra_get_syncpt_base() argument
629 static int tegra_gem_set_tiling(struct drm_device *drm, void *data, in tegra_gem_set_tiling() argument
668 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_set_tiling()
682 static int tegra_gem_get_tiling(struct drm_device *drm, void *data, in tegra_gem_get_tiling() argument
690 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_get_tiling()
722 static int tegra_gem_set_flags(struct drm_device *drm, void *data, in tegra_gem_set_flags() argument
732 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_set_flags()
747 static int tegra_gem_get_flags(struct drm_device *drm, void *data, in tegra_gem_get_flags() argument
754 gem = drm_gem_object_lookup(drm, file, args->handle); in tegra_gem_get_flags()
803 static struct drm_crtc *tegra_crtc_from_pipe(struct drm_device *drm, in tegra_crtc_from_pipe() argument
808 list_for_each_entry(crtc, &drm->mode_config.crtc_list, head) { in tegra_crtc_from_pipe()
816 static u32 tegra_drm_get_vblank_counter(struct drm_device *drm, int pipe) in tegra_drm_get_vblank_counter() argument
818 struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe); in tegra_drm_get_vblank_counter()
827 static int tegra_drm_enable_vblank(struct drm_device *drm, int pipe) in tegra_drm_enable_vblank() argument
829 struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe); in tegra_drm_enable_vblank()
840 static void tegra_drm_disable_vblank(struct drm_device *drm, int pipe) in tegra_drm_disable_vblank() argument
842 struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe); in tegra_drm_disable_vblank()
849 static void tegra_drm_preclose(struct drm_device *drm, struct drm_file *file) in tegra_drm_preclose() argument
855 list_for_each_entry(crtc, &drm->mode_config.crtc_list, head) in tegra_drm_preclose()
868 struct drm_device *drm = node->minor->dev; in tegra_debugfs_framebuffers() local
871 mutex_lock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
873 list_for_each_entry(fb, &drm->mode_config.fb_list, head) { in tegra_debugfs_framebuffers()
880 mutex_unlock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
888 struct drm_device *drm = node->minor->dev; in tegra_debugfs_iova() local
889 struct tegra_drm *tegra = drm->dev_private; in tegra_debugfs_iova()
977 struct drm_device *drm; in host1x_drm_probe() local
980 drm = drm_dev_alloc(driver, &dev->dev); in host1x_drm_probe()
981 if (!drm) in host1x_drm_probe()
984 drm_dev_set_unique(drm, dev_name(&dev->dev)); in host1x_drm_probe()
985 dev_set_drvdata(&dev->dev, drm); in host1x_drm_probe()
987 err = drm_dev_register(drm, 0); in host1x_drm_probe()
993 driver->date, drm->primary->index); in host1x_drm_probe()
998 drm_dev_unref(drm); in host1x_drm_probe()
1004 struct drm_device *drm = dev_get_drvdata(&dev->dev); in host1x_drm_remove() local
1006 drm_dev_unregister(drm); in host1x_drm_remove()
1007 drm_dev_unref(drm); in host1x_drm_remove()
1015 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_suspend() local
1017 drm_kms_helper_poll_disable(drm); in host1x_drm_suspend()
1024 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_resume() local
1026 drm_kms_helper_poll_enable(drm); in host1x_drm_resume()