[PATCH v6 0/5] media: verisilicon: HEVC: fix 10bits handling

From: Benjamin Gaignard
Date: Mon Jan 30 2023 - 08:58:36 EST


When decoding a 10bits bitstreams HEVC driver should only expose 10bits pixel formats.
To fulfill this requirement it is needed to call hantro_reset_raw_fmt()
and to only change driver internal state in case of success.

Fluster score (140/147) doesn't change after this series.

version 6:
- Split the patches in multiple sub-patches.
- Rework hantro_reset_encoded_fmt() usage.

version 5:
- Add Nicolas's review tags
- Add Fixes tags

version 4:
- Split the change in 2 patches.
- Change hantro_check_depth_match() prototype to avoid using
ctx->bit_depth
- Return the result of hantro_reset_raw_fmt() to the caller.
- Only set ctx->bit_depth when hantro_reset_raw_fmt() returns is ok.

Benjamin Gaignard (5):
media: verisilicon: Do not set context src/dst formats in reset
functions
media: verisilicon: Do not use ctx fields as format storage when
resetting
media: verisilicon: Do not set ctx->bit_depth in hantro_try_ctrl()
media: verisilicon: Do not change context bit depth before validating
the format
media: verisilicon: HEVC: Only propose 10 bitscompatible pixels
formats

.../media/platform/verisilicon/hantro_drv.c | 39 ++++++++-
.../platform/verisilicon/hantro_postproc.c | 2 +-
.../media/platform/verisilicon/hantro_v4l2.c | 84 +++++++++----------
.../media/platform/verisilicon/hantro_v4l2.h | 3 +-
.../media/platform/verisilicon/imx8m_vpu_hw.c | 2 +
5 files changed, 79 insertions(+), 51 deletions(-)

--
2.34.1