Lines Matching refs:drm

36 static int tegra_atomic_check(struct drm_device *drm,  in tegra_atomic_check()  argument
41 err = drm_atomic_helper_check(drm, state); in tegra_atomic_check()
45 return tegra_display_hub_atomic_check(drm, state); in tegra_atomic_check()
59 struct drm_device *drm = old_state->dev; in tegra_atomic_commit_tail() local
60 struct tegra_drm *tegra = drm->dev_private; in tegra_atomic_commit_tail()
63 drm_atomic_helper_commit_modeset_disables(drm, old_state); in tegra_atomic_commit_tail()
64 tegra_display_hub_atomic_commit(drm, old_state); in tegra_atomic_commit_tail()
65 drm_atomic_helper_commit_planes(drm, old_state, 0); in tegra_atomic_commit_tail()
66 drm_atomic_helper_commit_modeset_enables(drm, old_state); in tegra_atomic_commit_tail()
68 drm_atomic_helper_wait_for_vblanks(drm, old_state); in tegra_atomic_commit_tail()
69 drm_atomic_helper_cleanup_planes(drm, old_state); in tegra_atomic_commit_tail()
80 static int tegra_drm_load(struct drm_device *drm, unsigned long flags) in tegra_drm_load() argument
82 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_load()
130 drm->dev_private = tegra; in tegra_drm_load()
131 tegra->drm = drm; in tegra_drm_load()
133 drm_mode_config_init(drm); in tegra_drm_load()
135 drm->mode_config.min_width = 0; in tegra_drm_load()
136 drm->mode_config.min_height = 0; in tegra_drm_load()
138 drm->mode_config.max_width = 4096; in tegra_drm_load()
139 drm->mode_config.max_height = 4096; in tegra_drm_load()
141 drm->mode_config.allow_fb_modifiers = true; in tegra_drm_load()
143 drm->mode_config.normalize_zpos = true; in tegra_drm_load()
145 drm->mode_config.funcs = &tegra_drm_mode_config_funcs; in tegra_drm_load()
146 drm->mode_config.helper_private = &tegra_drm_mode_config_helpers; in tegra_drm_load()
148 err = tegra_drm_fb_prepare(drm); in tegra_drm_load()
152 drm_kms_helper_poll_init(drm); in tegra_drm_load()
169 drm->irq_enabled = true; in tegra_drm_load()
172 drm->max_vblank_count = 0xffffffff; in tegra_drm_load()
174 err = drm_vblank_init(drm, drm->mode_config.num_crtc); in tegra_drm_load()
178 drm_mode_config_reset(drm); in tegra_drm_load()
180 err = tegra_drm_fb_init(drm); in tegra_drm_load()
192 drm_kms_helper_poll_fini(drm); in tegra_drm_load()
193 tegra_drm_fb_free(drm); in tegra_drm_load()
195 drm_mode_config_cleanup(drm); in tegra_drm_load()
211 static void tegra_drm_unload(struct drm_device *drm) in tegra_drm_unload() argument
213 struct host1x_device *device = to_host1x_device(drm->dev); in tegra_drm_unload()
214 struct tegra_drm *tegra = drm->dev_private; in tegra_drm_unload()
217 drm_kms_helper_poll_fini(drm); in tegra_drm_unload()
218 tegra_drm_fb_exit(drm); in tegra_drm_unload()
219 drm_atomic_helper_shutdown(drm); in tegra_drm_unload()
220 drm_mode_config_cleanup(drm); in tegra_drm_unload()
237 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) in tegra_drm_open() argument
274 struct drm_device *drm, in host1x_reloc_copy_from_user() argument
312 struct drm_tegra_submit *args, struct drm_device *drm, in tegra_drm_submit() argument
322 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_drm_submit()
417 &user_relocs[num_relocs], drm, in tegra_drm_submit()
492 static int tegra_gem_create(struct drm_device *drm, void *data, in tegra_gem_create() argument
498 bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, in tegra_gem_create()
506 static int tegra_gem_mmap(struct drm_device *drm, void *data, in tegra_gem_mmap() argument
526 static int tegra_syncpt_read(struct drm_device *drm, void *data, in tegra_syncpt_read() argument
529 struct host1x *host = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_read()
541 static int tegra_syncpt_incr(struct drm_device *drm, void *data, in tegra_syncpt_incr() argument
544 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_incr()
555 static int tegra_syncpt_wait(struct drm_device *drm, void *data, in tegra_syncpt_wait() argument
558 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_wait()
593 static int tegra_open_channel(struct drm_device *drm, void *data, in tegra_open_channel() argument
597 struct tegra_drm *tegra = drm->dev_private; in tegra_open_channel()
626 static int tegra_close_channel(struct drm_device *drm, void *data, in tegra_close_channel() argument
650 static int tegra_get_syncpt(struct drm_device *drm, void *data, in tegra_get_syncpt() argument
680 static int tegra_submit(struct drm_device *drm, void *data, in tegra_submit() argument
696 err = context->client->ops->submit(context, args, drm, file); in tegra_submit()
703 static int tegra_get_syncpt_base(struct drm_device *drm, void *data, in tegra_get_syncpt_base() argument
741 static int tegra_gem_set_tiling(struct drm_device *drm, void *data, in tegra_gem_set_tiling() argument
794 static int tegra_gem_get_tiling(struct drm_device *drm, void *data, in tegra_gem_get_tiling() argument
834 static int tegra_gem_set_flags(struct drm_device *drm, void *data, in tegra_gem_set_flags() argument
859 static int tegra_gem_get_flags(struct drm_device *drm, void *data, in tegra_gem_get_flags() argument
936 static void tegra_drm_postclose(struct drm_device *drm, struct drm_file *file) in tegra_drm_postclose() argument
953 struct drm_device *drm = node->minor->dev; in tegra_debugfs_framebuffers() local
956 mutex_lock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
958 list_for_each_entry(fb, &drm->mode_config.fb_list, head) { in tegra_debugfs_framebuffers()
966 mutex_unlock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
974 struct drm_device *drm = node->minor->dev; in tegra_debugfs_iova() local
975 struct tegra_drm *tegra = drm->dev_private; in tegra_debugfs_iova()
1058 struct drm_device *drm = dev_get_drvdata(client->parent); in host1x_client_iommu_attach() local
1059 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_attach()
1088 struct drm_device *drm = dev_get_drvdata(client->parent); in host1x_client_iommu_detach() local
1089 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_detach()
1181 struct drm_device *drm; in host1x_drm_probe() local
1184 drm = drm_dev_alloc(driver, &dev->dev); in host1x_drm_probe()
1185 if (IS_ERR(drm)) in host1x_drm_probe()
1186 return PTR_ERR(drm); in host1x_drm_probe()
1188 dev_set_drvdata(&dev->dev, drm); in host1x_drm_probe()
1190 err = drm_dev_register(drm, 0); in host1x_drm_probe()
1197 drm_dev_unref(drm); in host1x_drm_probe()
1203 struct drm_device *drm = dev_get_drvdata(&dev->dev); in host1x_drm_remove() local
1205 drm_dev_unregister(drm); in host1x_drm_remove()
1206 drm_dev_unref(drm); in host1x_drm_remove()
1214 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_suspend() local
1215 struct tegra_drm *tegra = drm->dev_private; in host1x_drm_suspend()
1217 drm_kms_helper_poll_disable(drm); in host1x_drm_suspend()
1218 tegra_drm_fb_suspend(drm); in host1x_drm_suspend()
1220 tegra->state = drm_atomic_helper_suspend(drm); in host1x_drm_suspend()
1222 tegra_drm_fb_resume(drm); in host1x_drm_suspend()
1223 drm_kms_helper_poll_enable(drm); in host1x_drm_suspend()
1232 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_resume() local
1233 struct tegra_drm *tegra = drm->dev_private; in host1x_drm_resume()
1235 drm_atomic_helper_resume(drm, tegra->state); in host1x_drm_resume()
1236 tegra_drm_fb_resume(drm); in host1x_drm_resume()
1237 drm_kms_helper_poll_enable(drm); in host1x_drm_resume()