]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drm: xlnx: zynqmp: Use xlnx pipeline calls
authorHyun Kwon <hyun.kwon@xilinx.com>
Tue, 13 Feb 2018 17:33:39 +0000 (09:33 -0800)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 1 Mar 2018 08:20:17 +0000 (09:20 +0100)
Since xlnx_drm is transformed into sort of library, new xlnx pipeline
functions should be called explicitly. Accommodate that change.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpu/drm/xlnx/zynqmp_dpsub.c
drivers/gpu/drm/xlnx/zynqmp_dpsub.h

index 6be1556c86039809cabc7add978f611fa685d2c1..c1a84827a7812326b17617bec28b65b4b3e0bdaa 100644 (file)
@@ -22,6 +22,8 @@
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
+#include "xlnx_drv.h"
+
 #include "zynqmp_disp.h"
 #include "zynqmp_dp.h"
 #include "zynqmp_dpsub.h"
@@ -91,10 +93,18 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
                goto err_component;
        }
 
+       dpsub->master = xlnx_drm_pipeline_init(pdev);
+       if (IS_ERR(dpsub->master)) {
+               dev_err(&pdev->dev, "failed to initialize the drm pipeline\n");
+               goto err_populate;
+       }
+
        dev_info(&pdev->dev, "ZynqMP DisplayPort Subsystem driver probed");
 
        return 0;
 
+err_populate:
+       of_platform_depopulate(&pdev->dev);
 err_component:
        component_del(&pdev->dev, &zynqmp_dpsub_component_ops);
 err_disp:
@@ -108,8 +118,10 @@ err_pm:
 
 static int zynqmp_dpsub_remove(struct platform_device *pdev)
 {
+       struct zynqmp_dpsub *dpsub = platform_get_drvdata(pdev);
        int err, ret = 0;
 
+       xlnx_drm_pipeline_exit(dpsub->master);
        of_platform_depopulate(&pdev->dev);
        component_del(&pdev->dev, &zynqmp_dpsub_component_ops);
 
index 2c1455f288dcbfc48a23f7a57fe6b096d55d1564..6606beffee15075fe416950beb8b7d7099f4516d 100644 (file)
@@ -22,6 +22,7 @@
 struct zynqmp_dpsub {
        struct zynqmp_dp *dp;
        struct zynqmp_disp *disp;
+       struct platform_device *master;
 };
 
 #endif /* _ZYNQMP_DPSUB_H_ */