Lines Matching refs:dev
66 struct malidp_hw_device *hwdev = malidp->dev;
93 struct malidp_hw_device *hwdev = malidp->dev;
125 struct malidp_hw_device *hwdev = malidp->dev;
174 struct malidp_hw_device *hwdev = malidp->dev;
193 struct drm_device *drm = state->dev;
234 struct drm_device *drm = state->dev;
241 pm_runtime_get_sync(drm->dev);
248 malidp->dev->hw->set_config_valid(malidp->dev, 0);
268 pm_runtime_put(drm->dev);
278 malidp_verify_afbc_framebuffer_caps(struct drm_device *dev,
281 if (malidp_format_mod_supported(dev, mode_cmd->pixel_format,
306 malidp_verify_afbc_framebuffer_size(struct drm_device *dev,
327 info = drm_get_format_info(dev, mode_cmd);
367 malidp_verify_afbc_framebuffer(struct drm_device *dev, struct drm_file *file,
370 if (malidp_verify_afbc_framebuffer_caps(dev, mode_cmd))
371 return malidp_verify_afbc_framebuffer_size(dev, file, mode_cmd);
377 malidp_fb_create(struct drm_device *dev, struct drm_file *file,
381 if (!malidp_verify_afbc_framebuffer(dev, file, mode_cmd))
385 return drm_gem_fb_create(dev, file, mode_cmd);
398 struct malidp_hw_device *hwdev = malidp->dev;
426 struct drm_device *drm = dev_get_drvdata(&pdev->dev);
428 struct malidp_hw_device *hwdev = malidp->dev;
463 u8 alignment = malidp_hw_get_pitch_align(malidp->dev, 1);
551 struct malidp_drm *malidp = drm_to_malidp(minor->dev);
557 minor->dev, &malidp_debugfs_fops);
647 static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
650 struct drm_device *drm = dev_get_drvdata(dev);
666 static int malidp_runtime_pm_suspend(struct device *dev)
668 struct drm_device *drm = dev_get_drvdata(dev);
670 struct malidp_hw_device *hwdev = malidp->dev;
685 static int malidp_runtime_pm_resume(struct device *dev)
687 struct drm_device *drm = dev_get_drvdata(dev);
689 struct malidp_hw_device *hwdev = malidp->dev;
701 static int malidp_bind(struct device *dev)
707 struct platform_device *pdev = to_platform_device(dev);
715 malidp = devm_drm_dev_alloc(dev, &malidp_driver, typeof(*malidp), base);
725 hwdev->hw = (struct malidp_hw *)of_device_get_match_data(dev);
726 malidp->dev = hwdev;
732 hwdev->pclk = devm_clk_get(dev, "pclk");
736 hwdev->aclk = devm_clk_get(dev, "aclk");
740 hwdev->mclk = devm_clk_get(dev, "mclk");
744 hwdev->pxlclk = devm_clk_get(dev, "pxlclk");
749 ret = of_reserved_mem_device_init(dev);
753 dev_set_drvdata(dev, drm);
756 pm_runtime_enable(dev);
759 if (pm_runtime_enabled(dev))
760 pm_runtime_get_sync(dev);
762 malidp_runtime_pm_resume(dev);
764 dev_id = of_match_device(malidp_drm_of_match, dev);
793 ret = of_property_read_u32(dev->of_node,
800 ret = of_property_read_u8_array(dev->of_node,
819 malidp->crtc.port = of_graph_get_port_by_id(dev->of_node, 0);
821 ret = component_bind_all(dev, drm);
845 pm_runtime_put(dev);
861 pm_runtime_get_sync(dev);
867 component_unbind_all(dev, drm);
872 pm_runtime_put(dev);
873 if (pm_runtime_enabled(dev))
874 pm_runtime_disable(dev);
876 malidp_runtime_pm_suspend(dev);
877 dev_set_drvdata(dev, NULL);
878 of_reserved_mem_device_release(dev);
883 static void malidp_unbind(struct device *dev)
885 struct drm_device *drm = dev_get_drvdata(dev);
887 struct malidp_hw_device *hwdev = malidp->dev;
891 pm_runtime_get_sync(dev);
895 component_unbind_all(dev, drm);
898 pm_runtime_put(dev);
899 if (pm_runtime_enabled(dev))
900 pm_runtime_disable(dev);
902 malidp_runtime_pm_suspend(dev);
903 dev_set_drvdata(dev, NULL);
904 of_reserved_mem_device_release(dev);
912 static int malidp_compare_dev(struct device *dev, void *data)
916 return dev->of_node == np;
924 if (!pdev->dev.of_node)
928 port = of_graph_get_remote_node(pdev->dev.of_node, 0, 0);
932 drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev,
935 return component_master_add_with_match(&pdev->dev, &malidp_master_ops,
941 component_master_del(&pdev->dev, &malidp_master_ops);
944 static int __maybe_unused malidp_pm_suspend(struct device *dev)
946 struct drm_device *drm = dev_get_drvdata(dev);
951 static int __maybe_unused malidp_pm_resume(struct device *dev)
953 struct drm_device *drm = dev_get_drvdata(dev);
960 static int __maybe_unused malidp_pm_suspend_late(struct device *dev)
962 if (!pm_runtime_status_suspended(dev)) {
963 malidp_runtime_pm_suspend(dev);
964 pm_runtime_set_suspended(dev);
969 static int __maybe_unused malidp_pm_resume_early(struct device *dev)
971 malidp_runtime_pm_resume(dev);
972 pm_runtime_set_active(dev);