Lines Matching full:drm

16 #include <drm/clients/drm_client_setup.h>
17 #include <drm/drm_atomic.h>
18 #include <drm/drm_atomic_helper.h>
19 #include <drm/drm_debugfs.h>
20 #include <drm/drm_drv.h>
21 #include <drm/drm_fourcc.h>
22 #include <drm/drm_framebuffer.h>
23 #include <drm/drm_ioctl.h>
24 #include <drm/drm_prime.h>
25 #include <drm/drm_print.h>
26 #include <drm/drm_vblank.h>
33 #include "drm.h"
46 static int tegra_atomic_check(struct drm_device *drm, in tegra_atomic_check() argument
51 err = drm_atomic_helper_check(drm, state); in tegra_atomic_check()
55 return tegra_display_hub_atomic_check(drm, state); in tegra_atomic_check()
64 static void tegra_atomic_post_commit(struct drm_device *drm, in tegra_atomic_post_commit() argument
77 struct drm_device *drm = old_state->dev; in tegra_atomic_commit_tail() local
78 struct tegra_drm *tegra = drm->dev_private; in tegra_atomic_commit_tail()
83 drm_atomic_helper_commit_modeset_disables(drm, old_state); in tegra_atomic_commit_tail()
84 tegra_display_hub_atomic_commit(drm, old_state); in tegra_atomic_commit_tail()
85 drm_atomic_helper_commit_planes(drm, old_state, 0); in tegra_atomic_commit_tail()
86 drm_atomic_helper_commit_modeset_enables(drm, old_state); in tegra_atomic_commit_tail()
89 drm_atomic_helper_wait_for_vblanks(drm, old_state); in tegra_atomic_commit_tail()
90 drm_atomic_helper_cleanup_planes(drm, old_state); in tegra_atomic_commit_tail()
95 tegra_atomic_post_commit(drm, old_state); in tegra_atomic_commit_tail()
103 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) in tegra_drm_open() argument
129 struct drm_device *drm, in host1x_reloc_copy_from_user() argument
169 struct drm_tegra_submit *args, struct drm_device *drm, in tegra_drm_submit() argument
179 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_drm_submit()
275 &user_relocs[num_relocs], drm, in tegra_drm_submit()
350 static int tegra_gem_create(struct drm_device *drm, void *data, in tegra_gem_create() argument
356 bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags, in tegra_gem_create()
364 static int tegra_gem_mmap(struct drm_device *drm, void *data, in tegra_gem_mmap() argument
384 static int tegra_syncpt_read(struct drm_device *drm, void *data, in tegra_syncpt_read() argument
387 struct host1x *host = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_read()
399 static int tegra_syncpt_incr(struct drm_device *drm, void *data, in tegra_syncpt_incr() argument
402 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_incr()
413 static int tegra_syncpt_wait(struct drm_device *drm, void *data, in tegra_syncpt_wait() argument
416 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); in tegra_syncpt_wait()
458 static int tegra_open_channel(struct drm_device *drm, void *data, in tegra_open_channel() argument
462 struct tegra_drm *tegra = drm->dev_private; in tegra_open_channel()
491 static int tegra_close_channel(struct drm_device *drm, void *data, in tegra_close_channel() argument
515 static int tegra_get_syncpt(struct drm_device *drm, void *data, in tegra_get_syncpt() argument
545 static int tegra_submit(struct drm_device *drm, void *data, in tegra_submit() argument
561 err = context->client->ops->submit(context, args, drm, file); in tegra_submit()
568 static int tegra_get_syncpt_base(struct drm_device *drm, void *data, in tegra_get_syncpt_base() argument
606 static int tegra_gem_set_tiling(struct drm_device *drm, void *data, in tegra_gem_set_tiling() argument
659 static int tegra_gem_get_tiling(struct drm_device *drm, void *data, in tegra_gem_get_tiling() argument
699 static int tegra_gem_set_flags(struct drm_device *drm, void *data, in tegra_gem_set_flags() argument
724 static int tegra_gem_get_flags(struct drm_device *drm, void *data, in tegra_gem_get_flags() argument
817 static void tegra_drm_postclose(struct drm_device *drm, struct drm_file *file) in tegra_drm_postclose() argument
835 struct drm_device *drm = node->minor->dev; in tegra_debugfs_framebuffers() local
838 mutex_lock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
840 list_for_each_entry(fb, &drm->mode_config.fb_list, head) { in tegra_debugfs_framebuffers()
848 mutex_unlock(&drm->mode_config.fb_lock); in tegra_debugfs_framebuffers()
856 struct drm_device *drm = node->minor->dev; in tegra_debugfs_iova() local
857 struct tegra_drm *tegra = drm->dev_private; in tegra_debugfs_iova()
922 client->drm = tegra; in tegra_drm_register_client()
933 client->drm = NULL; in tegra_drm_unregister_client()
945 struct drm_device *drm = dev_get_drvdata(client->host); in host1x_client_iommu_attach() local
946 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_attach()
993 struct drm_device *drm = dev_get_drvdata(client->host); in host1x_client_iommu_detach() local
994 struct tegra_drm *tegra = drm->dev_private; in host1x_client_iommu_detach()
1099 * If the Tegra DRM clients are backed by an IOMMU, push buffers are in host1x_drm_wants_iommu()
1116 * Work around this by making sure that Tegra DRM clients only use in host1x_drm_wants_iommu()
1143 struct drm_device *drm; in host1x_drm_probe() local
1146 drm = drm_dev_alloc(&tegra_drm_driver, &dev->dev); in host1x_drm_probe()
1147 if (IS_ERR(drm)) in host1x_drm_probe()
1148 return PTR_ERR(drm); in host1x_drm_probe()
1171 dev_set_drvdata(&dev->dev, drm); in host1x_drm_probe()
1172 drm->dev_private = tegra; in host1x_drm_probe()
1173 tegra->drm = drm; in host1x_drm_probe()
1175 drm_mode_config_init(drm); in host1x_drm_probe()
1177 drm->mode_config.min_width = 0; in host1x_drm_probe()
1178 drm->mode_config.min_height = 0; in host1x_drm_probe()
1179 drm->mode_config.max_width = 0; in host1x_drm_probe()
1180 drm->mode_config.max_height = 0; in host1x_drm_probe()
1182 drm->mode_config.normalize_zpos = true; in host1x_drm_probe()
1184 drm->mode_config.funcs = &tegra_drm_mode_config_funcs; in host1x_drm_probe()
1185 drm->mode_config.helper_private = &tegra_drm_mode_config_helpers; in host1x_drm_probe()
1187 drm_kms_helper_poll_init(drm); in host1x_drm_probe()
1198 tegra->hmask = drm->mode_config.max_width - 1; in host1x_drm_probe()
1199 tegra->vmask = drm->mode_config.max_height - 1; in host1x_drm_probe()
1242 drm->max_vblank_count = 0xffffffff; in host1x_drm_probe()
1244 err = drm_vblank_init(drm, drm->mode_config.num_crtc); in host1x_drm_probe()
1248 drm_mode_config_reset(drm); in host1x_drm_probe()
1259 if (drm->mode_config.num_crtc > 0) { in host1x_drm_probe()
1268 drm->driver_features &= ~(DRIVER_MODESET | DRIVER_ATOMIC); in host1x_drm_probe()
1271 err = drm_dev_register(drm, 0); in host1x_drm_probe()
1275 drm_client_setup(drm, NULL); in host1x_drm_probe()
1292 drm_kms_helper_poll_fini(drm); in host1x_drm_probe()
1293 drm_mode_config_cleanup(drm); in host1x_drm_probe()
1300 drm_dev_put(drm); in host1x_drm_probe()
1306 struct drm_device *drm = dev_get_drvdata(&dev->dev); in host1x_drm_remove() local
1307 struct tegra_drm *tegra = drm->dev_private; in host1x_drm_remove()
1310 drm_dev_unregister(drm); in host1x_drm_remove()
1312 drm_kms_helper_poll_fini(drm); in host1x_drm_remove()
1313 drm_atomic_helper_shutdown(drm); in host1x_drm_remove()
1314 drm_mode_config_cleanup(drm); in host1x_drm_remove()
1332 drm_dev_put(drm); in host1x_drm_remove()
1343 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_suspend() local
1345 return drm_mode_config_helper_suspend(drm); in host1x_drm_suspend()
1350 struct drm_device *drm = dev_get_drvdata(dev); in host1x_drm_resume() local
1352 return drm_mode_config_helper_resume(drm); in host1x_drm_resume()
1404 .name = "drm",
1458 MODULE_DESCRIPTION("NVIDIA Tegra DRM driver");