Commit 57148baa authored by Yongqiang Niu's avatar Yongqiang Niu Committed by CK Hu

drm/mediatek: distinguish ovl and ovl_2l by layer_nr

distinguish ovl and ovl_2l by layer_nr when get comp
id
Signed-off-by: default avatarYongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: default avatarCK Hu <ck.hu@mediatek.com>
parent 318462d1
...@@ -318,7 +318,12 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) ...@@ -318,7 +318,12 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev)
if (irq < 0) if (irq < 0)
return irq; return irq;
comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DISP_OVL); priv->data = of_device_get_match_data(dev);
comp_id = mtk_ddp_comp_get_id(dev->of_node,
priv->data->layer_nr == 4 ?
MTK_DISP_OVL :
MTK_DISP_OVL_2L);
if (comp_id < 0) { if (comp_id < 0) {
dev_err(dev, "Failed to identify by alias: %d\n", comp_id); dev_err(dev, "Failed to identify by alias: %d\n", comp_id);
return comp_id; return comp_id;
...@@ -331,8 +336,6 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) ...@@ -331,8 +336,6 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev)
return ret; return ret;
} }
priv->data = of_device_get_match_data(dev);
platform_set_drvdata(pdev, priv); platform_set_drvdata(pdev, priv);
ret = devm_request_irq(dev, irq, mtk_disp_ovl_irq_handler, ret = devm_request_irq(dev, irq, mtk_disp_ovl_irq_handler,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment