linux (Allwinner): rebase patches for 5.19

This commit is contained in:
Rudi Heitbaum 2022-06-27 11:04:49 +00:00
parent 74aa2e202e
commit ddaa7ba594
3 changed files with 11 additions and 8 deletions

View File

@ -216,8 +216,8 @@ Subject: [PATCH] wip h3/h5 cvbs
static const struct de2_fmt_info de2_formats[] = { static const struct de2_fmt_info de2_formats[] = {
{ {
.drm_fmt = DRM_FORMAT_ARGB8888, .drm_fmt = DRM_FORMAT_ARGB8888,
@@ -341,9 +347,28 @@ static struct drm_plane **sun8i_layers_i @@ -341,10 +347,29 @@ static void sun8i_mixer_mode_set(struct
return planes; interlaced ? "on" : "off");
} }
+static void sun8i_mixer_apply_color_correction(struct sunxi_engine *engine) +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 = { static const struct sunxi_engine_ops sun8i_engine_ops = {
- .commit = sun8i_mixer_commit, - .commit = sun8i_mixer_commit,
- .layers_init = sun8i_layers_init, - .layers_init = sun8i_layers_init,
- .mode_set = sun8i_mixer_mode_set,
+ .commit = sun8i_mixer_commit, + .commit = sun8i_mixer_commit,
+ .layers_init = sun8i_layers_init, + .layers_init = sun8i_layers_init,
+ .mode_set = sun8i_mixer_mode_set,
+ .apply_color_correction = sun8i_mixer_apply_color_correction, + .apply_color_correction = sun8i_mixer_apply_color_correction,
+ .disable_color_correction = sun8i_mixer_disable_color_correction, + .disable_color_correction = sun8i_mixer_disable_color_correction,
}; };

View File

@ -38,9 +38,9 @@ index 1a76628d5754..11ae663f11b7 100644
--- a/drivers/staging/media/hantro/hantro_postproc.c --- a/drivers/staging/media/hantro/hantro_postproc.c
+++ b/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) @@ -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_LUMA_ADDR, dst_dma);
hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset); hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset);
}
+ if (ctx->dev->variant->legacy_regs) { + if (ctx->dev->variant->legacy_regs) {
+ int out_depth = hantro_get_formath_depth(ctx->dst_fmt.pixelformat); + int out_depth = hantro_get_formath_depth(ctx->dst_fmt.pixelformat);
+ u8 pp_shift = 0; + u8 pp_shift = 0;

View File

@ -18,12 +18,13 @@ diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/me
index 11ae663f11b7..d8358d3289dc 100644 index 11ae663f11b7..d8358d3289dc 100644
--- a/drivers/staging/media/hantro/hantro_postproc.c --- a/drivers/staging/media/hantro/hantro_postproc.c
+++ b/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 hantro_dev *vpu = ctx->dev;
struct vb2_v4l2_buffer *dst_buf; struct vb2_v4l2_buffer *dst_buf;
- size_t chroma_offset = ctx->dst_fmt.width * ctx->dst_fmt.height; - size_t chroma_offset = ctx->dst_fmt.width * ctx->dst_fmt.height;
+ size_t chroma_offset; + size_t chroma_offset;
int down_scale = down_scale_factor(ctx);
dma_addr_t dst_dma; dma_addr_t dst_dma;
dst_buf = hantro_get_dst_buf(ctx); dst_buf = hantro_get_dst_buf(ctx);
@ -31,5 +32,5 @@ index 11ae663f11b7..d8358d3289dc 100644
+ chroma_offset = ctx->dst_fmt.plane_fmt[0].bytesperline * + chroma_offset = ctx->dst_fmt.plane_fmt[0].bytesperline *
+ ctx->dst_fmt.height; + ctx->dst_fmt.height;
hantro_write_addr(vpu, G2_RS_OUT_LUMA_ADDR, dst_dma); if (down_scale) {
hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset); hantro_reg_write(vpu, &g2_down_scale_e, 1);