Commit 2d3563e5 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-next-xilinx-20230802' of...

Merge tag 'drm-next-xilinx-20230802' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into drm-next

Miscellaneous fixes for the Xilinx zynqmp-dpsub driver
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801224454.GB335@pendragon.ideasonboard.com
parents 3d00c59d 9bde3bfe
...@@ -1094,8 +1094,8 @@ static int zynqmp_disp_layer_request_dma(struct zynqmp_disp *disp, ...@@ -1094,8 +1094,8 @@ static int zynqmp_disp_layer_request_dma(struct zynqmp_disp *disp,
"%s%u", dma_names[layer->id], i); "%s%u", dma_names[layer->id], i);
dma->chan = dma_request_chan(disp->dev, dma_channel_name); dma->chan = dma_request_chan(disp->dev, dma_channel_name);
if (IS_ERR(dma->chan)) { if (IS_ERR(dma->chan)) {
dev_err(disp->dev, "failed to request dma channel\n"); ret = dev_err_probe(disp->dev, PTR_ERR(dma->chan),
ret = PTR_ERR(dma->chan); "failed to request dma channel\n");
dma->chan = NULL; dma->chan = NULL;
return ret; return ret;
} }
...@@ -1228,7 +1228,6 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub) ...@@ -1228,7 +1228,6 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
{ {
struct platform_device *pdev = to_platform_device(dpsub->dev); struct platform_device *pdev = to_platform_device(dpsub->dev);
struct zynqmp_disp *disp; struct zynqmp_disp *disp;
struct resource *res;
int ret; int ret;
disp = kzalloc(sizeof(*disp), GFP_KERNEL); disp = kzalloc(sizeof(*disp), GFP_KERNEL);
...@@ -1238,22 +1237,19 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub) ...@@ -1238,22 +1237,19 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
disp->dev = &pdev->dev; disp->dev = &pdev->dev;
disp->dpsub = dpsub; disp->dpsub = dpsub;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "blend"); disp->blend.base = devm_platform_ioremap_resource_byname(pdev, "blend");
disp->blend.base = devm_ioremap_resource(disp->dev, res);
if (IS_ERR(disp->blend.base)) { if (IS_ERR(disp->blend.base)) {
ret = PTR_ERR(disp->blend.base); ret = PTR_ERR(disp->blend.base);
goto error; goto error;
} }
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "av_buf"); disp->avbuf.base = devm_platform_ioremap_resource_byname(pdev, "av_buf");
disp->avbuf.base = devm_ioremap_resource(disp->dev, res);
if (IS_ERR(disp->avbuf.base)) { if (IS_ERR(disp->avbuf.base)) {
ret = PTR_ERR(disp->avbuf.base); ret = PTR_ERR(disp->avbuf.base);
goto error; goto error;
} }
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aud"); disp->audio.base = devm_platform_ioremap_resource_byname(pdev, "aud");
disp->audio.base = devm_ioremap_resource(disp->dev, res);
if (IS_ERR(disp->audio.base)) { if (IS_ERR(disp->audio.base)) {
ret = PTR_ERR(disp->audio.base); ret = PTR_ERR(disp->audio.base);
goto error; goto error;
......
...@@ -784,7 +784,7 @@ static int zynqmp_dp_link_train_ce(struct zynqmp_dp *dp) ...@@ -784,7 +784,7 @@ static int zynqmp_dp_link_train_ce(struct zynqmp_dp *dp)
} }
/** /**
* zynqmp_dp_link_train - Train the link * zynqmp_dp_train - Train the link
* @dp: DisplayPort IP core structure * @dp: DisplayPort IP core structure
* *
* Return: 0 if all trains are done successfully, or corresponding error code. * Return: 0 if all trains are done successfully, or corresponding error code.
......
...@@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev) ...@@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
dpsub->dev = &pdev->dev; dpsub->dev = &pdev->dev;
platform_set_drvdata(pdev, dpsub); platform_set_drvdata(pdev, dpsub);
dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT)); ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
if (ret)
return ret;
/* Try the reserved memory. Proceed if there's none. */ /* Try the reserved memory. Proceed if there's none. */
of_reserved_mem_device_init(&pdev->dev); of_reserved_mem_device_init(&pdev->dev);
......
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