Lines Matching full:drm

16 #include <drm/drm_atomic_helper.h>
17 #include <drm/drm_crtc_helper.h>
18 #include <drm/drm_device.h>
19 #include <drm/drm_fb_helper.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()
152 priv->base = devm_ioremap_resource(drm->dev, res); in aspeed_gfx_load()
176 ret = of_reserved_mem_device_init(drm->dev); in aspeed_gfx_load()
183 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)); in aspeed_gfx_load()
197 priv->clk = devm_clk_get(drm->dev, NULL); in aspeed_gfx_load()
209 ret = aspeed_gfx_setup_mode_config(drm); in aspeed_gfx_load()
213 ret = drm_vblank_init(drm, 1); in aspeed_gfx_load()
215 dev_err(drm->dev, "Failed to initialise vblank\n"); in aspeed_gfx_load()
219 ret = aspeed_gfx_create_output(drm); in aspeed_gfx_load()
221 dev_err(drm->dev, "Failed to create outputs\n"); in aspeed_gfx_load()
225 ret = aspeed_gfx_create_pipe(drm); in aspeed_gfx_load()
227 dev_err(drm->dev, "Cannot setup simple display pipe\n"); in aspeed_gfx_load()
231 ret = devm_request_irq(drm->dev, platform_get_irq(pdev, 0), in aspeed_gfx_load()
232 aspeed_gfx_irq_handler, 0, "aspeed gfx", drm); in aspeed_gfx_load()
234 dev_err(drm->dev, "Failed to install IRQ handler\n"); in aspeed_gfx_load()
238 drm_mode_config_reset(drm); in aspeed_gfx_load()
243 static void aspeed_gfx_unload(struct drm_device *drm) in aspeed_gfx_unload() argument
245 drm_kms_helper_poll_fini(drm); in aspeed_gfx_unload()
254 .name = "aspeed-gfx-drm",
255 .desc = "ASPEED GFX DRM",
327 struct aspeed_gfx, drm); in aspeed_gfx_probe()
331 ret = aspeed_gfx_load(&priv->drm); in aspeed_gfx_probe()
341 ret = drm_dev_register(&priv->drm, 0); in aspeed_gfx_probe()
345 drm_fbdev_generic_setup(&priv->drm, 32); in aspeed_gfx_probe()
350 aspeed_gfx_unload(&priv->drm); in aspeed_gfx_probe()
357 struct drm_device *drm = platform_get_drvdata(pdev); in aspeed_gfx_remove() local
360 drm_dev_unregister(drm); in aspeed_gfx_remove()
361 aspeed_gfx_unload(drm); in aspeed_gfx_remove()
378 MODULE_DESCRIPTION("ASPEED BMC DRM/KMS driver");