aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2021-09-30 12:04:29 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2021-09-30 12:04:29 +1000
commitba3e814a526f9a4a988d9f31623c3fc16678687c (patch)
treea3a13074a2107e3f3a0f0f861cd630bc68c416d3
parent299df0fa33ab99554c8219cddbc3516e33813e42 (diff)
parent20fbfc81e390180db738c414c1b7ac85d31e24b3 (diff)
downloaddevel-ba3e814a526f9a4a988d9f31623c3fc16678687c.tar.gz
Merge branch 'imx-drm/next' of https://git.pengutronix.de/git/pza/linux
-rw-r--r--drivers/gpu/drm/imx/imx-tve.c4
-rw-r--r--drivers/gpu/ipu-v3/ipu-image-convert.c9
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c
index bc8c3f802a1529..2b1fdf2cbbce1d 100644
--- a/drivers/gpu/drm/imx/imx-tve.c
+++ b/drivers/gpu/drm/imx/imx-tve.c
@@ -526,7 +526,6 @@ static int imx_tve_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
struct device_node *ddc_node;
struct imx_tve *tve;
- struct resource *res;
void __iomem *base;
unsigned int val;
int irq;
@@ -568,8 +567,7 @@ static int imx_tve_probe(struct platform_device *pdev)
}
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c
index aa1d4b6d278f73..af1612044eefdd 100644
--- a/drivers/gpu/ipu-v3/ipu-image-convert.c
+++ b/drivers/gpu/ipu-v3/ipu-image-convert.c
@@ -990,7 +990,7 @@ static int calc_tile_offsets_planar(struct ipu_image_convert_ctx *ctx,
const struct ipu_image_pixfmt *fmt = image->fmt;
unsigned int row, col, tile = 0;
u32 H, top, y_stride, uv_stride;
- u32 uv_row_off, uv_col_off, uv_off, u_off, v_off, tmp;
+ u32 uv_row_off, uv_col_off, uv_off, u_off, v_off;
u32 y_row_off, y_col_off, y_off;
u32 y_size, uv_size;
@@ -1021,11 +1021,8 @@ static int calc_tile_offsets_planar(struct ipu_image_convert_ctx *ctx,
u_off = y_size - y_off + uv_off;
v_off = (fmt->uv_packed) ? 0 : u_off + uv_size;
- if (fmt->uv_swapped) {
- tmp = u_off;
- u_off = v_off;
- v_off = tmp;
- }
+ if (fmt->uv_swapped)
+ swap(u_off, v_off);
image->tile[tile].offset = y_off;
image->tile[tile].u_off = u_off;