Skip to content

Commit 44e1616

Browse files
committed
drm/meson: only use components with dw-hdmi
Only DW-HDMI currently needs components since it reuses the drm-meson driver context to access HHI registers (sic). Once this is solved, we can get rid on components. Until now, limit the components matching to the dw-hdmi compatibles we know to require this hack, for other bridges simply use probe defer instead and get over this components sitation. The back story is that we simply cannot attach DSI adapters bridges if we use components, only DSI panels, this is because we bind/unbind the DSI controller at each drm-meson driver master bind tentative. With this the I2C DSI bridge is unable to find the DSI controller host and everything fails to probe. This will simplify a lot adding new or older HDMI bridges. Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Nicolas Belin <nbelin@baylibre.com> Tested-by: Nicolas Belin <nbelin@baylibre.com> # on Khadas VIM3 + TS050 Panel Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230512-amlogic-v6-4-upstream-dsi-ccf-vim3-v5-9-56eb7a4d5b8e@linaro.org
1 parent 6a04464 commit 44e1616

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

drivers/gpu/drm/meson/meson_drv.c

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,17 @@ static void meson_drv_shutdown(struct platform_device *pdev)
451451
drm_atomic_helper_shutdown(priv->drm);
452452
}
453453

454-
/* Possible connectors nodes to ignore */
455-
static const struct of_device_id connectors_match[] = {
456-
{ .compatible = "composite-video-connector" },
457-
{ .compatible = "svideo-connector" },
454+
/*
455+
* Only devices to use as components
456+
* TOFIX: get rid of components when we can finally
457+
* get meson_dx_hdmi to stop using the meson_drm
458+
* private structure for HHI registers.
459+
*/
460+
static const struct of_device_id components_dev_match[] = {
461+
{ .compatible = "amlogic,meson-gxbb-dw-hdmi" },
462+
{ .compatible = "amlogic,meson-gxl-dw-hdmi" },
463+
{ .compatible = "amlogic,meson-gxm-dw-hdmi" },
464+
{ .compatible = "amlogic,meson-g12a-dw-hdmi" },
458465
{}
459466
};
460467

@@ -472,17 +479,12 @@ static int meson_drv_probe(struct platform_device *pdev)
472479
continue;
473480
}
474481

475-
/* If an analog connector is detected, count it as an output */
476-
if (of_match_node(connectors_match, remote)) {
477-
++count;
478-
of_node_put(remote);
479-
continue;
480-
}
481-
482-
dev_dbg(&pdev->dev, "parent %pOF remote match add %pOF parent %s\n",
483-
np, remote, dev_name(&pdev->dev));
482+
if (of_match_node(components_dev_match, remote)) {
483+
component_match_add(&pdev->dev, &match, component_compare_of, remote);
484484

485-
component_match_add(&pdev->dev, &match, component_compare_of, remote);
485+
dev_dbg(&pdev->dev, "parent %pOF remote match add %pOF parent %s\n",
486+
np, remote, dev_name(&pdev->dev));
487+
}
486488

487489
of_node_put(remote);
488490

0 commit comments

Comments
 (0)