Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671462 > unrolled thread

Re: [PATCH v2 1/6] [media] s5p-jpeg: Reset the Codec before doing a soft reset

Started byAndrzej Pietrasiewicz <andrzej.p@samsung.com>
First post2017-06-21 10:10 +0200
Last post2017-06-21 10:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 1/6] [media] s5p-jpeg: Reset the Codec before doing a  soft reset Andrzej Pietrasiewicz <andrzej.p@samsung.com> - 2017-06-21 10:10 +0200

#1671462 — Re: [PATCH v2 1/6] [media] s5p-jpeg: Reset the Codec before doing a soft reset

FromAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Date2017-06-21 10:10 +0200
SubjectRe: [PATCH v2 1/6] [media] s5p-jpeg: Reset the Codec before doing a soft reset
Message-ID<tUIS6-3AK-3@gated-at.bofh.it>
Hi Thierry,

W dniu 12.06.2017 o 19:13, Thierry Escande pisze:
> From: Abhilash Kesavan <a.kesavan@samsung.com>
> 
> This patch resets the encoding and decoding register bits before doing a
> soft reset.

Here are my thoughts after consulting the documentation:

> 
> Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
> Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
> ---
>   drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
> index a1d823a..9ad8f6d 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
> @@ -21,6 +21,10 @@ void exynos4_jpeg_sw_reset(void __iomem *base)
>   	unsigned int reg;
>   
>   	reg = readl(base + EXYNOS4_JPEG_CNTL_REG);
> +	writel(reg & ~(EXYNOS4_DEC_MODE | EXYNOS4_ENC_MODE),
> +	       base + EXYNOS4_JPEG_CNTL_REG);

Indeed, if encoding/decoding "back-to-back", the bits this patch touches
should be reset.

The doc also says, that "Soft reset is asserted to all registers
of JPEG except soft reset bit itself", so, theoretically speaking,
the changes in this patch are redundant. Instead, the doc says,
these bits have to be reset after servicing the interrupt for current image
and before programming the hardware to perform the next en/decoding.
And indeed, the first thing that both ENCODE and DECODE paths
of exynos4_jpeg_device_run() do is calling sw reset.

If, however, you can show that the changes in the patch discussed here
are in fact necessary (that's the very difference between theory and practise...),
I will readily ack it.

Andrzej

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web