mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/rockchip: analogix_dp: Apply analogix_dp_finish_probe()
Apply analogix_dp_finish_probe() in order to move the panel/bridge parsing from Rockchip side to the Analogix side. Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Tested-by: Heiko Stuebner <heiko@sntech.de> # rk3588 Link: https://patch.msgid.link/20260413132551.1049307-5-damon.ding@rock-chips.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
parent
e9c897c898
commit
d35ac09734
|
|
@ -21,14 +21,12 @@
|
|||
#include <video/of_videomode.h>
|
||||
#include <video/videomode.h>
|
||||
|
||||
#include <drm/display/drm_dp_aux_bus.h>
|
||||
#include <drm/display/drm_dp_helper.h>
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_bridge_connector.h>
|
||||
#include <drm/bridge/analogix_dp.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_panel.h>
|
||||
#include <drm/drm_print.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_simple_kms_helper.h>
|
||||
|
|
@ -417,24 +415,6 @@ static const struct component_ops rockchip_dp_component_ops = {
|
|||
.unbind = rockchip_dp_unbind,
|
||||
};
|
||||
|
||||
static int rockchip_dp_link_panel(struct drm_dp_aux *aux)
|
||||
{
|
||||
struct analogix_dp_plat_data *plat_data = analogix_dp_aux_to_plat_data(aux);
|
||||
struct rockchip_dp_device *dp = pdata_encoder_to_dp(plat_data);
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* If drm_of_find_panel_or_bridge() returns -ENODEV, there may be no valid panel
|
||||
* or bridge nodes. The driver should go on for the driver-free bridge or the DP
|
||||
* mode applications.
|
||||
*/
|
||||
ret = drm_of_find_panel_or_bridge(dp->dev->of_node, 1, 0, &plat_data->panel, NULL);
|
||||
if (ret && ret != -ENODEV)
|
||||
return ret;
|
||||
|
||||
return component_add(dp->dev, &rockchip_dp_component_ops);
|
||||
}
|
||||
|
||||
static int rockchip_dp_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
|
|
@ -475,6 +455,7 @@ static int rockchip_dp_probe(struct platform_device *pdev)
|
|||
dp->plat_data.dev_type = dp->data->chip_type;
|
||||
dp->plat_data.power_on = rockchip_dp_poweron;
|
||||
dp->plat_data.power_off = rockchip_dp_powerdown;
|
||||
dp->plat_data.ops = &rockchip_dp_component_ops;
|
||||
|
||||
ret = rockchip_dp_of_probe(dp);
|
||||
if (ret < 0)
|
||||
|
|
@ -486,22 +467,7 @@ static int rockchip_dp_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(dp->adp))
|
||||
return PTR_ERR(dp->adp);
|
||||
|
||||
ret = devm_of_dp_aux_populate_bus(analogix_dp_get_aux(dp->adp), rockchip_dp_link_panel);
|
||||
if (ret) {
|
||||
/*
|
||||
* If devm_of_dp_aux_populate_bus() returns -ENODEV, the done_probing() will not
|
||||
* be called because there are no EP devices. Then the rockchip_dp_link_panel()
|
||||
* will be called directly in order to support the other valid DT configurations.
|
||||
*
|
||||
* NOTE: The devm_of_dp_aux_populate_bus() is allowed to return -EPROBE_DEFER.
|
||||
*/
|
||||
if (ret != -ENODEV)
|
||||
return dev_err_probe(dp->dev, ret, "failed to populate aux bus\n");
|
||||
|
||||
return rockchip_dp_link_panel(analogix_dp_get_aux(dp->adp));
|
||||
}
|
||||
|
||||
return 0;
|
||||
return analogix_dp_finish_probe(dp->adp);
|
||||
}
|
||||
|
||||
static void rockchip_dp_remove(struct platform_device *pdev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user