diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2016-12-13 20:19:44 +0100 |
---|---|---|
committer | Russell King <rmk@armlinux.org.uk> | 2017-02-04 12:26:04 +0000 |
commit | 6b1abe15db6b650cd5c940c77884966b7b27f1e5 (patch) | |
tree | 2b413e3c56f3b0df48ba037653438b35d5d71ddc | |
parent | 40723af04e726655c567c931cbfbe913c8304de4 (diff) |
etnaviv: fix XV resize for UYVY source format
Contrary to what is stated in the documentation, the stage1 buffer for the
filter blit needs to have the same component ordering as the source image,
otherwise it will only be zero filled when doing the stage1 blit.
This has been validated to be correct on:
- i.MX6DL (GC320 rev 5007)
- i.MX6Q (GC320 rev 5007)
- i.MX6QP (GC320 rev 5303)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Russell King <rmk@armlinux.org.uk>
-rw-r--r-- | etnaviv/etnaviv_xv.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/etnaviv/etnaviv_xv.c b/etnaviv/etnaviv_xv.c index 081c12a..85beeb2 100644 --- a/etnaviv/etnaviv_xv.c +++ b/etnaviv/etnaviv_xv.c @@ -426,7 +426,17 @@ static int etnaviv_configure_format(struct etnaviv_xv_priv *priv, priv->stage1_format.tile = 1; priv->stage1_pitch = etnaviv_tile_pitch(width, bpp); } else if (VIV_FEATURE(etnaviv->conn, chipMinorFeatures0, 2DPE20)) { - priv->stage1_format = fmt_yuy2; + /* + * Documentation (for example i.MX6 reference manual chapter + * 31.4.1.6 Filter BLT) states that the only valid stage1 format + * for the filter blit is YUY2. However in reality it seems that + * we must match the internal component ordering of the source + * image, otherwise the stage1 buffer will be zero filled. + */ + if (priv->source_format.format == DE_FORMAT_UYVY) + priv->stage1_format = fmt_uyvy; + else + priv->stage1_format = fmt_yuy2; priv->stage1_pitch = etnaviv_pitch(width, 16); } else { priv->stage1_format = vPix->format; |