Lines Matching defs:drm

12 #include <drm/drm_atomic.h>
13 #include <drm/drm_atomic_helper.h>
14 #include <drm/drm_blend.h>
15 #include <drm/drm_bridge.h>
16 #include <drm/drm_bridge_connector.h>
17 #include <drm/drm_connector.h>
18 #include <drm/drm_crtc.h>
19 #include <drm/drm_device.h>
20 #include <drm/drm_drv.h>
21 #include <drm/drm_encoder.h>
22 #include <drm/drm_fbdev_dma.h>
23 #include <drm/drm_fourcc.h>
24 #include <drm/drm_framebuffer.h>
25 #include <drm/drm_gem_dma_helper.h>
26 #include <drm/drm_gem_framebuffer_helper.h>
27 #include <drm/drm_managed.h>
28 #include <drm/drm_mode_config.h>
29 #include <drm/drm_plane.h>
30 #include <drm/drm_probe_helper.h>
31 #include <drm/drm_simple_kms_helper.h>
32 #include <drm/drm_vblank.h>
44 static inline struct zynqmp_dpsub *to_zynqmp_dpsub(struct drm_device *drm)
46 return container_of(drm, struct zynqmp_dpsub_drm, dev)->dpsub;
148 for (i = 0; i < ARRAY_SIZE(dpsub->drm->planes); i++) {
150 struct drm_plane *plane = &dpsub->drm->planes[i];
162 ret = drm_universal_plane_init(&dpsub->drm->dev, plane, 0,
314 struct drm_plane *plane = &dpsub->drm->planes[ZYNQMP_DPSUB_LAYER_GFX];
315 struct drm_crtc *crtc = &dpsub->drm->crtc;
318 ret = drm_crtc_init_with_planes(&dpsub->drm->dev, crtc, plane,
333 u32 possible_crtcs = drm_crtc_mask(&dpsub->drm->crtc);
336 for (i = 0; i < ARRAY_SIZE(dpsub->drm->planes); i++)
337 dpsub->drm->planes[i].possible_crtcs = possible_crtcs;
349 drm_crtc_handle_vblank(&dpsub->drm->crtc);
357 struct drm_device *drm,
360 struct zynqmp_dpsub *dpsub = to_zynqmp_dpsub(drm);
366 return drm_gem_dma_dumb_create_internal(file_priv, drm, args);
370 zynqmp_dpsub_fb_create(struct drm_device *drm, struct drm_file *file_priv,
373 struct zynqmp_dpsub *dpsub = to_zynqmp_dpsub(drm);
381 return drm_gem_fb_create(drm, file_priv, &cmd);
413 struct drm_encoder *encoder = &dpsub->drm->encoder;
429 encoder->possible_crtcs |= drm_crtc_mask(&dpsub->drm->crtc);
430 drm_simple_encoder_init(&dpsub->drm->dev, encoder, DRM_MODE_ENCODER_NONE);
440 connector = drm_bridge_connector_init(&dpsub->drm->dev, encoder);
455 static void zynqmp_dpsub_drm_release(struct drm_device *drm, void *res)
465 struct drm_device *drm;
471 * dpsub->drm will remain NULL, which tells the caller that it must
480 drm = &dpdrm->dev;
482 ret = drmm_add_action(drm, zynqmp_dpsub_drm_release, dpdrm);
486 dpsub->drm = dpdrm;
489 ret = drmm_mode_config_init(drm);
493 drm->mode_config.funcs = &zynqmp_dpsub_mode_config_funcs;
494 drm->mode_config.min_width = 0;
495 drm->mode_config.min_height = 0;
496 drm->mode_config.max_width = ZYNQMP_DISP_MAX_WIDTH;
497 drm->mode_config.max_height = ZYNQMP_DISP_MAX_HEIGHT;
499 ret = drm_vblank_init(drm, 1);
503 drm_kms_helper_poll_init(drm);
510 drm_mode_config_reset(drm);
512 ret = drm_dev_register(drm, 0);
517 drm_fbdev_dma_setup(drm, 24);
522 drm_kms_helper_poll_fini(drm);
528 struct drm_device *drm = &dpsub->drm->dev;
530 drm_dev_unregister(drm);
531 drm_atomic_helper_shutdown(drm);
532 drm_kms_helper_poll_fini(drm);