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()
66 static void tegra_atomic_post_commit(struct drm_device *drm, in tegra_atomic_post_commit() argument
79 struct drm_device *drm = old_state->dev; in tegra_atomic_commit_tail() local
80 struct tegra_drm *tegra = drm->dev_private; in tegra_atomic_commit_tail()
85 drm_atomic_helper_commit_modeset_disables(drm, old_state); in tegra_atomic_commit_tail()
86 tegra_display_hub_atomic_commit(drm, old_state); in tegra_atomic_commit_tail()
87 drm_atomic_helper_commit_planes(drm, old_state, 0); in tegra_atomic_commit_tail()
88 drm_atomic_helper_commit_modeset_enables(drm, old_state); in tegra_atomic_commit_tail()
91 drm_atomic_helper_wait_for_vblanks(drm, old_state); in tegra_atomic_commit_tail()
92 drm_atomic_helper_cleanup_planes(drm, old_state); in tegra_atomic_commit_tail()
97 tegra_atomic_post_commit(drm, old_state); in tegra_atomic_commit_tail()
105 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) in tegra_drm_open() argument
131 struct drm_device *drm, in host1x_reloc_copy_from_user() argument
171 struct drm_tegra_submit *args, struct drm_device *drm, in tegra_drm_submit() argument
181 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_drm_submit()
277 &user_relocs[num_relocs], drm, in tegra_drm_submit()
352 static int tegra_gem_create(struct drm_device *drm, void *data, in tegra_gem_create() argument
358 bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, in tegra_gem_create()
366 static int tegra_gem_mmap(struct drm_device *drm, void *data, in tegra_gem_mmap() argument
386 static int tegra_syncpt_read(struct drm_device *drm, void *data, in tegra_syncpt_read() argument
389 struct host1x *host = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_read()
401 static int tegra_syncpt_incr(struct drm_device *drm, void *data, in tegra_syncpt_incr() argument
404 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_incr()
415 static int tegra_syncpt_wait(struct drm_device *drm, void *data, in tegra_syncpt_wait() argument
418 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_wait()
460 static int tegra_open_channel(struct drm_device *drm, void *data, in tegra_open_channel() argument
464 struct tegra_drm *tegra = drm->dev_private; in tegra_open_channel()
493 static int tegra_close_channel(struct drm_device *drm, void *data, in tegra_close_channel() argument
517 static int tegra_get_syncpt(struct drm_device *drm, void *data, in tegra_get_syncpt() argument
547 static int tegra_submit(struct drm_device *drm, void *data, in tegra_submit() argument
563 err = context->client->ops->submit(context, args, drm, file); in tegra_submit()
570 static int tegra_get_syncpt_base(struct drm_device *drm, void *data, in tegra_get_syncpt_base() argument
608 static int tegra_gem_set_tiling(struct drm_device *drm, void *data, in tegra_gem_set_tiling() argument
661 static int tegra_gem_get_tiling(struct drm_device *drm, void *data, in tegra_gem_get_tiling() argument
701 static int tegra_gem_set_flags(struct drm_device *drm, void *data, in tegra_gem_set_flags() argument
726 static int tegra_gem_get_flags(struct drm_device *drm, void *data, in tegra_gem_get_flags() argument
818 static void tegra_drm_postclose(struct drm_device *drm, struct drm_file *file) in tegra_drm_postclose() argument
836 struct drm_device *drm = node->minor->dev; in tegra_debugfs_framebuffers() local
839 mutex_lock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
841 list_for_each_entry(fb, &drm->mode_config.fb_list, head) { in tegra_debugfs_framebuffers()
849 mutex_unlock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
857 struct drm_device *drm = node->minor->dev; in tegra_debugfs_iova() local
858 struct tegra_drm *tegra = drm->dev_private; in tegra_debugfs_iova()
925 client->drm = tegra; in tegra_drm_register_client()
936 client->drm = NULL; in tegra_drm_unregister_client()
948 struct drm_device *drm = dev_get_drvdata(client->host); in host1x_client_iommu_attach() local
949 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_attach()
995 struct drm_device *drm = dev_get_drvdata(client->host); in host1x_client_iommu_detach() local
996 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_detach()
1144 struct drm_device *drm; in host1x_drm_probe() local
1147 drm = drm_dev_alloc(&tegra_drm_driver, &dev->dev); in host1x_drm_probe()
1148 if (IS_ERR(drm)) in host1x_drm_probe()
1149 return PTR_ERR(drm); in host1x_drm_probe()
1172 dev_set_drvdata(&dev->dev, drm); in host1x_drm_probe()
1173 drm->dev_private = tegra; in host1x_drm_probe()
1174 tegra->drm = drm; in host1x_drm_probe()
1176 drm_mode_config_init(drm); in host1x_drm_probe()
1178 drm->mode_config.min_width = 0; in host1x_drm_probe()
1179 drm->mode_config.min_height = 0; in host1x_drm_probe()
1180 drm->mode_config.max_width = 0; in host1x_drm_probe()
1181 drm->mode_config.max_height = 0; in host1x_drm_probe()
1183 drm->mode_config.normalize_zpos = true; in host1x_drm_probe()
1185 drm->mode_config.funcs = &tegra_drm_mode_config_funcs; in host1x_drm_probe()
1186 drm->mode_config.helper_private = &tegra_drm_mode_config_helpers; in host1x_drm_probe()
1188 err = tegra_drm_fb_prepare(drm); in host1x_drm_probe()
1192 drm_kms_helper_poll_init(drm); in host1x_drm_probe()
1203 tegra->hmask = drm->mode_config.max_width - 1; in host1x_drm_probe()
1204 tegra->vmask = drm->mode_config.max_height - 1; in host1x_drm_probe()
1247 drm->max_vblank_count = 0xffffffff; in host1x_drm_probe()
1249 err = drm_vblank_init(drm, drm->mode_config.num_crtc); in host1x_drm_probe()
1253 drm_mode_config_reset(drm); in host1x_drm_probe()
1259 err = tegra_drm_fb_init(drm); in host1x_drm_probe()
1263 err = drm_dev_register(drm, 0); in host1x_drm_probe()
1270 tegra_drm_fb_exit(drm); in host1x_drm_probe()
1284 drm_kms_helper_poll_fini(drm); in host1x_drm_probe()
1285 tegra_drm_fb_free(drm); in host1x_drm_probe()
1287 drm_mode_config_cleanup(drm); in host1x_drm_probe()
1294 drm_dev_put(drm); in host1x_drm_probe()
1300 struct drm_device *drm = dev_get_drvdata(&dev->dev); in host1x_drm_remove() local
1301 struct tegra_drm *tegra = drm->dev_private; in host1x_drm_remove()
1304 drm_dev_unregister(drm); in host1x_drm_remove()
1306 drm_kms_helper_poll_fini(drm); in host1x_drm_remove()
1307 tegra_drm_fb_exit(drm); in host1x_drm_remove()
1308 drm_atomic_helper_shutdown(drm); in host1x_drm_remove()
1309 drm_mode_config_cleanup(drm); in host1x_drm_remove()
1327 drm_dev_put(drm); in host1x_drm_remove()
1335 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_suspend() local
1337 return drm_mode_config_helper_suspend(drm); in host1x_drm_suspend()
1342 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_resume() local
1344 return drm_mode_config_helper_resume(drm); in host1x_drm_resume()