diff --git a/projects/Allwinner/patches/linux/0036-wip-h3-h5-cvbs.patch b/projects/Allwinner/patches/linux/0036-wip-h3-h5-cvbs.patch index 5f3f69b491..9ec45ed5fe 100644 --- a/projects/Allwinner/patches/linux/0036-wip-h3-h5-cvbs.patch +++ b/projects/Allwinner/patches/linux/0036-wip-h3-h5-cvbs.patch @@ -216,8 +216,8 @@ Subject: [PATCH] wip h3/h5 cvbs static const struct de2_fmt_info de2_formats[] = { { .drm_fmt = DRM_FORMAT_ARGB8888, -@@ -341,9 +347,28 @@ static struct drm_plane **sun8i_layers_i - return planes; +@@ -341,10 +347,29 @@ static void sun8i_mixer_mode_set(struct + interlaced ? "on" : "off"); } +static void sun8i_mixer_apply_color_correction(struct sunxi_engine *engine) @@ -240,8 +240,10 @@ Subject: [PATCH] wip h3/h5 cvbs static const struct sunxi_engine_ops sun8i_engine_ops = { - .commit = sun8i_mixer_commit, - .layers_init = sun8i_layers_init, +- .mode_set = sun8i_mixer_mode_set, + .commit = sun8i_mixer_commit, + .layers_init = sun8i_layers_init, ++ .mode_set = sun8i_mixer_mode_set, + .apply_color_correction = sun8i_mixer_apply_color_correction, + .disable_color_correction = sun8i_mixer_disable_color_correction, }; diff --git a/projects/Allwinner/patches/linux/0096-media-hantro-postproc-Fix-legacy-regs-configuration.patch b/projects/Allwinner/patches/linux/0096-media-hantro-postproc-Fix-legacy-regs-configuration.patch index dfcf048058..d5dc40d44d 100644 --- a/projects/Allwinner/patches/linux/0096-media-hantro-postproc-Fix-legacy-regs-configuration.patch +++ b/projects/Allwinner/patches/linux/0096-media-hantro-postproc-Fix-legacy-regs-configuration.patch @@ -38,9 +38,9 @@ index 1a76628d5754..11ae663f11b7 100644 --- a/drivers/staging/media/hantro/hantro_postproc.c +++ b/drivers/staging/media/hantro/hantro_postproc.c @@ -113,6 +113,16 @@ static void hantro_postproc_g2_enable(struct hantro_ctx *ctx) - - hantro_write_addr(vpu, G2_RS_OUT_LUMA_ADDR, dst_dma); - hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset); + hantro_write_addr(vpu, G2_RS_OUT_LUMA_ADDR, dst_dma); + hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset); + } + if (ctx->dev->variant->legacy_regs) { + int out_depth = hantro_get_formath_depth(ctx->dst_fmt.pixelformat); + u8 pp_shift = 0; diff --git a/projects/Allwinner/patches/linux/0099-media-hantro-postproc-Properly-calculate-chroma-offs.patch b/projects/Allwinner/patches/linux/0099-media-hantro-postproc-Properly-calculate-chroma-offs.patch index 971b07caac..b05320ce27 100644 --- a/projects/Allwinner/patches/linux/0099-media-hantro-postproc-Properly-calculate-chroma-offs.patch +++ b/projects/Allwinner/patches/linux/0099-media-hantro-postproc-Properly-calculate-chroma-offs.patch @@ -18,12 +18,13 @@ diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/me index 11ae663f11b7..d8358d3289dc 100644 --- a/drivers/staging/media/hantro/hantro_postproc.c +++ b/drivers/staging/media/hantro/hantro_postproc.c -@@ -105,11 +105,13 @@ static void hantro_postproc_g2_enable(struct hantro_ctx *ctx) +@@ -105,12 +105,14 @@ static void hantro_postproc_g2_enable(struct hantro_ctx *ctx) { struct hantro_dev *vpu = ctx->dev; struct vb2_v4l2_buffer *dst_buf; - size_t chroma_offset = ctx->dst_fmt.width * ctx->dst_fmt.height; + size_t chroma_offset; + int down_scale = down_scale_factor(ctx); dma_addr_t dst_dma; dst_buf = hantro_get_dst_buf(ctx); @@ -31,5 +32,5 @@ index 11ae663f11b7..d8358d3289dc 100644 + chroma_offset = ctx->dst_fmt.plane_fmt[0].bytesperline * + ctx->dst_fmt.height; - hantro_write_addr(vpu, G2_RS_OUT_LUMA_ADDR, dst_dma); - hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset); + if (down_scale) { + hantro_reg_write(vpu, &g2_down_scale_e, 1);