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_edid.h>
14 #include <drm/drm_fb_dma_helper.h>
15 #include <drm/drm_fbdev_dma.h>
16 #include <drm/drm_fourcc.h>
17 #include <drm/drm_framebuffer.h>
18 #include <drm/drm_gem_dma_helper.h>
19 #include <drm/drm_gem_framebuffer_helper.h>
20 #include <drm/drm_module.h>
21 #include <drm/drm_of.h>
22 #include <drm/drm_probe_helper.h>
23 #include <drm/drm_simple_kms_helper.h>
50 struct drm_device drm; member
57 #define dev_to_arcpgu(x) container_of(x, struct arcpgu_drm_private, drm)
101 static int arcpgu_drm_sim_init(struct drm_device *drm, struct drm_connector *connector) in arcpgu_drm_sim_init() argument
104 return drm_connector_init(drm, connector, &arcpgu_drm_connector_funcs, in arcpgu_drm_sim_init()
250 struct platform_device *pdev = to_platform_device(arcpgu->drm.dev); in arcpgu_load()
253 struct drm_device *drm = &arcpgu->drm; in arcpgu_load() local
257 arcpgu->clk = devm_clk_get(drm->dev, "pxlclk"); in arcpgu_load()
261 ret = drmm_mode_config_init(drm); in arcpgu_load()
265 drm->mode_config.min_width = 0; in arcpgu_load()
266 drm->mode_config.min_height = 0; in arcpgu_load()
267 drm->mode_config.max_width = 1920; in arcpgu_load()
268 drm->mode_config.max_height = 1080; in arcpgu_load()
269 drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs; in arcpgu_load()
276 dev_info(drm->dev, "arc_pgu ID: 0x%x\n", in arcpgu_load()
280 ret = of_reserved_mem_device_init(drm->dev); in arcpgu_load()
284 if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32))) in arcpgu_load()
297 dev_info(drm->dev, "no encoder found. Assumed virtual LCD on simulation platform\n"); in arcpgu_load()
298 ret = arcpgu_drm_sim_init(drm, connector); in arcpgu_load()
303 ret = drm_simple_display_pipe_init(drm, &arcpgu->pipe, &arc_pgu_pipe_funcs, in arcpgu_load()
313 /* Locate drm bridge from the hdmi encoder DT node */ in arcpgu_load()
323 drm_mode_config_reset(drm); in arcpgu_load()
324 drm_kms_helper_poll_init(drm); in arcpgu_load()
326 platform_set_drvdata(pdev, drm); in arcpgu_load()
330 static int arcpgu_unload(struct drm_device *drm) in arcpgu_unload() argument
332 drm_kms_helper_poll_fini(drm); in arcpgu_unload()
333 drm_atomic_helper_shutdown(drm); in arcpgu_unload()
342 struct drm_device *drm = node->minor->dev; in arcpgu_show_pxlclock() local
343 struct arcpgu_drm_private *arcpgu = dev_to_arcpgu(drm); in arcpgu_show_pxlclock()
385 struct arcpgu_drm_private, drm); in arcpgu_probe()
393 ret = drm_dev_register(&arcpgu->drm, 0); in arcpgu_probe()
397 drm_fbdev_dma_setup(&arcpgu->drm, 16); in arcpgu_probe()
402 arcpgu_unload(&arcpgu->drm); in arcpgu_probe()
409 struct drm_device *drm = platform_get_drvdata(pdev); in arcpgu_remove() local
411 drm_dev_unregister(drm); in arcpgu_remove()
412 arcpgu_unload(drm); in arcpgu_remove()
434 MODULE_DESCRIPTION("ARC PGU DRM driver");