diff options
author | Ming Qian <ming.qian@nxp.com> | 2022-04-19 18:09:41 +0800 |
---|---|---|
committer | Mirela Rabulea <mirela.rabulea@oss.nxp.com> | 2022-05-11 13:30:28 +0300 |
commit | 4c9269301068d65f73e48733ca98e360729a315f (patch) | |
tree | 4af4431324942ab8b6ad9d1faf75a1450af897e8 /drivers/media/platform | |
parent | 7b6c094a5592866a344132c3fa191c676933b06d (diff) |
LF-5925: imx-jpeg: Leave a blank space before the configuration data
There is a hardware bug that it will load
the first 128 bytes of configuration data twice,
it will led to some configure error.
so shift the configuration data 128 bytes,
and make the first 128 bytes all zero,
then hardware will load the 128 zero twice,
and ignore them as garbage.
then the configuration data can be loaded correctly
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/imx-jpeg/mxc-jpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/imx-jpeg/mxc-jpeg.c index 8710e6875f1f..6e02094dba6a 100644 --- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c @@ -524,6 +524,7 @@ static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg, GFP_ATOMIC); if (!cfg_stm) goto err; + memset(cfg_stm, 0, MXC_JPEG_MAX_CFG_STREAM); jpeg->slot_data[slot].cfg_stream_vaddr = cfg_stm; skip_alloc: @@ -762,7 +763,7 @@ static unsigned int mxc_jpeg_setup_cfg_stream(void *cfg_stream_vaddr, u32 fourcc, u16 w, u16 h) { - unsigned int offset = 0; + unsigned int offset = 0x80; u8 *cfg = (u8 *)cfg_stream_vaddr; struct mxc_jpeg_sof *sof; struct mxc_jpeg_sos *sos; |