Lines Matching refs:drm

45 static int tegra_atomic_check(struct drm_device *drm,  in tegra_atomic_check()  argument
50 err = drm_atomic_helper_check(drm, state); in tegra_atomic_check()
54 return tegra_display_hub_atomic_check(drm, state); in tegra_atomic_check()
68 struct drm_device *drm = old_state->dev; in tegra_atomic_commit_tail() local
69 struct tegra_drm *tegra = drm->dev_private; in tegra_atomic_commit_tail()
72 drm_atomic_helper_commit_modeset_disables(drm, old_state); in tegra_atomic_commit_tail()
73 tegra_display_hub_atomic_commit(drm, old_state); in tegra_atomic_commit_tail()
74 drm_atomic_helper_commit_planes(drm, old_state, 0); in tegra_atomic_commit_tail()
75 drm_atomic_helper_commit_modeset_enables(drm, old_state); in tegra_atomic_commit_tail()
77 drm_atomic_helper_wait_for_vblanks(drm, old_state); in tegra_atomic_commit_tail()
78 drm_atomic_helper_cleanup_planes(drm, old_state); in tegra_atomic_commit_tail()
89 static int tegra_drm_load(struct drm_device *drm, unsigned long flags) in tegra_drm_load() argument
91 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_load()
114 drm->dev_private = tegra; in tegra_drm_load()
115 tegra->drm = drm; in tegra_drm_load()
117 drm_mode_config_init(drm); in tegra_drm_load()
119 drm->mode_config.min_width = 0; in tegra_drm_load()
120 drm->mode_config.min_height = 0; in tegra_drm_load()
122 drm->mode_config.max_width = 4096; in tegra_drm_load()
123 drm->mode_config.max_height = 4096; in tegra_drm_load()
125 drm->mode_config.allow_fb_modifiers = true; in tegra_drm_load()
127 drm->mode_config.normalize_zpos = true; in tegra_drm_load()
129 drm->mode_config.funcs = &tegra_drm_mode_config_funcs; in tegra_drm_load()
130 drm->mode_config.helper_private = &tegra_drm_mode_config_helpers; in tegra_drm_load()
132 err = tegra_drm_fb_prepare(drm); in tegra_drm_load()
136 drm_kms_helper_poll_init(drm); in tegra_drm_load()
183 drm->irq_enabled = true; in tegra_drm_load()
186 drm->max_vblank_count = 0xffffffff; in tegra_drm_load()
188 err = drm_vblank_init(drm, drm->mode_config.num_crtc); in tegra_drm_load()
192 drm_mode_config_reset(drm); in tegra_drm_load()
194 err = tegra_drm_fb_init(drm); in tegra_drm_load()
206 drm_kms_helper_poll_fini(drm); in tegra_drm_load()
207 tegra_drm_fb_free(drm); in tegra_drm_load()
209 drm_mode_config_cleanup(drm); in tegra_drm_load()
225 static void tegra_drm_unload(struct drm_device *drm) in tegra_drm_unload() argument
227 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_unload()
228 struct tegra_drm *tegra = drm->dev_private; in tegra_drm_unload()
231 drm_kms_helper_poll_fini(drm); in tegra_drm_unload()
232 tegra_drm_fb_exit(drm); in tegra_drm_unload()
233 drm_atomic_helper_shutdown(drm); in tegra_drm_unload()
234 drm_mode_config_cleanup(drm); in tegra_drm_unload()
251 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) in tegra_drm_open() argument
288 struct drm_device *drm, in host1x_reloc_copy_from_user() argument
326 struct drm_tegra_submit *args, struct drm_device *drm, in tegra_drm_submit() argument
336 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_drm_submit()
431 &user_relocs[num_relocs], drm, in tegra_drm_submit()
506 static int tegra_gem_create(struct drm_device *drm, void *data, in tegra_gem_create() argument
512 bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, in tegra_gem_create()
520 static int tegra_gem_mmap(struct drm_device *drm, void *data, in tegra_gem_mmap() argument
540 static int tegra_syncpt_read(struct drm_device *drm, void *data, in tegra_syncpt_read() argument
543 struct host1x *host = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_read()
555 static int tegra_syncpt_incr(struct drm_device *drm, void *data, in tegra_syncpt_incr() argument
558 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_incr()
569 static int tegra_syncpt_wait(struct drm_device *drm, void *data, in tegra_syncpt_wait() argument
572 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_wait()
607 static int tegra_open_channel(struct drm_device *drm, void *data, in tegra_open_channel() argument
611 struct tegra_drm *tegra = drm->dev_private; in tegra_open_channel()
640 static int tegra_close_channel(struct drm_device *drm, void *data, in tegra_close_channel() argument
664 static int tegra_get_syncpt(struct drm_device *drm, void *data, in tegra_get_syncpt() argument
694 static int tegra_submit(struct drm_device *drm, void *data, in tegra_submit() argument
710 err = context->client->ops->submit(context, args, drm, file); in tegra_submit()
717 static int tegra_get_syncpt_base(struct drm_device *drm, void *data, in tegra_get_syncpt_base() argument
755 static int tegra_gem_set_tiling(struct drm_device *drm, void *data, in tegra_gem_set_tiling() argument
808 static int tegra_gem_get_tiling(struct drm_device *drm, void *data, in tegra_gem_get_tiling() argument
848 static int tegra_gem_set_flags(struct drm_device *drm, void *data, in tegra_gem_set_flags() argument
873 static int tegra_gem_get_flags(struct drm_device *drm, void *data, in tegra_gem_get_flags() argument
950 static void tegra_drm_postclose(struct drm_device *drm, struct drm_file *file) in tegra_drm_postclose() argument
967 struct drm_device *drm = node->minor->dev; in tegra_debugfs_framebuffers() local
970 mutex_lock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
972 list_for_each_entry(fb, &drm->mode_config.fb_list, head) { in tegra_debugfs_framebuffers()
980 mutex_unlock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
988 struct drm_device *drm = node->minor->dev; in tegra_debugfs_iova() local
989 struct tegra_drm *tegra = drm->dev_private; in tegra_debugfs_iova()
1054 client->drm = tegra; in tegra_drm_register_client()
1065 client->drm = NULL; in tegra_drm_unregister_client()
1074 struct drm_device *drm = dev_get_drvdata(client->parent); in host1x_client_iommu_attach() local
1075 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_attach()
1112 struct drm_device *drm = dev_get_drvdata(client->parent); in host1x_client_iommu_detach() local
1113 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_detach()
1205 struct drm_device *drm; in host1x_drm_probe() local
1208 drm = drm_dev_alloc(driver, &dev->dev); in host1x_drm_probe()
1209 if (IS_ERR(drm)) in host1x_drm_probe()
1210 return PTR_ERR(drm); in host1x_drm_probe()
1212 dev_set_drvdata(&dev->dev, drm); in host1x_drm_probe()
1218 err = drm_dev_register(drm, 0); in host1x_drm_probe()
1225 drm_dev_put(drm); in host1x_drm_probe()
1231 struct drm_device *drm = dev_get_drvdata(&dev->dev); in host1x_drm_remove() local
1233 drm_dev_unregister(drm); in host1x_drm_remove()
1234 drm_dev_put(drm); in host1x_drm_remove()
1242 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_suspend() local
1244 return drm_mode_config_helper_suspend(drm); in host1x_drm_suspend()
1249 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_resume() local
1251 return drm_mode_config_helper_resume(drm); in host1x_drm_resume()