Lines Matching full:drm
16 #include <drm/clients/drm_client_setup.h>
17 #include <drm/drm_atomic_helper.h>
18 #include <drm/drm_device.h>
19 #include <drm/drm_fbdev_dma.h>
20 #include <drm/drm_gem_dma_helper.h>
21 #include <drm/drm_gem_framebuffer_helper.h>
22 #include <drm/drm_module.h>
23 #include <drm/drm_probe_helper.h>
24 #include <drm/drm_simple_kms_helper.h>
25 #include <drm/drm_vblank.h>
26 #include <drm/drm_drv.h>
107 static int aspeed_gfx_setup_mode_config(struct drm_device *drm) in aspeed_gfx_setup_mode_config() argument
111 ret = drmm_mode_config_init(drm); in aspeed_gfx_setup_mode_config()
115 drm->mode_config.min_width = 0; in aspeed_gfx_setup_mode_config()
116 drm->mode_config.min_height = 0; in aspeed_gfx_setup_mode_config()
117 drm->mode_config.max_width = 800; in aspeed_gfx_setup_mode_config()
118 drm->mode_config.max_height = 600; in aspeed_gfx_setup_mode_config()
119 drm->mode_config.funcs = &aspeed_gfx_mode_config_funcs; in aspeed_gfx_setup_mode_config()
126 struct drm_device *drm = data; in aspeed_gfx_irq_handler() local
127 struct aspeed_gfx *priv = to_aspeed_gfx(drm); in aspeed_gfx_irq_handler()
141 static int aspeed_gfx_load(struct drm_device *drm) in aspeed_gfx_load() argument
143 struct platform_device *pdev = to_platform_device(drm->dev); in aspeed_gfx_load()
144 struct aspeed_gfx *priv = to_aspeed_gfx(drm); in aspeed_gfx_load()
172 ret = of_reserved_mem_device_init(drm->dev); in aspeed_gfx_load()
179 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)); in aspeed_gfx_load()
193 priv->clk = devm_clk_get(drm->dev, NULL); in aspeed_gfx_load()
205 ret = aspeed_gfx_setup_mode_config(drm); in aspeed_gfx_load()
209 ret = drm_vblank_init(drm, 1); in aspeed_gfx_load()
211 dev_err(drm->dev, "Failed to initialise vblank\n"); in aspeed_gfx_load()
215 ret = aspeed_gfx_create_output(drm); in aspeed_gfx_load()
217 dev_err(drm->dev, "Failed to create outputs\n"); in aspeed_gfx_load()
221 ret = aspeed_gfx_create_pipe(drm); in aspeed_gfx_load()
223 dev_err(drm->dev, "Cannot setup simple display pipe\n"); in aspeed_gfx_load()
227 ret = devm_request_irq(drm->dev, platform_get_irq(pdev, 0), in aspeed_gfx_load()
228 aspeed_gfx_irq_handler, 0, "aspeed gfx", drm); in aspeed_gfx_load()
230 dev_err(drm->dev, "Failed to install IRQ handler\n"); in aspeed_gfx_load()
234 drm_mode_config_reset(drm); in aspeed_gfx_load()
239 static void aspeed_gfx_unload(struct drm_device *drm) in aspeed_gfx_unload() argument
241 drm_kms_helper_poll_fini(drm); in aspeed_gfx_unload()
251 .name = "aspeed-gfx-drm",
252 .desc = "ASPEED GFX DRM",
323 struct aspeed_gfx, drm); in aspeed_gfx_probe()
327 ret = aspeed_gfx_load(&priv->drm); in aspeed_gfx_probe()
337 ret = drm_dev_register(&priv->drm, 0); in aspeed_gfx_probe()
341 drm_client_setup(&priv->drm, NULL); in aspeed_gfx_probe()
346 aspeed_gfx_unload(&priv->drm); in aspeed_gfx_probe()
353 struct drm_device *drm = platform_get_drvdata(pdev); in aspeed_gfx_remove() local
356 drm_dev_unregister(drm); in aspeed_gfx_remove()
357 aspeed_gfx_unload(drm); in aspeed_gfx_remove()
358 drm_atomic_helper_shutdown(drm); in aspeed_gfx_remove()
379 MODULE_DESCRIPTION("ASPEED BMC DRM/KMS driver");