Lines Matching defs:dev
175 struct drm_device *drm = vc4_hdmi->connector.dev;
198 struct drm_device *drm = vc4_hdmi->connector.dev;
204 * connector->dev pointer might not be initialised yet.
231 struct drm_device *drm = vc4_hdmi->connector.dev;
237 * connector->dev pointer might not be initialised yet.
260 struct drm_device *drm = vc4_hdmi->connector.dev;
307 state = drm_atomic_state_alloc(crtc->dev);
343 drm = connector->dev;
473 WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev));
485 pm_runtime_put(&vc4_hdmi->pdev->dev);
493 struct vc4_dev *vc4 = to_vc4_dev(connector->dev);
518 struct drm_device *drm = connector->dev;
594 struct drm_device *drm = connector->dev;
616 struct drm_device *drm = connector->dev;
697 vc4_hdmi_attach_broadcast_rgb_property(struct drm_device *dev,
703 prop = drm_property_create_enum(dev, DRM_MODE_PROP_ENUM,
717 static int vc4_hdmi_connector_init(struct drm_device *dev,
724 ret = drmm_connector_init(dev, connector,
741 ret = drm_mode_create_tv_margin_properties(dev);
763 vc4_hdmi_attach_broadcast_rgb_property(dev, vc4_hdmi);
775 struct drm_device *drm = vc4_hdmi->connector.dev;
802 struct drm_device *drm = vc4_hdmi->connector.dev;
1002 struct drm_device *drm = connector->dev;
1040 struct drm_device *drm = connector->dev;
1089 struct drm_device *drm = vc4_hdmi->connector.dev;
1127 struct drm_device *drm = vc4_hdmi->connector.dev;
1148 ret = pm_runtime_put(&vc4_hdmi->pdev->dev);
1164 struct drm_device *drm = vc4_hdmi->connector.dev;
1399 struct drm_device *drm = vc4_hdmi->connector.dev;
1465 struct drm_device *drm = vc4_hdmi->connector.dev;
1529 struct drm_device *drm = vc4_hdmi->connector.dev;
1636 struct drm_device *drm = vc4_hdmi->connector.dev;
1680 struct drm_device *drm = vc4_hdmi->connector.dev;
1698 ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
1787 pm_runtime_put(&vc4_hdmi->pdev->dev);
1799 struct drm_device *drm = vc4_hdmi->connector.dev;
1829 struct drm_device *drm = vc4_hdmi->connector.dev;
1929 struct drm_device *dev = vc4_hdmi->connector.dev;
1933 drm_dbg(dev, "VIC1 requires a bpc of 8, got %u\n", bpc);
1939 drm_dbg(dev, "DVI Monitors require an RGB output at 8 bpc\n");
1945 drm_dbg(dev, "RGB Format, checking the constraints.\n");
1951 drm_dbg(dev, "10 BPC but sink doesn't support Deep Color 30.\n");
1956 drm_dbg(dev, "12 BPC but sink doesn't support Deep Color 36.\n");
1960 drm_dbg(dev, "RGB format supported in that configuration.\n");
1965 drm_dbg(dev, "YUV422 format, checking the constraints.\n");
1968 drm_dbg(dev, "Sink doesn't support YUV422.\n");
1973 drm_dbg(dev, "YUV422 only supports 12 bpc.\n");
1977 drm_dbg(dev, "YUV422 format supported in that configuration.\n");
1982 drm_dbg(dev, "YUV444 format, checking the constraints.\n");
1985 drm_dbg(dev, "Sink doesn't support YUV444.\n");
1990 drm_dbg(dev, "10 BPC but sink doesn't support Deep Color 30.\n");
1995 drm_dbg(dev, "12 BPC but sink doesn't support Deep Color 36.\n");
1999 drm_dbg(dev, "YUV444 format supported in that configuration.\n");
2014 struct vc4_dev *vc4 = to_vc4_dev(connector->dev);
2076 struct drm_device *dev = vc4_hdmi->connector.dev;
2081 drm_dbg(dev, "Trying with an RGB output\n");
2095 drm_dbg(dev, "Failed, Trying with an YUV422 output\n");
2109 drm_dbg(dev, "Failed. No Format Supported for that bpc count.\n");
2119 struct drm_device *dev = vc4_hdmi->connector.dev;
2126 drm_dbg(dev, "Trying with a %d bpc output\n", bpc);
2135 drm_dbg(dev,
2236 struct drm_device *drm = encoder->dev;
2276 struct drm_device *drm = vc4_hdmi->connector.dev;
2297 struct drm_device *drm = vc4_hdmi->connector.dev;
2373 static int vc4_hdmi_audio_startup(struct device *dev, void *data)
2375 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
2376 struct drm_device *drm = vc4_hdmi->connector.dev;
2418 struct device *dev = &vc4_hdmi->pdev->dev;
2427 dev_err(dev, "Failed to stop audio infoframe: %d\n", ret);
2438 static void vc4_hdmi_audio_shutdown(struct device *dev, void *data)
2440 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
2441 struct drm_device *drm = vc4_hdmi->connector.dev;
2510 static int vc4_hdmi_audio_prepare(struct device *dev, void *data,
2514 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
2515 struct drm_device *drm = vc4_hdmi->connector.dev;
2527 dev_dbg(dev, "%s: %u Hz, %d bit, %d channels\n", __func__,
2642 static int vc4_hdmi_audio_get_eld(struct device *dev, void *data,
2645 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
2682 struct device *dev = &vc4_hdmi->pdev->dev;
2708 if (!of_find_property(dev->of_node, "dmas", &len) || !len) {
2709 dev_warn(dev,
2726 index = of_property_match_string(dev->of_node, "reg-names", "hd");
2731 addr = of_get_address(dev->of_node, index, NULL, NULL);
2761 ret = devm_snd_dmaengine_pcm_register(dev, &pcm_conf, 0);
2763 dev_err(dev, "Could not register PCM component: %d\n", ret);
2767 ret = devm_snd_soc_register_component(dev, &vc4_hdmi_audio_cpu_dai_comp,
2770 dev_err(dev, "Could not register CPU DAI: %d\n", ret);
2774 codec_pdev = platform_device_register_data(dev, HDMI_CODEC_DRV_NAME,
2779 dev_err(dev, "Couldn't register the HDMI codec: %ld\n", PTR_ERR(codec_pdev));
2784 ret = devm_add_action_or_reset(dev, vc4_hdmi_audio_codec_release, vc4_hdmi);
2799 dai_link->cpus->dai_name = dev_name(dev);
2800 dai_link->codecs->name = dev_name(&codec_pdev->dev);
2801 dai_link->platforms->name = dev_name(dev);
2807 card->dev = dev;
2812 * stores a pointer to the snd card object in dev->driver_data. This
2818 ret = devm_snd_soc_register_card(dev, card);
2820 dev_err_probe(dev, ret, "Could not register sound card\n");
2830 struct drm_device *dev = connector->dev;
2832 if (dev && dev->registered)
2848 ret = devm_request_threaded_irq(&pdev->dev, hpd_con,
2855 ret = devm_request_threaded_irq(&pdev->dev, hpd_rm,
2913 struct drm_device *dev = vc4_hdmi->connector.dev;
2923 drm_err(dev, "Attempting to read too much data (%d)\n", msg->len);
3053 struct drm_device *drm = vc4_hdmi->connector.dev;
3069 ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
3120 struct drm_device *drm = vc4_hdmi->connector.dev;
3146 pm_runtime_put(&vc4_hdmi->pdev->dev);
3164 struct drm_device *drm = vc4_hdmi->connector.dev;
3193 struct drm_device *dev = vc4_hdmi->connector.dev;
3199 if (!drm_dev_enter(dev, &idx))
3203 drm_err(dev, "Attempting to transmit too much data (%d)\n", msg->len);
3253 struct device *dev = &pdev->dev;
3256 if (!of_property_present(dev->of_node, "interrupts")) {
3257 dev_warn(dev, "'interrupts' DT property is missing, no CEC\n");
3274 ret = devm_request_threaded_irq(dev, platform_get_irq_byname(pdev, "cec-rx"),
3281 ret = devm_request_threaded_irq(dev, platform_get_irq_byname(pdev, "cec-tx"),
3288 ret = devm_request_threaded_irq(dev, platform_get_irq(pdev, 0),
3296 ret = cec_register_adapter(vc4_hdmi->cec_adap, &pdev->dev);
3323 ret = devm_add_action_or_reset(dev, vc4_hdmi_cec_release, vc4_hdmi);
3394 struct device *dev = &pdev->dev;
3413 vc4_hdmi->pixel_clock = devm_clk_get(dev, "pixel");
3421 vc4_hdmi->hsm_clock = devm_clk_get(dev, "hdmi");
3436 struct device *dev = &pdev->dev;
3444 vc4_hdmi->hdmicore_regs = devm_ioremap(dev, res->start,
3453 vc4_hdmi->hd_regs = devm_ioremap(dev, res->start, resource_size(res));
3461 vc4_hdmi->cec_regs = devm_ioremap(dev, res->start, resource_size(res));
3469 vc4_hdmi->csc_regs = devm_ioremap(dev, res->start, resource_size(res));
3477 vc4_hdmi->dvp_regs = devm_ioremap(dev, res->start, resource_size(res));
3485 vc4_hdmi->phy_regs = devm_ioremap(dev, res->start, resource_size(res));
3493 vc4_hdmi->ram_regs = devm_ioremap(dev, res->start, resource_size(res));
3501 vc4_hdmi->rm_regs = devm_ioremap(dev, res->start, resource_size(res));
3505 vc4_hdmi->hsm_clock = devm_clk_get(dev, "hdmi");
3511 vc4_hdmi->pixel_bvb_clock = devm_clk_get(dev, "bvb");
3517 vc4_hdmi->audio_clock = devm_clk_get(dev, "audio");
3523 vc4_hdmi->cec_clock = devm_clk_get(dev, "cec");
3529 vc4_hdmi->reset = devm_reset_control_get(dev, NULL);
3570 static int vc4_hdmi_runtime_suspend(struct device *dev)
3572 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
3579 static int vc4_hdmi_runtime_resume(struct device *dev)
3581 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
3637 put_device(&vc4_hdmi->ddc->dev);
3640 static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
3642 const struct vc4_hdmi_variant *variant = of_device_get_match_data(dev);
3643 struct platform_device *pdev = to_platform_device(dev);
3661 dev_set_drvdata(dev, vc4_hdmi);
3685 ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
3698 ret = devm_add_action_or_reset(dev, vc4_hdmi_put_ddc_device, vc4_hdmi);
3705 vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
3711 of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence");
3713 ret = devm_pm_runtime_enable(dev);
3721 ret = pm_runtime_resume_and_get(dev);
3725 if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
3726 of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
3758 pm_runtime_put_sync(dev);
3763 pm_runtime_put_sync(dev);
3774 return component_add(&pdev->dev, &vc4_hdmi_ops);
3779 component_del(&pdev->dev, &vc4_hdmi_ops);