media: coda: use macroblock tiling on CODA960 only
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 8 Jan 2019 17:20:16 +0000 (15:20 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 21 Jan 2019 17:46:50 +0000 (15:46 -0200)
Coda7541 and earlier do not support macroblock tiling. They do support
the NV12 format, though.  Enable macroblock tiling for NV12 only on
CODA960. This fixes crashes when trying to use NV12 support on CodaHx4.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/coda/coda-common.c

index 390d1ce..fa0b22f 100644 (file)
@@ -728,7 +728,7 @@ static int coda_s_fmt(struct coda_ctx *ctx, struct v4l2_format *f,
                ctx->tiled_map_type = GDI_TILED_FRAME_MB_RASTER_MAP;
                break;
        case V4L2_PIX_FMT_NV12:
-               if (!disable_tiling) {
+               if (!disable_tiling && ctx->dev->devtype->product == CODA_960) {
                        ctx->tiled_map_type = GDI_TILED_FRAME_MB_RASTER_MAP;
                        break;
                }