Skip to content

Commit 2d3563e

Browse files
committed
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: Dave Airlie <[email protected]> From: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 3d00c59 + 9bde3bf commit 2d3563e

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

drivers/gpu/drm/xlnx/zynqmp_disp.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ static int zynqmp_disp_layer_request_dma(struct zynqmp_disp *disp,
10941094
"%s%u", dma_names[layer->id], i);
10951095
dma->chan = dma_request_chan(disp->dev, dma_channel_name);
10961096
if (IS_ERR(dma->chan)) {
1097-
dev_err(disp->dev, "failed to request dma channel\n");
1098-
ret = PTR_ERR(dma->chan);
1097+
ret = dev_err_probe(disp->dev, PTR_ERR(dma->chan),
1098+
"failed to request dma channel\n");
10991099
dma->chan = NULL;
11001100
return ret;
11011101
}
@@ -1228,7 +1228,6 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
12281228
{
12291229
struct platform_device *pdev = to_platform_device(dpsub->dev);
12301230
struct zynqmp_disp *disp;
1231-
struct resource *res;
12321231
int ret;
12331232

12341233
disp = kzalloc(sizeof(*disp), GFP_KERNEL);
@@ -1238,22 +1237,19 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
12381237
disp->dev = &pdev->dev;
12391238
disp->dpsub = dpsub;
12401239

1241-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "blend");
1242-
disp->blend.base = devm_ioremap_resource(disp->dev, res);
1240+
disp->blend.base = devm_platform_ioremap_resource_byname(pdev, "blend");
12431241
if (IS_ERR(disp->blend.base)) {
12441242
ret = PTR_ERR(disp->blend.base);
12451243
goto error;
12461244
}
12471245

1248-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "av_buf");
1249-
disp->avbuf.base = devm_ioremap_resource(disp->dev, res);
1246+
disp->avbuf.base = devm_platform_ioremap_resource_byname(pdev, "av_buf");
12501247
if (IS_ERR(disp->avbuf.base)) {
12511248
ret = PTR_ERR(disp->avbuf.base);
12521249
goto error;
12531250
}
12541251

1255-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aud");
1256-
disp->audio.base = devm_ioremap_resource(disp->dev, res);
1252+
disp->audio.base = devm_platform_ioremap_resource_byname(pdev, "aud");
12571253
if (IS_ERR(disp->audio.base)) {
12581254
ret = PTR_ERR(disp->audio.base);
12591255
goto error;

drivers/gpu/drm/xlnx/zynqmp_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ static int zynqmp_dp_link_train_ce(struct zynqmp_dp *dp)
784784
}
785785

786786
/**
787-
* zynqmp_dp_link_train - Train the link
787+
* zynqmp_dp_train - Train the link
788788
* @dp: DisplayPort IP core structure
789789
*
790790
* Return: 0 if all trains are done successfully, or corresponding error code.

drivers/gpu/drm/xlnx/zynqmp_dpsub.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
227227
dpsub->dev = &pdev->dev;
228228
platform_set_drvdata(pdev, dpsub);
229229

230-
dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
230+
ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
231+
if (ret)
232+
return ret;
231233

232234
/* Try the reserved memory. Proceed if there's none. */
233235
of_reserved_mem_device_init(&pdev->dev);

0 commit comments

Comments
 (0)