Exynos 5433 jpeg h/w codec support
Subsystems (3)
cover Exynos 5433 jpeg h/w codec support
Support for Exynos 5433 to the s5p-jpeg driver.
The series also includes jpeg codec node definition for Device Tree, but it depends on:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
branch v4.3-drop/dt64-samsung which has not made it into 4.3, but the driver is meant for 4.4.
Rebased onto Mauro's master with the branch mentioned above merged.
This patch series also adds Andrzej Pietrasiewicz and Jacek Anaszewski as maintainers of drivers/media/platform/s5p-jpeg.
Andrzej is the original author of the driver, and has committed support for three Exynos chip models and some fixes.
Jacek has committed support for another three and a number of fixes, and is the second author of the driver.
The code size is now quite large compared to the initial release, so having it maintained is a good idea and we both have the supported hardware at hand.
Andrzej Pietrasiewicz (2):
s5p-jpeg: add support for 5433
MAINTAINERS: add exynos jpeg codec maintainers
Marek Szyprowski (2):
s5p-jpeg: generalize clocks handling
ARM64: dts: exynos5433: add jpeg node
.../bindings/media/exynos-jpeg-codec.txt | 3 +- MAINTAINERS | 8 + arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 + drivers/media/platform/s5p-jpeg/jpeg-core.c | 444 ++++++++++++++++++--- drivers/media/platform/s5p-jpeg/jpeg-core.h | 41 +- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 80 +++- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h | 11 +- drivers/media/platform/s5p-jpeg/jpeg-regs.h | 85 ++-- 8 files changed, 588 insertions(+), 105 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/4 s5p-jpeg: generalize clocks handling
From: Marek Szyprowski <[email protected]>
Allow jpeg codec variants declare clocks they need. Before this patch is applied jpeg-core gets jpeg->sclk "speculatively": if it is not there, we assume no problem.
This patch eliminates this by explicitly declaring what clocks are needed for each variant.
This is a preparation for adding Exynos 5433 variant support, which needs 4 clocks of names not compatible with any previous version of jpeg hw module.
--- drivers/media/platform/s5p-jpeg/jpeg-core.c | 66 ++++++++++++++--------------- drivers/media/platform/s5p-jpeg/jpeg-core.h | 10 +++-- 2 files changed, 37 insertions(+), 39 deletions(-)
drivers/media/platform/s5p-jpeg/jpeg-core.c +31 -35
@@ -2455,7 +2455,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev) {struct s5p_jpeg *jpeg;struct resource *res; -int ret; +int i, ret;/* JPEG IP abstraction struct */ jpeg =devm_kzalloc (&pdev->dev,sizeof (struct s5p_jpeg ),GFP_KERNEL );
@@ -2490,23 +2490,21 @@ static int s5p_jpeg_probe(struct platform_device *pdev) }/* clocks */ - jpeg->clk =clk_get (&pdev->dev,"jpeg" ); -if (IS_ERR (jpeg->clk)) { -dev_err (&pdev->dev,"cannot get clock\n" ); - ret =PTR_ERR (jpeg->clk); -return ret; +for (i =0 ; i < jpeg->variant->num_clocks; i++) { + jpeg->clocks[i] =devm_clk_get (&pdev->dev, + jpeg->variant->clk_names[i]); +if (IS_ERR (jpeg->clocks[i])) { +dev_err (&pdev->dev,"failed to get clock: %s\n" , + jpeg->variant->clk_names[i]); +return PTR_ERR (jpeg->clocks[i]); + } } -dev_dbg (&pdev->dev,"clock source %p\n" , jpeg->clk); - - jpeg->sclk =clk_get (&pdev->dev,"sclk" ); -if (IS_ERR (jpeg->sclk)) -dev_info (&pdev->dev,"sclk clock not available\n" );/* v4l2 device */ ret =v4l2_device_register (&pdev->dev, &jpeg->v4l2_dev);if (ret) {dev_err (&pdev->dev,"Failed to register v4l2 device\n" ); - goto clk_get_rollback; +return ret; }/* mem2mem device */
@@ -2607,17 +2605,13 @@ m2m_init_rollback: device_register_rollback:v4l2_device_unregister (&jpeg->v4l2_dev); -clk_get_rollback: -clk_put (jpeg->clk); -if (!IS_ERR (jpeg->sclk)) -clk_put (jpeg->sclk); -return ret; }static int s5p_jpeg_remove (struct platform_device *pdev) {struct s5p_jpeg *jpeg =platform_get_drvdata (pdev); +int i;pm_runtime_disable (jpeg->dev);
@@ -2630,15 +2624,10 @@ static int s5p_jpeg_remove(struct platform_device *pdev)v4l2_device_unregister (&jpeg->v4l2_dev);if (!pm_runtime_status_suspended (&pdev->dev)) { -clk_disable_unprepare (jpeg->clk); -if (!IS_ERR (jpeg->sclk)) -clk_disable_unprepare (jpeg->sclk); +for (i = jpeg->variant->num_clocks -1 ; i >=0 ; i--) +clk_disable_unprepare (jpeg->clocks[i]); } -clk_put (jpeg->clk); -if (!IS_ERR (jpeg->sclk)) -clk_put (jpeg->sclk); -return 0 ; }
@@ -2646,10 +2635,10 @@ static int s5p_jpeg_remove(struct platform_device *pdev)static int s5p_jpeg_runtime_suspend (struct device *dev) {struct s5p_jpeg *jpeg =dev_get_drvdata (dev); +int i; -clk_disable_unprepare (jpeg->clk); -if (!IS_ERR (jpeg->sclk)) -clk_disable_unprepare (jpeg->sclk); +for (i = jpeg->variant->num_clocks -1 ; i >=0 ; i--) +clk_disable_unprepare (jpeg->clocks[i]);return 0 ; }
@@ -2658,16 +2647,15 @@ static int s5p_jpeg_runtime_resume(struct device *dev) {struct s5p_jpeg *jpeg =dev_get_drvdata (dev);unsigned long flags; -int ret; +int i, ret; - ret =clk_prepare_enable (jpeg->clk); -if (ret <0 ) -return ret; - -if (!IS_ERR (jpeg->sclk)) { - ret =clk_prepare_enable (jpeg->sclk); -if (ret <0 ) +for (i =0 ; i < jpeg->variant->num_clocks; i++) { + ret =clk_prepare_enable (jpeg->clocks[i]); +if (ret) { +while (--i >0 ) +clk_disable_unprepare (jpeg->clocks[i]);return ret; + } }spin_lock_irqsave (&jpeg->slock, flags);
@@ -2721,6 +2709,8 @@ static struct s5p_jpeg_variant s5p_jpeg_drvdata = { .jpeg_irq = s5p_jpeg_irq, .m2m_ops = &s5p_jpeg_m2m_ops, .fmt_ver_flag = SJPEG_FMT_FLAG_S5P, + .clk_names = {"jpeg"}, + .num_clocks = 1, }; static struct s5p_jpeg_variant exynos3250_jpeg_drvdata = {
@@ -2729,6 +2719,8 @@ static struct s5p_jpeg_variant exynos3250_jpeg_drvdata = { .m2m_ops = &exynos3250_jpeg_m2m_ops, .fmt_ver_flag = SJPEG_FMT_FLAG_EXYNOS3250, .hw3250_compat = 1, + .clk_names = {"jpeg", "sclk"}, + .num_clocks = 2, }; static struct s5p_jpeg_variant exynos4_jpeg_drvdata = {
@@ -2737,6 +2729,8 @@ static struct s5p_jpeg_variant exynos4_jpeg_drvdata = { .m2m_ops = &exynos4_jpeg_m2m_ops, .fmt_ver_flag = SJPEG_FMT_FLAG_EXYNOS4, .htbl_reinit = 1, + .clk_names = {"jpeg"}, + .num_clocks = 1, }; static struct s5p_jpeg_variant exynos5420_jpeg_drvdata = {
@@ -2746,6 +2740,8 @@ static struct s5p_jpeg_variant exynos5420_jpeg_drvdata = { .fmt_ver_flag = SJPEG_FMT_FLAG_EXYNOS3250, /* intentionally 3250 */ .hw3250_compat = 1, .htbl_reinit = 1, + .clk_names = {"jpeg"}, + .num_clocks = 1, }; static const struct of_device_id samsung_jpeg_match[] = {
drivers/media/platform/s5p-jpeg/jpeg-core.h +6 -4
@@ -20,6 +20,8 @@#define S5P_JPEG_M2M_NAME "s5p-jpeg" +#define JPEG_MAX_CLOCKS 4 +/* JPEG compression quality setting */ #define S5P_JPEG_COMPR_QUAL_BEST 0#define S5P_JPEG_COMPR_QUAL_WORST 3
@@ -100,8 +102,7 @@ enum exynos4_jpeg_img_quality_level {* @m2m_dev: v4l2 mem2mem device data * @regs: JPEG IP registers mapping * @irq: JPEG IP irq -* @clk: JPEG IP clock -* @sclk: Exynos3250 JPEG IP special clock +* @clocks: JPEG IP clock(s) * @dev: JPEG IP struct device * @alloc_ctx: videobuf2 memory allocator's context * @variant: driver variant to be used
@@ -121,8 +122,7 @@ struct s5p_jpeg {void __iomem *regs;unsigned int irq;enum exynos4_jpeg_result irq_ret; -struct clk *clk; -struct clk *sclk; +struct clk *clocks[JPEG_MAX_CLOCKS ];struct device *dev;void *alloc_ctx;struct s5p_jpeg_variant *variant;
@@ -136,6 +136,8 @@ struct s5p_jpeg_variant { unsigned int htbl_reinit:1;struct v4l2_m2m_ops *m2m_ops;irqreturn_t (*jpeg_irq)(int irq,void *priv); +const char *clk_names[JPEG_MAX_CLOCKS ]; +int num_clocks; };/**
Signature · 1 line
1.9.1
PATCH 1/4 s5p-jpeg: generalize clocks handling
Hi Andrzej, Marek,
Quoted 13 lines · Andrzej Pietrasiewicz
From: Marek Szyprowski <[email protected]>
Allow jpeg codec variants declare clocks they need. Before this patch is applied jpeg-core gets
jpeg->sclk"speculatively": if it is not there, we assume no problem.This patch eliminates this by explicitly declaring what clocks are needed for each variant.
This is a preparation for adding Exynos 5433 variant support, which needs 4 clocks of names not compatible with any previous version of jpeg hw module.
Quoted 7 lines
Signed-off-by Marek Szyprowski <[email protected]>[Rebase and commit message]Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- drivers/media/platform/s5p-jpeg/jpeg-core.c | 66 ++++++++++++++--------------- drivers/media/platform/s5p-jpeg/jpeg-core.h | 10 +++-- 2 files changed, 37 insertions(+), 39 deletions(-)
Signature · 2 lines
Best Regards, Jacek Anaszewski
PATCH 2/4 s5p-jpeg: add support for 5433
In reply to Andrzej PietrasiewiczJPEG IP found in Exynos5433 is similar to what is in Exynos4, but there are some subtle differences which this patch takes into account.
The most important difference is in what is processed by the JPEG IP and what has to be provided to it. In case of 5433 the IP does not parse Huffman and quantisation tables, so this has to be performed with the CPU and the majority of the code in this patch does that.
A small but important difference is in what address is passed to the JPEG IP. In case of 5433 it is the SOS (start of scan) position, which is natural, because the headers must be parsed elsewhere.
There is also a difference in how the hardware is put to work in device_run.
Data structures are extended as appropriate to accommodate the above changes.
--- .../bindings/media/exynos-jpeg-codec.txt | 3 +- drivers/media/platform/s5p-jpeg/jpeg-core.c | 378 +++++++++++++++++++-- drivers/media/platform/s5p-jpeg/jpeg-core.h | 31 ++ drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 80 ++++- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h | 11 +- drivers/media/platform/s5p-jpeg/jpeg-regs.h | 85 +++-- 6 files changed, 522 insertions(+), 66 deletions(-)
Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt +2 -1
@@ -4,7 +4,8 @@ Required properties: - compatible : should be one of: "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg", - "samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg"; + "samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg", + "samsung,exynos5433-jpeg"; - reg : address and length of the JPEG codec IP register set; - interrupts : specifies the JPEG codec IP interrupt; - clock-names : should contain:
drivers/media/platform/s5p-jpeg/jpeg-core.c +359 -19
514 lines not on this page · raw message
drivers/media/platform/s5p-jpeg/jpeg-core.h +31 -0
@@ -42,9 +42,12 @@/* a selection of JPEG markers */ #define TEM 0x01#define SOF0 0xc0 +#define DHT 0xc4#define RST 0xd0#define SOI 0xd8#define EOI 0xd9 +#define SOS 0xda +#define DQT 0xdb#define DHP 0xde/* Flags that indicate a format can be used for capture/output */
@@ -68,12 +71,15 @@#define SJPEG_SUBSAMPLING_422 0x21#define SJPEG_SUBSAMPLING_420 0x22 +#define S5P_JPEG_MAX_MARKER 4 +/* Version numbers */ enum sjpeg_version {SJPEG_S5P ,SJPEG_EXYNOS3250 ,SJPEG_EXYNOS4 ,SJPEG_EXYNOS5420 , +SJPEG_EXYNOS5433 , };enum exynos4_jpeg_result {
@@ -134,6 +140,7 @@ struct s5p_jpeg_variant {unsigned int fmt_ver_flag; unsigned int hw3250_compat:1; unsigned int htbl_reinit:1; + unsigned int hw_ex4_compat:1;struct v4l2_m2m_ops *m2m_ops;irqreturn_t (*jpeg_irq)(int irq,void *priv);const char *clk_names[JPEG_MAX_CLOCKS ];
@@ -163,16 +170,40 @@ struct s5p_jpeg_fmt { };/** +* s5p_jpeg_marker - collection of markers from jpeg header +* @marker: markers' positions relative to the buffer beginning +* @len: markers' payload lengths (without length field) +* @n: number of markers in collection +*/ +struct s5p_jpeg_marker { +u32 marker[S5P_JPEG_MAX_MARKER ]; +u32 len[S5P_JPEG_MAX_MARKER ]; +u32 n; +}; + +/** * s5p_jpeg_q_data - parameters of one queue * @fmt: driver-specific format of this queue * @w: image width * @h: image height +* @sos: SOS marker's position relative to the buffer beginning +* @dht: DHT markers' positions relative to the buffer beginning +* @dqt: DQT markers' positions relative to the buffer beginning +* @sof: SOF0 marker's postition relative to the buffer beginning +* @sof_len: SOF0 marker's payload length (without length field itself) +* @components: number of image components * @size: image buffer size in bytes */ struct s5p_jpeg_q_data {struct s5p_jpeg_fmt *fmt;u32 w;u32 h; +u32 sos; +struct s5p_jpeg_marker dht; +struct s5p_jpeg_marker dqt; +u32 sof; +u32 sof_len; +u32 components;u32 size; };
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c +66 -14
150 lines not on this page · raw message
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h +8 -3
@@ -15,10 +15,12 @@void exynos4_jpeg_sw_reset (void __iomem *base);void exynos4_jpeg_set_enc_dec_mode (void __iomem *base,unsigned int mode); -void exynos4_jpeg_set_img_fmt (void __iomem *base,unsigned int img_fmt); -void exynos4_jpeg_set_enc_out_fmt (void __iomem *base,unsigned int out_fmt); +void __exynos4_jpeg_set_img_fmt (void __iomem *base,unsigned int img_fmt, +unsigned int version); +void __exynos4_jpeg_set_enc_out_fmt (void __iomem *base,unsigned int out_fmt, +unsigned int version);void exynos4_jpeg_set_enc_tbl (void __iomem *base); -void exynos4_jpeg_set_interrupt (void __iomem *base); +void exynos4_jpeg_set_interrupt (void __iomem *base,unsigned int version);unsigned int exynos4_jpeg_get_int_status (void __iomem *base);void exynos4_jpeg_set_huf_table_enable (void __iomem *base,int value);void exynos4_jpeg_set_sys_int_enable (void __iomem *base,int value);
@@ -30,6 +32,9 @@ void exynos4_jpeg_set_frame_buf_address(void __iomem *base, struct s5p_jpeg_addr *jpeg_addr);void exynos4_jpeg_set_encode_tbl_select (void __iomem *base,enum exynos4_jpeg_img_quality_level level); +void exynos4_jpeg_set_dec_components (void __iomem *base,int n); +void exynos4_jpeg_select_dec_q_tbl (void __iomem *base,char c,char x); +void exynos4_jpeg_select_dec_h_tbl (void __iomem *base,char c,char x);void exynos4_jpeg_set_encode_hoff_cnt (void __iomem *base,unsigned int fmt);void exynos4_jpeg_set_dec_bitstream_size (void __iomem *base,unsigned int size);unsigned int exynos4_jpeg_get_stream_size (void __iomem *base);
drivers/media/platform/s5p-jpeg/jpeg-regs.h +56 -29
115 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/4 s5p-jpeg: add support for 5433
Hi Andrzej,
Quoted 19 lines · Andrzej Pietrasiewicz
JPEG IP found in Exynos5433 is similar to what is in Exynos4, but there are some subtle differences which this patch takes into account.
The most important difference is in what is processed by the JPEG IP and what has to be provided to it. In case of 5433 the IP does not parse Huffman and quantisation tables, so this has to be performed with the CPU and the majority of the code in this patch does that.
A small but important difference is in what address is passed to the JPEG IP. In case of 5433 it is the SOS (start of scan) position, which is natural, because the headers must be parsed elsewhere.
There is also a difference in how the hardware is put to work in
device_run.Data structures are extended as appropriate to accommodate the above changes.
Signed-off-by Andrzej Pietrasiewicz <[email protected]>
Quoted 8 lines
--- .../bindings/media/exynos-jpeg-codec.txt | 3 +- drivers/media/platform/s5p-jpeg/jpeg-core.c | 378 +++++++++++++++++++-- drivers/media/platform/s5p-jpeg/jpeg-core.h | 31 ++ drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 80 ++++- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h | 11 +- drivers/media/platform/s5p-jpeg/jpeg-regs.h | 85 +++-- 6 files changed, 522 insertions(+), 66 deletions(-)
Signature · 2 lines
Best Regards, Jacek Anaszewski
PATCH 3/4 MAINTAINERS: add exynos jpeg codec maintainers
In reply to Andrzej PietrasiewiczAdd Andrzej Pietrasiewicz and Jacek Anaszewski as maintainers of drivers/media/platform/s5p-jpeg.
--- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
@@ -1452,6 +1452,14 @@ L: linux-media at vger.kernel.org S: Maintained F: drivers/media/platform/s5p-tv/ +ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT +M: Andrzej Pietrasiewicz <[email protected]> +M: Jacek Anaszewski <[email protected]> +L: linux-arm-kernel at lists.infradead.org +L: linux-media at vger.kernel.org +S: Maintained +F: drivers/media/platform/s5p-jpeg/ + ARM/SHMOBILE ARM ARCHITECTURE M: Simon Horman <[email protected]> M: Magnus Damm <[email protected]>
Signature · 1 line
1.9.1
PATCH 3/4 MAINTAINERS: add exynos jpeg codec maintainers
Quoted 18 lines · Andrzej Pietrasiewicz
Add Andrzej Pietrasiewicz and Jacek Anaszewski as maintainers of
drivers/media/platform/s5p-jpeg.Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)MAINTAINERS +1
-0@@ -1452,6 +1452,14 @@ L: linux-media at vger.kernel.org S: Maintained F: drivers/media/platform/s5p-tv/ +ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT
MAINTAINERS L: linux-media at vger.kernel.org · line 1465
Quoted 10 lines
MAINTAINERS +7
-0+M: Andrzej Pietrasiewicz <[email protected]> +M: Jacek Anaszewski <[email protected]> +L: linux-arm-kernel at lists.infradead.org +L: linux-media at vger.kernel.org +S: Maintained +F: drivers/media/platform/s5p-jpeg/ + ARM/SHMOBILE ARM ARCHITECTURE M: Simon Horman <[email protected]> M: Magnus Damm <[email protected]>
Signature · 2 lines
Best Regards, Jacek Anaszewski
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
In reply to Andrzej PietrasiewiczFrom: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +21 -0
@@ -916,6 +916,27 @@ io-channel-ranges; status = "disabled"; }; + jpeg: jpeg at 15020000 { + compatible = "samsung,exynos5433-jpeg"; + reg = <0x15020000 0x10000>; + interrupts = <0 411 0>; + clock-names = "pclk", + "aclk", + "aclk_xiu", + "sclk"; + clocks = <&cmu_mscl CLK_PCLK_JPEG>, + <&cmu_mscl CLK_ACLK_JPEG>, + <&cmu_mscl CLK_ACLK_XIU_MSCLX>, + <&cmu_mscl CLK_SCLK_JPEG>; + assigned-clocks = <&cmu_mscl CLK_MOUT_ACLK_MSCL_400_USER>, + <&cmu_mscl CLK_MOUT_SCLK_JPEG_USER>, + <&cmu_mscl CLK_MOUT_SCLK_JPEG>, + <&cmu_top CLK_MOUT_SCLK_JPEG_A>; + assigned-clock-parents = <&cmu_top CLK_ACLK_MSCL_400>, + <&cmu_top CLK_SCLK_JPEG_MSCL>, + <&cmu_mscl CLK_MOUT_SCLK_JPEG_USER>, + <&cmu_top CLK_MOUT_BUS_PLL_USER>; + }; }; timer {
Signature · 1 line
1.9.1
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 11 lines · Andrzej Pietrasiewicz
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0
This dtsi file doesn't exist in the media-git tree. What is the story here?
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can take this patch, right?
Regards,
Hans
Quoted 32 lines
index 59e21b6..5cb489f 100644
arch/arm64/boot/dts/exynos/exynos5433.dtsi +21
-0@@ -916,6 +916,27 @@ io-channel-ranges; status = "disabled"; }; + jpeg: jpeg at 15020000 { + compatible = "samsung,exynos5433-jpeg"; + reg = <0x15020000 0x10000>; + interrupts = <0 411 0>; + clock-names = "pclk", + "aclk", + "aclk_xiu", + "sclk"; + clocks = <&cmu_mscl CLK_PCLK_JPEG>, + <&cmu_mscl CLK_ACLK_JPEG>, + <&cmu_mscl CLK_ACLK_XIU_MSCLX>, + <&cmu_mscl CLK_SCLK_JPEG>; + assigned-clocks = <&cmu_mscl CLK_MOUT_ACLK_MSCL_400_USER>, + <&cmu_mscl CLK_MOUT_SCLK_JPEG_USER>, + <&cmu_mscl CLK_MOUT_SCLK_JPEG>, + <&cmu_top CLK_MOUT_SCLK_JPEG_A>; + assigned-clock-parents = <&cmu_top CLK_ACLK_MSCL_400>, + <&cmu_top CLK_SCLK_JPEG_MSCL>, + <&cmu_mscl CLK_MOUT_SCLK_JPEG_USER>, + <&cmu_top CLK_MOUT_BUS_PLL_USER>; + }; }; timer {
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 11 lines · Andrzej Pietrasiewicz
Quoted 10 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
Quoted 9 lines
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 1 line
arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can take this patch, right?
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.
Andrzej
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
Em Mon, 21 Sep 2015 11:59:27 +0200
Andrzej Pietrasiewicz <[email protected]> escreveu:
Quoted 24 lines
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 11 lines · Andrzej Pietrasiewicz
Quoted 10 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)Quoted 9 lines
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 1 line
arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can take this patch, right?
Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.
I'm ok with such strategy, provided that the new driver builds fine with COMPILE_TEST without the need of the dtsi patch.
Please also notice that, if the driver uses MC, it has to wait for the MC next gen support to be merged, and may need to be rebased, due to a few changes at the MC internal APIs: one function got renamed (the function that create links between two pads) and we're now using lists for links (that will only affect the driver if it has its own graph traversal routines).
Btw, I just got a Samsung TM1 device, with seems to be using an arm64 SoC. Is this driver providing support for its camera?
Regards,
Mauro.
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
Hi Mauro,
Quoted 2 lines · Mauro Carvalho Chehab
Btw, I just got a Samsung TM1 device, with seems to be using an arm64 SoC. Is this driver providing support for its camera?
The TM1 device (Z3) is based on a Qualcomm 64-bit SoC. The $subject patch adds support for a standalone JPEG codec IP block of Samsung Exynos5433 SoC, which can be found for instance in Galaxy Note4. Perhaps someone else can provide more details regarding the TM1's camera status.
Signature · 2 lines
Regards, Sylwester
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
In reply to Mauro Carvalho ChehabHi Mauro,
W dniu 21.09.2015 o 13:41, Mauro Carvalho Chehab pisze:
<snip>
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
I think the media subsystem can take patches 1-3 and whoever does DT patches can take this patch, right?
Quoted 9 lines
Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.I'm ok with such strategy, provided that the new driver builds fine with
COMPILE_TESTwithout the need of the dtsi patch.
I've checked. It does compile with COMPILE_TEST.
Quoted 2 lines
Please also notice that, if the driver uses MC, it has to wait for the MC next gen support to be merged,
No, it does not. It is a rather simple mem2mem device.
Sylwester has answered about camera support which is a different topic.
Andrzej
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
In reply to Andrzej PietrasiewiczW dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
Quoted 27 lines
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 17 lines · Andrzej Pietrasiewicz
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 12 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Quoted 6 lines
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can
take this patch, right?
Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.
Although Kukjin picked Exynos 5433 ARM64 patches but they were not accepted upstream by arm-soc. He rolled it for few releases but:
1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
2. Kukjin did not rebase the branch for 4.4... which maybe means that he wants to drop it?
3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based on sources on opensource.samsung.com. The DTS there is for 32-bit but it can be probably easily adjusted for ARM64.
All of this means that Device Tree support for this driver can't be merged now and effort for mainlining 5433 may be unfortunately wasted...
Best regards,
Krzysztof
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
Hi,
Quoted 43 lines · Krzysztof Kozlowski
W dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
Quoted 27 lines
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 17 lines · Andrzej Pietrasiewicz
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 12 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Quoted 6 lines
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can
take this patch, right?Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.Although Kukjin picked Exynos 5433 ARM64 patches but they were not accepted upstream by arm-soc. He rolled it for few releases but:
1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
2. Kukjin did not rebase the branch for 4.4... which maybe means that he wants to drop it?
3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based on sources on opensource.samsung.com. The DTS there is for 32-bit but it can be probably easily adjusted for ARM64.
Quoted 2 lines
All of this means that Device Tree support for this driver can't be merged now and effort for mainlining 5433 may be unfortunately wasted...
Exynos5433 support is being incrementally merged (clocks, drm, phy, pinctrl, thermal and tty support is already in upstream or -next).
I don't know why DTS changes got stuck in Kukjin's tree (Kukjin, could you please explain?) but I think that this shouldn't not stop us from continuing Exynos5433 upstreaming effort.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
W dniu 28.09.2015 o 20:54, Bartlomiej Zolnierkiewicz pisze:
Quoted 50 lines
Hi,
Quoted 43 lines · Krzysztof Kozlowski
W dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
Quoted 27 lines
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 17 lines · Andrzej Pietrasiewicz
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 12 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Quoted 6 lines
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can
take this patch, right?Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.Although Kukjin picked Exynos 5433 ARM64 patches but they were not accepted upstream by arm-soc. He rolled it for few releases but:
1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
2. Kukjin did not rebase the branch for 4.4... which maybe means that he wants to drop it?
3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based on sources on opensource.samsung.com. The DTS there is for 32-bit but it can be probably easily adjusted for ARM64.Quoted 2 lines
All of this means that Device Tree support for this driver can't be merged now and effort for mainlining 5433 may be unfortunately wasted...
Quoted 6 lines
Exynos5433 support is being incrementally merged (clocks, drm, phy, pinctrl, thermal and tty support is already in upstream or -next).
I don't know why DTS changes got stuck in Kukjin's tree (Kukjin, could you please explain?) but I think that this shouldn't not stop us from continuing Exynos5433 upstreaming effort.
I already explained. There is no DTS, so the pull request was rejected (pull request for v4.0 I believe).
It was not about adding drivers for 5433's clocks/phy/pinctrl etc. It was about DTS.
Best regards,
Krzysztof
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
Quoted 53 lines · Krzysztof Kozlowski
W dniu 28.09.2015 o 20:54, Bartlomiej Zolnierkiewicz pisze:
Quoted 52 lines
Hi,
Quoted 42 lines · Krzysztof Kozlowski
W dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
Quoted 26 lines
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 17 lines · Andrzej Pietrasiewicz
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 12 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Quoted 5 lines
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can
take this patch, right?Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.Although Kukjin picked Exynos 5433 ARM64 patches but they were not accepted upstream by arm-soc. He rolled it for few releases but:
1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
2. Kukjin did not rebase the branch for 4.4... which maybe means that he wants to drop it?
3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based on sources on opensource.samsung.com. The DTS there is for 32-bit but it can be probably easily adjusted for ARM64.Quoted 2 lines
All of this means that Device Tree support for this driver can't be merged now and effort for mainlining 5433 may be unfortunately wasted...
Exynos5433 support is being incrementally merged (clocks, drm, phy, pinctrl, thermal and tty support is already in upstream or -next).
Quoted 7 lines
Quoted 3 lines
I don't know why DTS changes got stuck in Kukjin's tree (Kukjin, could you please explain?) but I think that this shouldn't not stop us from continuing Exynos5433 upstreaming effort.
I already explained. There is no DTS, so the pull request was rejected (pull request for v4.0 I believe).
+ Chanwoo Choi
Yes right, as Krzysztof commented, the pull-request has been rejected by arm-soc even I explained it has been tested on smdk5433, because it will not be compiled without relevant board DT file. And I've rebased when new -rc1 released until 4.3...because Chanwoo said at that time that regarding DT file will be submitted but not yet...
To be honest, I'm not sure I can keep the exynos5433 changes for v4.4 in my tree at this moment...
Quoted 2 lines
It was not about adding drivers for 5433's clocks/phy/pinctrl etc. It was about DTS.
Could be...hmm...
Thanks,
Kukjin
PATCH 4/4 ARM64: dts: exynos5433: add jpeg node
Dear Kukjin,
Quoted 63 lines · Kukjin Kim
Quoted 53 lines · Krzysztof Kozlowski
W dniu 28.09.2015 o 20:54, Bartlomiej Zolnierkiewicz pisze:
Quoted 52 lines
Hi,
Quoted 42 lines · Krzysztof Kozlowski
W dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
Quoted 26 lines
Hi Hans,
W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
Quoted 17 lines · Andrzej Pietrasiewicz
arch/arm64/boot/dts/exynos/exynos5433.dtsi
Quoted 12 lines
From: Marek Szyprowski <[email protected]>
Add Exynos 5433 jpeg h/w codec node.
Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Andrzej Pietrasiewicz <[email protected]>--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/exynos/exynos5433.dtsi +0
-0This dtsi file doesn't exist in the media-git tree. What is the story here?
Quoted 5 lines
Should this go through a different subsystem?
I think the media subsystem can take patches 1-3 and whoever does DT patches can
take this patch, right?Quoted 5 lines
The cover letter explains that the series is rebased onto Mauro's master with Kukjin's branch merged. The latter does contain the
exynos5433.dtsi. That said, yes, taking patches 1-3 in media subsystem and leaving DT patch to someone else is the way to go.Although Kukjin picked Exynos 5433 ARM64 patches but they were not accepted upstream by arm-soc. He rolled it for few releases but:
1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
2. Kukjin did not rebase the branch for 4.4... which maybe means that he wants to drop it?
3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based on sources on opensource.samsung.com. The DTS there is for 32-bit but it can be probably easily adjusted for ARM64.Quoted 2 lines
All of this means that Device Tree support for this driver can't be merged now and effort for mainlining 5433 may be unfortunately wasted...
Exynos5433 support is being incrementally merged (clocks, drm, phy, pinctrl, thermal and tty support is already in upstream or -next).
Quoted 7 lines
Quoted 3 lines
I don't know why DTS changes got stuck in Kukjin's tree (Kukjin, could you please explain?) but I think that this shouldn't not stop us from continuing Exynos5433 upstreaming effort.
I already explained. There is no DTS, so the pull request was rejected (pull request for v4.0 I believe).
+ Chanwoo Choi
Quoted 8 lines
Yes right, as Krzysztof commented, the pull-request has been rejected by arm-soc even I explained it has been tested on smdk5433, because it will not be compiled without relevant board DT file. And I've rebased when new -rc1 released until 4.3...because Chanwoo said at that time that regarding DT file will be submitted but not yet...
To be honest, I'm not sure I can keep the exynos5433 changes for v4.4 in my tree at this moment...
Thanks for your handling the exynos5433 patches on your tree.
But, I might not send the board DTS file for Exynos5433 SoC right now. If I send the board DTS patches in the future, I'll send both board dts patches and Exynos5433 SoC patches again.
Best Regards,
Chanwoo Choi