Lines Matching refs:dev
19 struct drm_device *dev = mdp4_kms->dev; in mdp4_hw_init() local
23 pm_runtime_get_sync(dev->dev); in mdp4_hw_init()
70 pm_runtime_put_sync(dev->dev); in mdp4_hw_init()
97 for_each_crtc_mask(mdp4_kms->dev, crtc, crtc_mask) in mdp4_wait_flush()
122 struct device *dev = mdp4_kms->dev->dev; in mdp4_destroy() local
135 pm_runtime_disable(dev); in mdp4_destroy()
191 struct drm_device *dev = mdp4_kms->dev; in mdp4_modeset_init_intf() local
192 struct msm_drm_private *priv = dev->dev_private; in mdp4_modeset_init_intf()
205 panel_node = of_graph_get_remote_node(dev->dev->of_node, 0, 0); in mdp4_modeset_init_intf()
209 encoder = mdp4_lcdc_encoder_init(dev, panel_node); in mdp4_modeset_init_intf()
211 DRM_DEV_ERROR(dev->dev, "failed to construct LCDC encoder\n"); in mdp4_modeset_init_intf()
219 connector = mdp4_lvds_connector_init(dev, panel_node, encoder); in mdp4_modeset_init_intf()
221 DRM_DEV_ERROR(dev->dev, "failed to initialize LVDS connector\n"); in mdp4_modeset_init_intf()
228 encoder = mdp4_dtv_encoder_init(dev); in mdp4_modeset_init_intf()
230 DRM_DEV_ERROR(dev->dev, "failed to construct DTV encoder\n"); in mdp4_modeset_init_intf()
239 ret = msm_hdmi_modeset_init(priv->hdmi, dev, encoder); in mdp4_modeset_init_intf()
241 DRM_DEV_ERROR(dev->dev, "failed to initialize HDMI: %d\n", ret); in mdp4_modeset_init_intf()
254 encoder = mdp4_dsi_encoder_init(dev); in mdp4_modeset_init_intf()
257 DRM_DEV_ERROR(dev->dev, in mdp4_modeset_init_intf()
265 ret = msm_dsi_modeset_init(priv->dsi[dsi_id], dev, encoder); in mdp4_modeset_init_intf()
267 DRM_DEV_ERROR(dev->dev, "failed to initialize DSI: %d\n", in mdp4_modeset_init_intf()
274 DRM_DEV_ERROR(dev->dev, "Invalid or unsupported interface\n"); in mdp4_modeset_init_intf()
283 struct drm_device *dev = mdp4_kms->dev; in modeset_init() local
284 struct msm_drm_private *priv = dev->dev_private; in modeset_init()
308 plane = mdp4_plane_init(dev, vg_planes[i], false); in modeset_init()
310 DRM_DEV_ERROR(dev->dev, in modeset_init()
318 plane = mdp4_plane_init(dev, rgb_planes[i], true); in modeset_init()
320 DRM_DEV_ERROR(dev->dev, in modeset_init()
326 crtc = mdp4_crtc_init(dev, plane, priv->num_crtcs, i, in modeset_init()
329 DRM_DEV_ERROR(dev->dev, "failed to construct crtc for %s\n", in modeset_init()
351 DRM_DEV_ERROR(dev->dev, "failed to initialize intf: %d, %d\n", in modeset_init()
366 struct drm_device *dev = mdp4_kms->dev; in read_mdp_hw_revision() local
376 DRM_DEV_INFO(dev->dev, "MDP4 version v%d.%d", *major, *minor); in read_mdp_hw_revision()
379 static int mdp4_kms_init(struct drm_device *dev) in mdp4_kms_init() argument
381 struct platform_device *pdev = to_platform_device(dev->dev); in mdp4_kms_init()
382 struct msm_drm_private *priv = dev->dev_private; in mdp4_kms_init()
396 DRM_DEV_ERROR(dev->dev, "failed to allocate kms\n"); in mdp4_kms_init()
402 DRM_DEV_ERROR(dev->dev, "failed to init kms\n"); in mdp4_kms_init()
409 mdp4_kms->dev = dev; in mdp4_kms_init()
429 mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); in mdp4_kms_init()
436 DRM_DEV_ERROR(dev->dev, "failed to enable regulator vdd: %d\n", ret); in mdp4_kms_init()
441 mdp4_kms->clk = devm_clk_get(&pdev->dev, "core_clk"); in mdp4_kms_init()
443 DRM_DEV_ERROR(dev->dev, "failed to get core_clk\n"); in mdp4_kms_init()
448 mdp4_kms->pclk = devm_clk_get(&pdev->dev, "iface_clk"); in mdp4_kms_init()
452 mdp4_kms->axi_clk = devm_clk_get(&pdev->dev, "bus_clk"); in mdp4_kms_init()
454 DRM_DEV_ERROR(dev->dev, "failed to get axi_clk\n"); in mdp4_kms_init()
464 DRM_DEV_ERROR(dev->dev, "unexpected MDP version: v%d.%d\n", in mdp4_kms_init()
473 mdp4_kms->lut_clk = devm_clk_get(&pdev->dev, "lut_clk"); in mdp4_kms_init()
475 DRM_DEV_ERROR(dev->dev, "failed to get lut_clk\n"); in mdp4_kms_init()
482 pm_runtime_enable(dev->dev); in mdp4_kms_init()
496 mmu = msm_iommu_new(&pdev->dev, 0); in mdp4_kms_init()
501 DRM_DEV_INFO(dev->dev, "no iommu, fallback to phys " in mdp4_kms_init()
520 DRM_DEV_ERROR(dev->dev, "modeset_init failed: %d\n", ret); in mdp4_kms_init()
524 mdp4_kms->blank_cursor_bo = msm_gem_new(dev, SZ_16K, MSM_BO_WC | MSM_BO_SCANOUT); in mdp4_kms_init()
527 DRM_DEV_ERROR(dev->dev, "could not allocate blank-cursor bo: %d\n", ret); in mdp4_kms_init()
535 DRM_DEV_ERROR(dev->dev, "could not pin blank-cursor bo: %d\n", ret); in mdp4_kms_init()
539 dev->mode_config.min_width = 0; in mdp4_kms_init()
540 dev->mode_config.min_height = 0; in mdp4_kms_init()
541 dev->mode_config.max_width = 2048; in mdp4_kms_init()
542 dev->mode_config.max_height = 2048; in mdp4_kms_init()
560 return msm_drv_probe(&pdev->dev, mdp4_kms_init); in mdp4_probe()
565 component_master_del(&pdev->dev, &msm_drm_ops); in mdp4_remove()