Call pm_runtime_get_sync() before starting a frame and then
pm_runtime_put() after completing it. This can save power for the time
between processing two frames.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 27
The driver can be instantiated multiple times, e.g. for a decoder and
an encoder. Moreover, other drivers could coexist on the same system.
This makes the static video node number assignment pointless, so switch
to automatic assignment instead.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
There is a delayed work scheduled before starting the hardware and
canceled in the interrupt handler. If the delayed work is executed, it
resets the hardware and reports the failure to V4L2, so that the
execution can continue from next frames.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
Add checking created buffer size follow in mtk_jpeg_queue_setup().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/platform/mtk-jpeg
Add v4l2_m2m_suspend() function call in mtk_jpeg_suspend() to make sure
that the current frame is processed completely before suspend.
Add v4l2_m2m_resume() function call in mtk_jpeg_resume() to unblock the
driver from scheduling next frame.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
):
media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resume
Xia Jiang (28):
media: platform: Improve subscribe event flow for bug fixing
media: platform: Improve queue set up flow for bug fixing
media: platform: Improve getting and requesting irq flow for bug
fixing
media: platform
The standard v4l2_pix_format_mplane structure contains width/height/
sizeimage/bytesperline, so use v4l2_pix_format_mplane to replace them.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 101
Call mtk_jpeg_try_fmt_mplane() to replace the original computation of
sizeimage and bytesperline, because that mtk_jpeg_try_fmt_mplane()
already did it.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 12
Rename existing functions/defines/variables with a _dec prefix and
without dec_ prefix to prepare for the addition of the jpeg encoder
feature.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 172
JPEG dec does't support setting a compose rectangle, so remove
mtk_jpeg_dec_s_selection().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 22 ---
1 file changed, 22 deletions(-)
diff --git a/dr
Jpeg doesn't support colorspace conversion, so it shouldn't accept any
other colorspace in S_FMT.
Change the colorspace of jpeg to the fixed value.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_cor
Add jpeg enc device tree node.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
arch/arm/boot/dts/mt2701.dtsi | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 8d43a502aada
Use the generic clk_bulk_* helpers to enable and disable clocks.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 28 +--
.../media/platform/mtk-jpeg/mtk_jpeg_core.h | 8 +++---
2 files changed, 23
MTK_JPEG_FMT_FLAG_DEC_CAPTURE are enough.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 64 ++-
.../media/platform/mtk-jpeg/mtk_jpeg_core.h | 3 -
2 files changed, 34 insertions(+), 33 deletions(-)
diff --git a/drivers/media
Change register offset hex numerals from uppercase to lowercase.
Change data type of max/min width/height from integer to unsigned
integer.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.h| 8
drivers/media
Delete zeroing the reserved fields because that the core already
does it.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg
There is no need to queue an empty buffer for signaling a last frame,
because all frames are separate from each other in JPEG.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 46 +--
1 file changed, 2
Delete unused member variables annotation.
Delete unused variable definition.
Delete redundant log print, because V4L2 debug logs already print it.
Add annotation for enum mtk_jpeg_ctx_state.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk
Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
decode and encode have great similarities with function operation.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: fix the compile warnings
---
drivers/media/platform/mtk-jpeg/Makefile | 5 +-
.../media
Add jpeg enc device tree node document.
Reviewed-by: Rob Herring
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../bindings/media/mediatek-jpeg-encoder.txt | 35 +++
1 file changed, 35 insertions(+)
create mode 100644
Documentation/devicetree
Rename the files which are for decode feature. This is preparing
path since the jpeg enc patch will be added later.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/Makefile | 2 +-
drivers/media/platform/mtk-jpeg
Add varability which would be used between jpeg dec and enc to a match
data structure, it will make the code linear.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 113 +++---
.../media/platform/mtk-jpeg
Delete platform_get_resource operation for irq.
Return actual value rather than EINVAL when fail to get and request
irq.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 ++-
1 file changed, 2 insertions(+), 5
Let v4l2_ctrl_subscribe_event() do the job for other types except
V4L2_EVENT_SOURCE_CHANGE.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Delete the resetting hardware flow in suspend and resume function
because that resetting operation will be done in device_run().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 2 --
1 file changed, 2 deletions
Use clamp() to replace mtk_jpeg_bound_align_image() and round() to
replace mtk_jpeg_align().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 41 +--
drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.c | 8
Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 49 ++-
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index
The maximum width and height supported by JPEG dec is 65535, so change
them from 8192 to 65535.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
Move MTK_JPEG_COMP_MAX definition to mtk_jpeg_core.h file, because it
is used by mtk_jpeg_core.c file.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v12: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 2 ++
drivers/media/platform/mtk-jpeg/mtk_jpeg_reg.h | 1 -
2
):
media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resume
Xia Jiang (28):
media: platform: Improve subscribe event flow for bug fixing
media: platform: Improve queue set up flow for bug fixing
media: platform: Improve getting and requesting irq flow for bug
fixing
media: platform
From: Pi-Hsun Shih
Add two functions that can be used to stop new jobs from being queued /
continue running queued job. This can be used while a driver using m2m
helper is going to suspend / wake up from resume, and can ensure that
there's no job running in suspend process.
BUG=b:143046833
TEST=
Use clamp() to replace mtk_jpeg_bound_align_image() and round() to
replace mtk_jpeg_align().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 41 +--
drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.c | 8
There is no need to queue an empty buffer for signaling a last frame,
because all frames are separate from each other in JPEG.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 46 +--
1 file changed, 2
Move MTK_JPEG_COMP_MAX definition to mtk_jpeg_core.h file, because it
is used by mtk_jpeg_core.c file.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 2 ++
drivers/media/platform/mtk-jpeg/mtk_jpeg_reg.h | 1 -
2
Change register offset hex numerals from uppercase to lowercase.
Change data type of max/min width/height from integer to unsigned
integer.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.h| 8
drivers/media
Change compared to v10:
-specify the names of the clocks in the driver of patch 22/28
Xia Jiang (28):
media: platform: Improve subscribe event flow for bug fixing
media: platform: Improve queue set up flow for bug
Delete the resetting hardware flow in suspend and resume function
because that resetting operation will be done in device_run().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 2 --
1 file changed, 2 deletions
Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
decode and encode have great similarities with function operation.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/Makefile | 5 +-
.../media/platform/mtk
Add varability which would be used between jpeg dec and enc to a match
data structure, it will make the code linear.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 113 +++---
.../media/platform/mtk-jpeg
The standard v4l2_pix_format_mplane structure contains width/height/
sizeimage/bytesperline, so use v4l2_pix_format_mplane to replace them.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 101
Rename existing functions/defines/variables with a _dec prefix and
without dec_ prefix to prepare for the addition of the jpeg encoder
feature.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 172
JPEG dec does't support setting a compose rectangle, so remove
mtk_jpeg_dec_s_selection().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 22 ---
1 file changed, 22 deletions(-)
diff --git a/dr
Jpeg doesn't support colorspace conversion, so it shouldn't accept any
other colorspace in S_FMT.
Change the colorspace of jpeg to the fixed value.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_cor
Call mtk_jpeg_try_fmt_mplane() to replace the original computation of
sizeimage and bytesperline, because that mtk_jpeg_try_fmt_mplane()
already did it.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 12
The maximum width and height supported by JPEG dec is 65535, so change
them from 8192 to 65535.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 49 ++-
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index
There is a delayed work scheduled before starting the hardware and
canceled in the interrupt handler. If the delayed work is executed, it
resets the hardware and reports the failure to V4L2, so that the
execution can continue from next frames.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
Add jpeg enc device tree node.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
arch/arm/boot/dts/mt2701.dtsi | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 8d43a502aada
Delete zeroing the reserved fields because that the core already
does it.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg
Delete unused member variables annotation.
Delete unused variable definition.
Delete redundant log print, because V4L2 debug logs already print it.
Add annotation for enum mtk_jpeg_ctx_state.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk
Rename the files which are for decode feature. This is preparing
path since the jpeg enc patch will be added later.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/Makefile | 2 +-
drivers/media/platform/mtk-jpeg
Use the generic clk_bulk_* helpers to enable and disable clocks.
Signed-off-by: Xia Jiang
---
v11: specify the names of the clocks in the driver
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 28 +--
.../media/platform/mtk-jpeg/mtk_jpeg_core.h | 8 +++---
2 files changed
MTK_JPEG_FMT_FLAG_DEC_CAPTURE are enough.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 64 ++-
.../media/platform/mtk-jpeg/mtk_jpeg_core.h | 3 -
2 files changed, 34 insertions(+), 33 deletions(-)
diff --git a/drivers/media
Add jpeg enc device tree node document.
Reviewed-by: Rob Herring
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../bindings/media/mediatek-jpeg-encoder.txt | 35 +++
1 file changed, 35 insertions(+)
create mode 100644
Documentation/devicetree
Add v4l2_m2m_suspend() function call in mtk_jpeg_suspend() to make sure
that the current frame is processed completely before suspend.
Add v4l2_m2m_resume() function call in mtk_jpeg_resume() to unblock the
driver from scheduling next frame.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
Let v4l2_ctrl_subscribe_event() do the job for other types except
V4L2_EVENT_SOURCE_CHANGE.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Delete platform_get_resource operation for irq.
Return actual value rather than EINVAL when fail to get and request
irq.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 ++-
1 file changed, 2 insertions(+), 5
Add checking created buffer size follow in mtk_jpeg_queue_setup().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/platform/mtk-jpeg
The driver can be instantiated multiple times, e.g. for a decoder and
an encoder. Moreover, other drivers could coexist on the same system.
This makes the static video node number assignment pointless, so switch
to automatic assignment instead.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
Call pm_runtime_get_sync() before starting a frame and then
pm_runtime_put() after completing it. This can save power for the time
between processing two frames.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v11: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 27
On Thu, 2020-07-30 at 16:34 +, Tomasz Figa wrote:
> Hi Xia,
>
> On Thu, Jul 23, 2020 at 11:04:45AM +0800, Xia Jiang wrote:
> > Use the generic of_property_* helpers to get the clock_nums and clocks
> > from device tree.
> > Use the generic clk_bulk_* helpers t
On Thu, 2020-06-11 at 18:46 +, Tomasz Figa wrote:
> Hi Xia,
>
> On Thu, Jun 04, 2020 at 05:05:53PM +0800, Xia Jiang wrote:
> > Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
> > decode and encode have great similarities with function operation.
&
On Mon, 2020-06-08 at 12:54 +0200, Hans Verkuil wrote:
> On 04/06/2020 11:05, Xia Jiang wrote:
> > Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
> > decode and encode have great similarities with function operation.
> >
> > Signed-off-by: Xia
On Mon, 2020-06-08 at 07:36 +0800, Chun-Kuang Hu wrote:
> Hi, Xia:
>
> Xia Jiang 於 2020年6月4日 週四 下午5:21寫道:
> >
> > Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
> > decode and encode have great similarities with function operation.
>
r for jpeg dec
- add the mechanism to ensure that the buffer is enough to hold the EXIF data
in .buf_prepare callback
Xia Jiang (28):
media: platform: Improve subscribe event flow for bug fixing
media: platform: Improve queue set up flow for bug fixing
media: platform: Improve getting and
Delete platform_get_resource operation for irq.
Return actual value rather than EINVAL when fail to get and request
irq.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 ++-
1 file changed, 2 insertions(+), 5
Move MTK_JPEG_COMP_MAX definition to mtk_jpeg_core.h file, because it
is used by mtk_jpeg_core.c file.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 2 ++
drivers/media/platform/mtk-jpeg/mtk_jpeg_reg.h | 1 -
2
Change register offset hex numerals from uppercase to lowercase.
Change data type of max/min width/height from integer to unsigned
integer.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.h| 8
drivers/media
Call pm_runtime_get_sync() before starting a frame and then
pm_runtime_put() after completing it. This can save power for the time
between processing two frames.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 27
JPEG dec does't support setting a compose rectangle, so remove
mtk_jpeg_dec_s_selection().
Signed-off-by: Xia Jiang
---
v10: new add patch
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 22 ---
1 file changed, 22 deletions(-)
diff --git a/drivers/media/platform/mtk
Jpeg doesn't support colorspace conversion, so it shouldn't accept any
other colorspace in S_FMT.
Change the colorspace of jpeg to the fixed value.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 24 +--
1 file c
The driver can be instantiated multiple times, e.g. for a decoder and
an encoder. Moreover, other drivers could coexist on the same system.
This makes the static video node number assignment pointless, so switch
to automatic assignment instead.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
Use clamp() to replace mtk_jpeg_bound_align_image() and round() to
replace mtk_jpeg_align().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 41 +--
drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.c | 8
Delete unused member variables annotation.
Delete unused variable definition.
Delete redundant log print, because V4L2 debug logs already print it.
Add annotation for enum mtk_jpeg_ctx_state.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk
Add jpeg enc device tree node document.
Reviewed-by: Rob Herring
Signed-off-by: Xia Jiang
---
v10: no changes
---
.../bindings/media/mediatek-jpeg-encoder.txt | 35 +++
1 file changed, 35 insertions(+)
create mode 100644
Documentation/devicetree/bindings/media/mediatek-jpeg
Delete zeroing the reserved fields because that the core already
does it.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg
Call mtk_jpeg_try_fmt_mplane() to replace the original computation of
sizeimage and bytesperline, because that mtk_jpeg_try_fmt_mplane()
already did it.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 12 ++--
1 file changed, 2
Add varability which would be used between jpeg dec and enc to a match
data structure, it will make the code linear.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 100 +++---
.../media/platform/mtk-jpeg/mtk_jpeg_core.h | 28
Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
decode and encode have great similarities with function operation.
Signed-off-by: Xia Jiang
---
v10: cancel mtk_jpeg_enc_bs structure.
refactor the setting hardware register functions in mtk_jpeg_enc_hw.c.
remove
The function of mtk_jpeg_adjust_fmt_mplane() equals
mtk_jpeg_g_fmt_vid_mplane(), so use mtk_jpeg_g_fmt_vid_mplane() to
replace it .
Delete the unused ctx parameter.
Using fourcc to distinguish between different formats is more generic,
because that jpeg enc will also use it.
Signed-off-by: Xia
The standard v4l2_pix_format_mplane structure contains width/height/
sizeimage/bytesperline, so use v4l2_pix_format_mplane to replace them.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 101 ++
.../media/platform/mtk-jpeg
Rename existing functions/defines/variables with a _dec prefix and
without dec_ prefix to prepare for the addition of the jpeg encoder
feature.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 172
Rename the files which are for decode feature. This is preparing
path since the jpeg enc patch will be added later.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/Makefile | 2 +-
drivers/media/platform/mtk-jpeg
Use the generic of_property_* helpers to get the clock_nums and clocks
from device tree.
Use the generic clk_bulk_* helpers to enable and disable clocks.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 47 +++
.../media
MTK_JPEG_FMT_FLAG_DEC_CAPTURE are enough.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 64 ++-
.../media/platform/mtk-jpeg/mtk_jpeg_core.h | 3 -
2 files changed, 34 insertions(+), 33 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg
Add jpeg enc device tree node.
Signed-off-by: Xia Jiang
---
v10: no changes
---
arch/arm/boot/dts/mt2701.dtsi | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 8d43a502aada..1c1c2132234f 100644
--- a/arch/arm
Add checking created buffer size follow in mtk_jpeg_queue_setup().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/platform/mtk-jpeg
Delete the resetting hardware flow in suspend and resume function
because that resetting operation will be done in device_run().
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 2 --
1 file changed, 2 deletions
The maximum width and height supported by JPEG dec is 65535, so change
them from 8192 to 65535.
Signed-off-by: Xia Jiang
---
v10: new add patch
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/mtk
There is no need to queue an empty buffer for signaling a last frame,
because all frames are separate from each other in JPEG.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: delete mtk_jpeg_qbuf()
---
.../media/platform/mtk-jpeg/mtk_jpeg_core.c | 46 +--
1 file
Add v4l2_m2m_suspend() function call in mtk_jpeg_suspend() to make sure
that the current frame is processed completely before suspend.
Add v4l2_m2m_resume() function call in mtk_jpeg_resume() to unblock the
driver from scheduling next frame.
Signed-off-by: Xia Jiang
---
v10: use
There is a delayed work scheduled before starting the hardware and
canceled in the interrupt handler. If the delayed work is executed, it
resets the hardware and reports the failure to V4L2, so that the
execution can continue from next frames.
Signed-off-by: Xia Jiang
---
v10: new add patch
Let v4l2_ctrl_subscribe_event() do the job for other types except
V4L2_EVENT_SOURCE_CHANGE.
Reviewed-by: Tomasz Figa
Signed-off-by: Xia Jiang
---
v10: no changes
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
On Tue, 2020-07-07 at 15:35 +0200, Tomasz Figa wrote:
> On Tue, Jul 7, 2020 at 8:47 AM Xia Jiang wrote:
> >
> > On Tue, 2020-06-30 at 16:53 +, Tomasz Figa wrote:
> > > Hi Xia,
> > >
> > > On Tue, Jun 30, 2020 at 10:56:21AM +0800, Xia Jiang wrote:
On Tue, 2020-06-30 at 16:53 +, Tomasz Figa wrote:
> Hi Xia,
>
> On Tue, Jun 30, 2020 at 10:56:21AM +0800, Xia Jiang wrote:
> > On Thu, 2020-06-11 at 18:46 +, Tomasz Figa wrote:
> > > Hi Xia,
> > >
> > > On Thu, Jun 04, 2020 at 05:05:53PM +0800,
On Tue, 2020-06-30 at 16:53 +, Tomasz Figa wrote:
> Hi Xia,
>
> On Tue, Jun 30, 2020 at 10:56:21AM +0800, Xia Jiang wrote:
> > On Thu, 2020-06-11 at 18:46 +, Tomasz Figa wrote:
> > > Hi Xia,
> > >
> > > On Thu, Jun 04, 2020 at 05:05:53PM +0800,
On Thu, 2020-06-11 at 18:46 +, Tomasz Figa wrote:
> Hi Xia,
>
> On Thu, Jun 04, 2020 at 05:05:53PM +0800, Xia Jiang wrote:
> > Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
> > decode and encode have great similarities with function operation.
&
On Thu, 2020-05-21 at 16:00 +, Tomasz Figa wrote:
> Hi Xia,
>
> On Fri, Apr 03, 2020 at 05:40:30PM +0800, Xia Jiang wrote:
> > Add jpeg enc device tree node document
> >
> > Reviewed-by: Rob Herring
> > Signed-off-by: Xia Jiang
> > ---
> > v8: n
On Mon, 2020-05-11 at 11:04 +0200, Hans Verkuil wrote:
> On 03/04/2020 11:40, Xia Jiang wrote:
> > Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg
> > decode and encode have great similarities with function operation.
> >
> > Signed-off-by: Xia
On Mon, 2020-05-11 at 10:37 +0200, Hans Verkuil wrote:
> On 03/04/2020 11:40, Xia Jiang wrote:
> > Change register offset hex numberals from upercase to lowercase.
>
> Typos:
>
> numberals -> numerals
>
> upercase -> uppercase
Done.
>
> Regards,
>
&
1 - 100 of 169 matches
Mail list logo