Lines Matching full:drm

6  * ARM Mali DP500/DP550/DP650 KMS/DRM driver
18 #include <drm/drm_atomic.h>
19 #include <drm/drm_atomic_helper.h>
20 #include <drm/drm_crtc.h>
21 #include <drm/drm_drv.h>
22 #include <drm/drm_fb_helper.h>
23 #include <drm/drm_fourcc.h>
24 #include <drm/drm_gem_dma_helper.h>
25 #include <drm/drm_gem_framebuffer_helper.h>
26 #include <drm/drm_modeset_helper.h>
27 #include <drm/drm_module.h>
28 #include <drm/drm_of.h>
29 #include <drm/drm_probe_helper.h>
30 #include <drm/drm_vblank.h>
169 static int malidp_set_and_wait_config_valid(struct drm_device *drm) in malidp_set_and_wait_config_valid() argument
171 struct malidp_drm *malidp = drm->dev_private; in malidp_set_and_wait_config_valid()
191 struct drm_device *drm = state->dev; in malidp_atomic_commit_hw_done() local
192 struct malidp_drm *malidp = drm->dev_private; in malidp_atomic_commit_hw_done()
208 if (malidp_set_and_wait_config_valid(drm) < 0) { in malidp_atomic_commit_hw_done()
214 if (!malidp_set_and_wait_config_valid(drm)) in malidp_atomic_commit_hw_done()
222 spin_lock_irq(&drm->event_lock); in malidp_atomic_commit_hw_done()
225 spin_unlock_irq(&drm->event_lock); in malidp_atomic_commit_hw_done()
232 struct drm_device *drm = state->dev; in malidp_atomic_commit_tail() local
233 struct malidp_drm *malidp = drm->dev_private; in malidp_atomic_commit_tail()
239 pm_runtime_get_sync(drm->dev); in malidp_atomic_commit_tail()
248 drm_atomic_helper_commit_modeset_disables(drm, state); in malidp_atomic_commit_tail()
256 drm_atomic_helper_commit_planes(drm, state, DRM_PLANE_COMMIT_ACTIVE_ONLY); in malidp_atomic_commit_tail()
258 malidp_mw_atomic_commit(drm, state); in malidp_atomic_commit_tail()
260 drm_atomic_helper_commit_modeset_enables(drm, state); in malidp_atomic_commit_tail()
266 pm_runtime_put(drm->dev); in malidp_atomic_commit_tail()
268 drm_atomic_helper_cleanup_planes(drm, state); in malidp_atomic_commit_tail()
392 static int malidp_init(struct drm_device *drm) in malidp_init() argument
395 struct malidp_drm *malidp = drm->dev_private; in malidp_init()
398 drm_mode_config_init(drm); in malidp_init()
400 drm->mode_config.min_width = hwdev->min_line_size; in malidp_init()
401 drm->mode_config.min_height = hwdev->min_line_size; in malidp_init()
402 drm->mode_config.max_width = hwdev->max_line_size; in malidp_init()
403 drm->mode_config.max_height = hwdev->max_line_size; in malidp_init()
404 drm->mode_config.funcs = &malidp_mode_config_funcs; in malidp_init()
405 drm->mode_config.helper_private = &malidp_mode_config_helpers; in malidp_init()
407 ret = malidp_crtc_init(drm); in malidp_init()
411 ret = malidp_mw_connector_init(drm); in malidp_init()
418 drm_mode_config_cleanup(drm); in malidp_init()
422 static void malidp_fini(struct drm_device *drm) in malidp_fini() argument
424 drm_mode_config_cleanup(drm); in malidp_fini()
430 struct drm_device *drm = dev_get_drvdata(&pdev->dev); in malidp_irq_init() local
431 struct malidp_drm *malidp = drm->dev_private; in malidp_irq_init()
446 ret = malidp_de_irq_init(drm, irq_de); in malidp_irq_init()
450 ret = malidp_se_irq_init(drm, irq_se); in malidp_irq_init()
462 struct drm_device *drm, in malidp_dumb_create() argument
465 struct malidp_drm *malidp = drm->dev_private; in malidp_dumb_create()
471 return drm_gem_dma_dumb_create_internal(file_priv, drm, args); in malidp_dumb_create()
510 struct drm_device *drm = m->private; in malidp_show_stats() local
511 struct malidp_drm *malidp = drm->dev_private; in malidp_show_stats()
533 struct drm_device *drm = m->private; in malidp_debugfs_write() local
534 struct malidp_drm *malidp = drm->dev_private; in malidp_debugfs_write()
654 struct drm_device *drm = dev_get_drvdata(dev); in core_id_show() local
655 struct malidp_drm *malidp = drm->dev_private; in core_id_show()
672 struct drm_device *drm = dev_get_drvdata(dev); in malidp_runtime_pm_suspend() local
673 struct malidp_drm *malidp = drm->dev_private; in malidp_runtime_pm_suspend()
691 struct drm_device *drm = dev_get_drvdata(dev); in malidp_runtime_pm_resume() local
692 struct malidp_drm *malidp = drm->dev_private; in malidp_runtime_pm_resume()
708 struct drm_device *drm; in malidp_bind() local
756 drm = drm_dev_alloc(&malidp_driver, dev); in malidp_bind()
757 if (IS_ERR(drm)) { in malidp_bind()
758 ret = PTR_ERR(drm); in malidp_bind()
762 drm->dev_private = malidp; in malidp_bind()
763 dev_set_drvdata(dev, drm); in malidp_bind()
824 ret = malidp_init(drm); in malidp_bind()
831 ret = component_bind_all(dev, drm); in malidp_bind()
840 WARN_ON(drm->mode_config.num_encoder > 2); in malidp_bind()
841 list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) { in malidp_bind()
843 (1 << drm->mode_config.num_encoder) - 1; in malidp_bind()
850 ret = drm_vblank_init(drm, drm->mode_config.num_crtc); in malidp_bind()
857 drm_mode_config_reset(drm); in malidp_bind()
859 drm_kms_helper_poll_init(drm); in malidp_bind()
861 ret = drm_dev_register(drm, 0); in malidp_bind()
865 drm_fbdev_generic_setup(drm, 32); in malidp_bind()
870 drm_kms_helper_poll_fini(drm); in malidp_bind()
876 drm_atomic_helper_shutdown(drm); in malidp_bind()
877 component_unbind_all(dev, drm); in malidp_bind()
881 malidp_fini(drm); in malidp_bind()
888 drm->dev_private = NULL; in malidp_bind()
890 drm_dev_put(drm); in malidp_bind()
899 struct drm_device *drm = dev_get_drvdata(dev); in malidp_unbind() local
900 struct malidp_drm *malidp = drm->dev_private; in malidp_unbind()
903 drm_dev_unregister(drm); in malidp_unbind()
904 drm_kms_helper_poll_fini(drm); in malidp_unbind()
906 drm_atomic_helper_shutdown(drm); in malidp_unbind()
909 component_unbind_all(dev, drm); in malidp_unbind()
912 malidp_fini(drm); in malidp_unbind()
918 drm->dev_private = NULL; in malidp_unbind()
920 drm_dev_put(drm); in malidp_unbind()
964 struct drm_device *drm = dev_get_drvdata(dev); in malidp_pm_suspend() local
966 return drm_mode_config_helper_suspend(drm); in malidp_pm_suspend()
971 struct drm_device *drm = dev_get_drvdata(dev); in malidp_pm_resume() local
973 drm_mode_config_helper_resume(drm); in malidp_pm_resume()
1014 MODULE_DESCRIPTION("ARM Mali DP DRM driver");