• Home
  • Raw
  • Download

Lines Matching full:drm

3  * ARC PGU DRM driver.
9 #include <drm/drm_atomic_helper.h>
10 #include <drm/drm_debugfs.h>
11 #include <drm/drm_device.h>
12 #include <drm/drm_drv.h>
13 #include <drm/drm_fb_cma_helper.h>
14 #include <drm/drm_fb_helper.h>
15 #include <drm/drm_gem_cma_helper.h>
16 #include <drm/drm_gem_framebuffer_helper.h>
17 #include <drm/drm_of.h>
18 #include <drm/drm_probe_helper.h>
33 static void arcpgu_setup_mode_config(struct drm_device *drm) in arcpgu_setup_mode_config() argument
35 drm_mode_config_init(drm); in arcpgu_setup_mode_config()
36 drm->mode_config.min_width = 0; in arcpgu_setup_mode_config()
37 drm->mode_config.min_height = 0; in arcpgu_setup_mode_config()
38 drm->mode_config.max_width = 1920; in arcpgu_setup_mode_config()
39 drm->mode_config.max_height = 1080; in arcpgu_setup_mode_config()
40 drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs; in arcpgu_setup_mode_config()
45 static int arcpgu_load(struct drm_device *drm) in arcpgu_load() argument
47 struct platform_device *pdev = to_platform_device(drm->dev); in arcpgu_load()
57 drm->dev_private = arcpgu; in arcpgu_load()
59 arcpgu->clk = devm_clk_get(drm->dev, "pxlclk"); in arcpgu_load()
63 arcpgu_setup_mode_config(drm); in arcpgu_load()
70 dev_info(drm->dev, "arc_pgu ID: 0x%x\n", in arcpgu_load()
74 ret = of_reserved_mem_device_init(drm->dev); in arcpgu_load()
78 if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32))) in arcpgu_load()
81 if (arc_pgu_setup_crtc(drm) < 0) in arcpgu_load()
95 ret = arcpgu_drm_hdmi_init(drm, encoder_node); in arcpgu_load()
100 dev_info(drm->dev, "no encoder found. Assumed virtual LCD on simulation platform\n"); in arcpgu_load()
101 ret = arcpgu_drm_sim_init(drm, NULL); in arcpgu_load()
106 drm_mode_config_reset(drm); in arcpgu_load()
107 drm_kms_helper_poll_init(drm); in arcpgu_load()
109 platform_set_drvdata(pdev, drm); in arcpgu_load()
113 static int arcpgu_unload(struct drm_device *drm) in arcpgu_unload() argument
115 drm_kms_helper_poll_fini(drm); in arcpgu_unload()
116 drm_atomic_helper_shutdown(drm); in arcpgu_unload()
117 drm_mode_config_cleanup(drm); in arcpgu_unload()
126 struct drm_device *drm = node->minor->dev; in arcpgu_show_pxlclock() local
127 struct arcpgu_drm_private *arcpgu = drm->dev_private; in arcpgu_show_pxlclock()
165 struct drm_device *drm; in arcpgu_probe() local
168 drm = drm_dev_alloc(&arcpgu_drm_driver, &pdev->dev); in arcpgu_probe()
169 if (IS_ERR(drm)) in arcpgu_probe()
170 return PTR_ERR(drm); in arcpgu_probe()
172 ret = arcpgu_load(drm); in arcpgu_probe()
176 ret = drm_dev_register(drm, 0); in arcpgu_probe()
180 drm_fbdev_generic_setup(drm, 16); in arcpgu_probe()
185 arcpgu_unload(drm); in arcpgu_probe()
188 drm_dev_put(drm); in arcpgu_probe()
195 struct drm_device *drm = platform_get_drvdata(pdev); in arcpgu_remove() local
197 drm_dev_unregister(drm); in arcpgu_remove()
198 arcpgu_unload(drm); in arcpgu_remove()
199 drm_dev_put(drm); in arcpgu_remove()
223 MODULE_DESCRIPTION("ARC PGU DRM driver");