mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
drm/analogix: dp: remove some function which cause loader logo flash
Change-Id: I95c75702a15cd8fb5da0939c7e40a9e08ed362ff Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
@@ -1349,8 +1349,6 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
analogix_dp_init_dp(dp);
|
|
||||||
|
|
||||||
ret = devm_request_threaded_irq(&pdev->dev, dp->irq,
|
ret = devm_request_threaded_irq(&pdev->dev, dp->irq,
|
||||||
analogix_dp_hardirq,
|
analogix_dp_hardirq,
|
||||||
analogix_dp_irq_thread,
|
analogix_dp_irq_thread,
|
||||||
|
|||||||
@@ -230,12 +230,6 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rockchip_dp_pre_init(dp);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(dp->dev, "failed to pre init %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,9 +261,37 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
|
|||||||
{
|
{
|
||||||
struct rockchip_dp_device *dp = dev_get_drvdata(dev);
|
struct rockchip_dp_device *dp = dev_get_drvdata(dev);
|
||||||
const struct rockchip_dp_chip_data *dp_data;
|
const struct rockchip_dp_chip_data *dp_data;
|
||||||
|
struct device_node *panel_node, *port, *endpoint;
|
||||||
|
struct drm_panel *panel = NULL;
|
||||||
struct drm_device *drm_dev = data;
|
struct drm_device *drm_dev = data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
port = of_graph_get_port_by_id(dev->of_node, 1);
|
||||||
|
if (port) {
|
||||||
|
endpoint = of_get_child_by_name(port, "endpoint");
|
||||||
|
of_node_put(port);
|
||||||
|
if (!endpoint) {
|
||||||
|
dev_err(dev, "no output endpoint found\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
panel_node = of_graph_get_remote_port_parent(endpoint);
|
||||||
|
of_node_put(endpoint);
|
||||||
|
if (!panel_node) {
|
||||||
|
dev_err(dev, "no output node found\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
panel = of_drm_find_panel(panel_node);
|
||||||
|
if (!panel) {
|
||||||
|
DRM_ERROR("failed to find panel\n");
|
||||||
|
of_node_put(panel_node);
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
}
|
||||||
|
of_node_put(panel_node);
|
||||||
|
}
|
||||||
|
|
||||||
|
dp->plat_data.panel = panel;
|
||||||
/*
|
/*
|
||||||
* Just like the probe function said, we don't need the
|
* Just like the probe function said, we don't need the
|
||||||
* device drvrate anymore, we should leave the charge to
|
* device drvrate anymore, we should leave the charge to
|
||||||
@@ -319,43 +341,14 @@ static const struct component_ops rockchip_dp_component_ops = {
|
|||||||
static int rockchip_dp_probe(struct platform_device *pdev)
|
static int rockchip_dp_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct device_node *panel_node, *port, *endpoint;
|
|
||||||
struct drm_panel *panel = NULL;
|
|
||||||
struct rockchip_dp_device *dp;
|
struct rockchip_dp_device *dp;
|
||||||
|
|
||||||
port = of_graph_get_port_by_id(dev->of_node, 1);
|
|
||||||
if (port) {
|
|
||||||
endpoint = of_get_child_by_name(port, "endpoint");
|
|
||||||
of_node_put(port);
|
|
||||||
if (!endpoint) {
|
|
||||||
dev_err(dev, "no output endpoint found\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
panel_node = of_graph_get_remote_port_parent(endpoint);
|
|
||||||
of_node_put(endpoint);
|
|
||||||
if (!panel_node) {
|
|
||||||
dev_err(dev, "no output node found\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
panel = of_drm_find_panel(panel_node);
|
|
||||||
if (!panel) {
|
|
||||||
DRM_ERROR("failed to find panel\n");
|
|
||||||
of_node_put(panel_node);
|
|
||||||
return -EPROBE_DEFER;
|
|
||||||
}
|
|
||||||
of_node_put(panel_node);
|
|
||||||
}
|
|
||||||
|
|
||||||
dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
|
dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
|
||||||
if (!dp)
|
if (!dp)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
dp->dev = dev;
|
dp->dev = dev;
|
||||||
|
|
||||||
dp->plat_data.panel = panel;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We just use the drvdata until driver run into component
|
* We just use the drvdata until driver run into component
|
||||||
* add function, and then we would set drvdata to null, so
|
* add function, and then we would set drvdata to null, so
|
||||||
|
|||||||
Reference in New Issue
Block a user