Skip to content

Commit

Permalink
drm: xlnx: mixer: Use xlnx pipeline call
Browse files Browse the repository at this point in the history
Use xlnx_drm_pipeline_init() call as the dt binding is removed
for xlnx drm. The xlnx drm is more or less a library, and
should be explicitly initialized / released.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Tested-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
  • Loading branch information
xlnx-hyunkwon authored and Michal Simek committed Mar 1, 2018
1 parent 3f09279 commit 4f150dc
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion drivers/gpu/drm/xlnx/xlnx_mixer.c
Expand Up @@ -266,6 +266,7 @@ struct xlnx_mix_hw {
/**
* struct xlnx_mix - Container for interfacing DRM driver to mixer
* @mixer_hw: Object representing actual hardware state of mixer
* @master: Logical master device from xlnx drm
* @crtc: Xilinx DRM driver crtc object
* @drm_primary_layer: Hardware layer serving as logical DRM primary layer
* @hw_master_layer: Base video streaming layer
Expand Down Expand Up @@ -293,6 +294,7 @@ struct xlnx_mix_hw {
*/
struct xlnx_mix {
struct xlnx_mix_hw mixer_hw;
struct platform_device *master;
struct xlnx_crtc crtc;
struct xlnx_mix_plane *drm_primary_layer;
struct xlnx_mix_plane *hw_master_layer;
Expand Down Expand Up @@ -2559,13 +2561,28 @@ static int xlnx_mix_probe(struct platform_device *pdev)

ret = component_add(&pdev->dev, &xlnx_mix_component_ops);
if (ret)
return ret;
goto err;

mixer->master = xlnx_drm_pipeline_init(pdev);
if (IS_ERR(mixer->master)) {
dev_err(&pdev->dev, "Failed to initialize the drm pipeline\n");
goto err_component;
}

dev_info(&pdev->dev, "Xilinx Mixer driver probed success\n");
return ret;

err_component:
component_del(&pdev->dev, &xlnx_mix_component_ops);
err:
return ret;
}

static int xlnx_mix_remove(struct platform_device *pdev)
{
struct xlnx_mix *mixer = platform_get_drvdata(pdev);

xlnx_drm_pipeline_exit(mixer->master);
component_del(&pdev->dev, &xlnx_mix_component_ops);
return 0;
}
Expand Down

0 comments on commit 4f150dc

Please sign in to comment.