Lines Matching refs:dev

64 	struct malidp_hw_device *hwdev = malidp->dev;
91 struct malidp_hw_device *hwdev = malidp->dev;
123 struct malidp_hw_device *hwdev = malidp->dev;
172 struct malidp_hw_device *hwdev = malidp->dev;
191 struct drm_device *drm = state->dev;
232 struct drm_device *drm = state->dev;
238 pm_runtime_get_sync(drm->dev);
245 malidp->dev->hw->set_config_valid(malidp->dev, 0);
263 pm_runtime_put(drm->dev);
273 malidp_verify_afbc_framebuffer_caps(struct drm_device *dev,
276 if (malidp_format_mod_supported(dev, mode_cmd->pixel_format,
301 malidp_verify_afbc_framebuffer_size(struct drm_device *dev,
322 info = drm_get_format_info(dev, mode_cmd);
362 malidp_verify_afbc_framebuffer(struct drm_device *dev, struct drm_file *file,
365 if (malidp_verify_afbc_framebuffer_caps(dev, mode_cmd))
366 return malidp_verify_afbc_framebuffer_size(dev, file, mode_cmd);
372 malidp_fb_create(struct drm_device *dev, struct drm_file *file,
376 if (!malidp_verify_afbc_framebuffer(dev, file, mode_cmd))
380 return drm_gem_fb_create(dev, file, mode_cmd);
393 struct malidp_hw_device *hwdev = malidp->dev;
428 struct drm_device *drm = dev_get_drvdata(&pdev->dev);
430 struct malidp_hw_device *hwdev = malidp->dev;
465 u8 alignment = malidp_hw_get_pitch_align(malidp->dev, 1);
553 struct malidp_drm *malidp = minor->dev->dev_private;
559 minor->dev, &malidp_debugfs_fops);
649 static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
652 struct drm_device *drm = dev_get_drvdata(dev);
668 static int malidp_runtime_pm_suspend(struct device *dev)
670 struct drm_device *drm = dev_get_drvdata(dev);
672 struct malidp_hw_device *hwdev = malidp->dev;
687 static int malidp_runtime_pm_resume(struct device *dev)
689 struct drm_device *drm = dev_get_drvdata(dev);
691 struct malidp_hw_device *hwdev = malidp->dev;
703 static int malidp_bind(struct device *dev)
709 struct platform_device *pdev = to_platform_device(dev);
717 malidp = devm_kzalloc(dev, sizeof(*malidp), GFP_KERNEL);
721 hwdev = devm_kzalloc(dev, sizeof(*hwdev), GFP_KERNEL);
725 hwdev->hw = (struct malidp_hw *)of_device_get_match_data(dev);
726 malidp->dev = hwdev;
729 hwdev->regs = devm_ioremap_resource(dev, res);
733 hwdev->pclk = devm_clk_get(dev, "pclk");
737 hwdev->aclk = devm_clk_get(dev, "aclk");
741 hwdev->mclk = devm_clk_get(dev, "mclk");
745 hwdev->pxlclk = devm_clk_get(dev, "pxlclk");
750 ret = of_reserved_mem_device_init(dev);
754 drm = drm_dev_alloc(&malidp_driver, dev);
761 dev_set_drvdata(dev, drm);
764 pm_runtime_enable(dev);
767 if (pm_runtime_enabled(dev))
768 pm_runtime_get_sync(dev);
770 malidp_runtime_pm_resume(dev);
772 dev_id = of_match_device(malidp_drm_of_match, dev);
801 ret = of_property_read_u32(dev->of_node,
808 ret = of_property_read_u8_array(dev->of_node,
827 malidp->crtc.port = of_graph_get_port_by_id(dev->of_node, 0);
829 ret = component_bind_all(dev, drm);
855 pm_runtime_put(dev);
871 pm_runtime_get_sync(dev);
878 component_unbind_all(dev, drm);
884 pm_runtime_put(dev);
885 if (pm_runtime_enabled(dev))
886 pm_runtime_disable(dev);
888 malidp_runtime_pm_suspend(dev);
890 dev_set_drvdata(dev, NULL);
893 of_reserved_mem_device_release(dev);
898 static void malidp_unbind(struct device *dev)
900 struct drm_device *drm = dev_get_drvdata(dev);
902 struct malidp_hw_device *hwdev = malidp->dev;
906 pm_runtime_get_sync(dev);
911 component_unbind_all(dev, drm);
915 pm_runtime_put(dev);
916 if (pm_runtime_enabled(dev))
917 pm_runtime_disable(dev);
919 malidp_runtime_pm_suspend(dev);
921 dev_set_drvdata(dev, NULL);
923 of_reserved_mem_device_release(dev);
931 static int malidp_compare_dev(struct device *dev, void *data)
935 return dev->of_node == np;
943 if (!pdev->dev.of_node)
947 port = of_graph_get_remote_node(pdev->dev.of_node, 0, 0);
951 drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev,
954 return component_master_add_with_match(&pdev->dev, &malidp_master_ops,
960 component_master_del(&pdev->dev, &malidp_master_ops);
964 static int __maybe_unused malidp_pm_suspend(struct device *dev)
966 struct drm_device *drm = dev_get_drvdata(dev);
971 static int __maybe_unused malidp_pm_resume(struct device *dev)
973 struct drm_device *drm = dev_get_drvdata(dev);
980 static int __maybe_unused malidp_pm_suspend_late(struct device *dev)
982 if (!pm_runtime_status_suspended(dev)) {
983 malidp_runtime_pm_suspend(dev);
984 pm_runtime_set_suspended(dev);
989 static int __maybe_unused malidp_pm_resume_early(struct device *dev)
991 malidp_runtime_pm_resume(dev);
992 pm_runtime_set_active(dev);