[PATCH 2/2] vivid: Set color_enc on HSV formats

2016-11-15 Thread Ricardo Ribalda Delgado
HSV formats were missing the color encoding, which leads to an invalid ycbcr_enc value during get_fmt and try_fmt. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/platform/vivid/vivid-vid-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/d

[PATCH 2/2] vivid: Set color_enc on HSV formats

2016-11-15 Thread Ricardo Ribalda Delgado
HSV formats were missing the color encoding, which leads to an invalid ycbcr_enc value during get_fmt and try_fmt. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/platform/vivid/vivid-vid-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/vivid/vivid

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-10-20 Thread Ricardo Ribalda Delgado
Ping? On Wed, Sep 21, 2016 at 10:26 AM, Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> wrote: > Hi > >>> >>> Unsinged long is more than enough for s3an. I think v7 is ok. >> >> Then, why did you change the spi_nor_s3an_addr_convert() prototype?

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-10-20 Thread Ricardo Ribalda Delgado
Ping? On Wed, Sep 21, 2016 at 10:26 AM, Ricardo Ribalda Delgado wrote: > Hi > >>> >>> Unsinged long is more than enough for s3an. I think v7 is ok. >> >> Then, why did you change the spi_nor_s3an_addr_convert() prototype? >> > > Because it is u

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
Hi >> >> Unsinged long is more than enough for s3an. I think v7 is ok. > > Then, why did you change the spi_nor_s3an_addr_convert() prototype? > Because it is used in spi_nor_read and spi_nor_write, which use loff_t. I think it is more clean to have only one comment explaining the max size of

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
Hi >> >> Unsinged long is more than enough for s3an. I think v7 is ok. > > Then, why did you change the spi_nor_s3an_addr_convert() prototype? > Because it is used in spi_nor_read and spi_nor_write, which use loff_t. I think it is more clean to have only one comment explaining the max size of

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
Hi Boris On Wed, Sep 21, 2016 at 10:14 AM, Boris Brezillon wrote: > Wait. If you really want to manipulate an loff_t variable, you can do > > offset = do_div(addr, nor->page_size); > > > that leads to: CC drivers/mtd/spi-nor/spi-nor.o

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
Hi Boris On Wed, Sep 21, 2016 at 10:14 AM, Boris Brezillon wrote: > Wait. If you really want to manipulate an loff_t variable, you can do > > offset = do_div(addr, nor->page_size); > > > that leads to: CC drivers/mtd/spi-nor/spi-nor.o drivers/mtd/spi-nor/spi-nor.c: In function

[PATCH v7] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
(default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Reviewed-by: Cyrille Pitchen <cyrille.pitc...@atmel.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- v7: Suggested by: Boris Brezillon <boris.brezil...@fre

[PATCH v7] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
(default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Reviewed-by: Cyrille Pitchen Signed-off-by: Ricardo Ribalda Delgado --- v7: Suggested by: Boris Brezillon -Change types of s3an_addr_convert -Use modulus by nor->page_size v6: Suggested by: Bo

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
On Tue, 20 Sep 2016 17:45:51 +0200 > Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> wrote: >> /* >> + * This code converts an address to the Default Address Mode, that has non >> + * power of two page sizes. We must support this mode because it is the >> default &

Re: [PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-21 Thread Ricardo Ribalda Delgado
Hi Boris On Wed, Sep 21, 2016 at 9:07 AM, Boris Brezillon wrote: > Hi Ricardo, > > Please try to pass the version in your subject prefix (pass > --subject-prefix="PATCH vX" to git format-patch). > Sorry about that. > On Tue, 20 Sep 2016 17:45:51 +0200 >

Re: [PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-20 Thread Ricardo Ribalda Delgado
Hi Boris On Tue, Sep 20, 2016 at 6:25 PM, Boris Brezillon wrote: >> while (len) { >> - ret = nor->read(nor, from, len, buf); >> + loff_t addr = from; >> + >> + if (nor->flags & SNOR_F_S3AN_ADDR_DEFAULT) >> +

Re: [PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-20 Thread Ricardo Ribalda Delgado
Hi Boris On Tue, Sep 20, 2016 at 6:25 PM, Boris Brezillon wrote: >> while (len) { >> - ret = nor->read(nor, from, len, buf); >> + loff_t addr = from; >> + >> + if (nor->flags & SNOR_F_S3AN_ADDR_DEFAULT) >> + addr =

[PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-20 Thread Ricardo Ribalda Delgado
(default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Reviewed-by: Cyrille Pitchen <cyrille.pitc...@atmel.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- v6: Suggested by: Boris Brezillon <boris.brezil...@fre

[PATCH] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-20 Thread Ricardo Ribalda Delgado
(default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Reviewed-by: Cyrille Pitchen Signed-off-by: Ricardo Ribalda Delgado --- v6: Suggested by: Boris Brezillon -Replace triple operator with if/else v5: -Rebase on top of l2-mtd/master Suggested

Re: [PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-20 Thread Ricardo Ribalda Delgado
Hi Boris Thanks for your review. On Tue, Sep 20, 2016 at 1:21 PM, Boris Brezillon wrote: >> int sr, fsr; >> - sr = spi_nor_sr_ready(nor); >> + >> + sr = nor->flags & SNOR_F_READY_XSR_RDY ? s3an_sr_ready(nor) : >> +

Re: [PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-20 Thread Ricardo Ribalda Delgado
Hi Boris Thanks for your review. On Tue, Sep 20, 2016 at 1:21 PM, Boris Brezillon wrote: >> int sr, fsr; >> - sr = spi_nor_sr_ready(nor); >> + >> + sr = nor->flags & SNOR_F_READY_XSR_RDY ? s3an_sr_ready(nor) : >> +

[PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-16 Thread Ricardo Ribalda Delgado
(default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- v5: -Rebase on top of l2-mtd/master Suggested by: Cyrille Pitchen <cyrille.pitc...@atmel.com>: -Fix to+1 bug -Move

[PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-16 Thread Ricardo Ribalda Delgado
(default addressing mode). - The spi nor commands used. Protocol is described on Xilinx User Guide UG333 Signed-off-by: Ricardo Ribalda Delgado --- v5: -Rebase on top of l2-mtd/master Suggested by: Cyrille Pitchen : -Fix to+1 bug -Move all address conversions to spi-nor -Replace pr_dev with dev_err v4

Re: [PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-16 Thread Ricardo Ribalda Delgado
Hi Cyrille Thanks for your comments. I am sending v5 with all of them (hopefully) fixed. On Fri, Sep 16, 2016 at 6:33 PM, Cyrille Pitchen wrote: >> + else { >> + uint64_t aux = to; > what about i ? do_div explicitly requires uint64_t on

Re: [PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-16 Thread Ricardo Ribalda Delgado
Hi Cyrille Thanks for your comments. I am sending v5 with all of them (hopefully) fixed. On Fri, Sep 16, 2016 at 6:33 PM, Cyrille Pitchen wrote: >> + else { >> + uint64_t aux = to; > what about i ? do_div explicitly requires uint64_t on some arches, I got some

Re: [PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-16 Thread Ricardo Ribalda Delgado
This is the monthly ping :) Anything I can do help to merge this? Regards! On Wed, Aug 10, 2016 at 11:12 AM, Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> wrote: > ping? > > On Thu, Jul 14, 2016 at 10:18 PM, Ricardo Ribalda Delgado > <ricardo.riba...@gmail.com>

Re: [PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-09-16 Thread Ricardo Ribalda Delgado
This is the monthly ping :) Anything I can do help to merge this? Regards! On Wed, Aug 10, 2016 at 11:12 AM, Ricardo Ribalda Delgado wrote: > ping? > > On Thu, Jul 14, 2016 at 10:18 PM, Ricardo Ribalda Delgado > wrote: >> Xilinx Spartan-3AN FPGAs contain an In-System Fla

Re: [PATCH 7/7] serial: 8250_fintek: Add F81865 Support

2016-09-01 Thread Ricardo Ribalda Delgado
Hi Peter On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > > switch (pdata->pid) { > + case CHIP_ID_F81865: > case CHIP_ID_F81866: > - sio_write_mask_reg(pdata, F81866_FIFO_CTRL, F81866_IRQ_MODE1, > -

Re: [PATCH 7/7] serial: 8250_fintek: Add F81865 Support

2016-09-01 Thread Ricardo Ribalda Delgado
Hi Peter On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > > switch (pdata->pid) { > + case CHIP_ID_F81865: > case CHIP_ID_F81866: > - sio_write_mask_reg(pdata, F81866_FIFO_CTRL, F81866_IRQ_MODE1, > - 0); > +

Re: [PATCH 5/7] serial: 8250_fintek: Add F81216 Support

2016-09-01 Thread Ricardo Ribalda Delgado
Hi Peter On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > int fintek_8250_probe(struct uart_8250_port *uart) > { > struct fintek_8250 *pdata; > @@ -248,8 +270,8 @@ int fintek_8250_probe(struct uart_8250_port *uart) > return -ENOMEM; >

Re: [PATCH 5/7] serial: 8250_fintek: Add F81216 Support

2016-09-01 Thread Ricardo Ribalda Delgado
Hi Peter On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > int fintek_8250_probe(struct uart_8250_port *uart) > { > struct fintek_8250 *pdata; > @@ -248,8 +270,8 @@ int fintek_8250_probe(struct uart_8250_port *uart) > return -ENOMEM; > >

Re: [PATCH 4/7] serial: 8250_fintek: Rearrange function

2016-09-01 Thread Ricardo Ribalda Delgado
On one previous patch you almost rewrote theset_irq_mode function and added the prototype. It might be a good moment to move the whole function up. On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > We change the position of fintek_8250_set_irq_mode() above the >

Re: [PATCH 4/7] serial: 8250_fintek: Rearrange function

2016-09-01 Thread Ricardo Ribalda Delgado
On one previous patch you almost rewrote theset_irq_mode function and added the prototype. It might be a good moment to move the whole function up. On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > We change the position of fintek_8250_set_irq_mode() above the > find_base_port()

Re: [PATCH 3/7] serial: 8250_fintek: Set maximum FIFO of F81216H

2016-09-01 Thread Ricardo Ribalda Delgado
Hi Peter On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > +static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata) > +{ > + switch (pdata->pid) { > + default: /* Default 16Bytes FIFO */ > + return; > + > + case

Re: [PATCH 3/7] serial: 8250_fintek: Set maximum FIFO of F81216H

2016-09-01 Thread Ricardo Ribalda Delgado
Hi Peter On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong) wrote: > +static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata) > +{ > + switch (pdata->pid) { > + default: /* Default 16Bytes FIFO */ > + return; > + > + case CHIP_ID_F81216H: /* 128Bytes

[PATCH v5_2 10/12] [media] videodev2.h Add HSV encoding

2016-08-22 Thread Ricardo Ribalda Delgado
Some hardware maps the Hue between 0 and 255 instead of 0-179. Support this format with a new field hsv_enc. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- v5_2: s/s_rgb_or_yuv/s_rgb_or_hsv/ Thanks Hans!! include/uapi/linux/videodev2.

[PATCH v5_2 10/12] [media] videodev2.h Add HSV encoding

2016-08-22 Thread Ricardo Ribalda Delgado
Some hardware maps the Hue between 0 and 255 instead of 0-179. Support this format with a new field hsv_enc. Signed-off-by: Ricardo Ribalda Delgado --- v5_2: s/s_rgb_or_yuv/s_rgb_or_hsv/ Thanks Hans!! include/uapi/linux/videodev2.h | 32 +++- 1 file changed, 27

Re: [PATCH v5 10/12] [media] videodev2.h Add HSV encoding

2016-08-22 Thread Ricardo Ribalda Delgado
Hello Hans: > > That should be is_rgb_or_hsv. Sorry about that! I am resending v5_2 with only that patch fixed > > All other patches look OK. Thanks > > It would be useful though if you could rebase on top of > https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=sycc. > I have a pull

Re: [PATCH v5 10/12] [media] videodev2.h Add HSV encoding

2016-08-22 Thread Ricardo Ribalda Delgado
Hello Hans: > > That should be is_rgb_or_hsv. Sorry about that! I am resending v5_2 with only that patch fixed > > All other patches look OK. Thanks > > It would be useful though if you could rebase on top of > https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=sycc. > I have a pull

[PATCH v5 09/12] [media] vivid: Local optimization

2016-08-19 Thread Ricardo Ribalda Delgado
Avoid duplicated clamps when possible. Suggested-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-)

[PATCH v5 09/12] [media] vivid: Local optimization

2016-08-19 Thread Ricardo Ribalda Delgado
Avoid duplicated clamps when possible. Suggested-by: Philipp Zabel Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b

[PATCH v5 12/12] [media] vivid: Add support for HSV encoding

2016-08-18 Thread Ricardo Ribalda Delgado
Support HSV encoding. Most of the logic is replicated from ycbcr_enc. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 25 + drivers/media/platform/vivid/vivid-core.h | 1 + drivers

[PATCH v5 12/12] [media] vivid: Add support for HSV encoding

2016-08-18 Thread Ricardo Ribalda Delgado
Support HSV encoding. Most of the logic is replicated from ycbcr_enc. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 25 + drivers/media/platform/vivid/vivid-core.h | 1 + drivers/media/platform/vivid/vivid-ctrls.c

[PATCH v5 06/12] [media] vivid: Rename variable

2016-08-18 Thread Ricardo Ribalda Delgado
r_y and g_u now also contain the H and V components on the HSV formats. Rename the variables to reflect this. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 209 +- 1 file changed, 105 inse

[PATCH v5 06/12] [media] vivid: Rename variable

2016-08-18 Thread Ricardo Ribalda Delgado
r_y and g_u now also contain the H and V components on the HSV formats. Rename the variables to reflect this. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 209 +- 1 file changed, 105 insertions(+), 104 deletions(-) diff

[PATCH v5 00/12] Add HSV format

2016-08-18 Thread Ricardo Ribalda Delgado
file Thanks! Suggested by Hans Verkuil <hverk...@xs4all.nl> -Rebase over master and docs-next -Introduce TPG_COLOR_ENC_LUMA for gray formats -CodeStyle Thanks! v2: Suggested by Mauro Carvalho Chehab <mche...@osg.samsung.com>, -Rebase on top of docs-next (port documentation to .rst) Ricardo R

[PATCH v5 00/12] Add HSV format

2016-08-18 Thread Ricardo Ribalda Delgado
op of docs-next (port documentation to .rst) Ricardo Ribalda Delgado (12): [media] videodev2.h Add HSV formats [media] Documentation: Add HSV format [media] Documentation: Add Ricardo Ribalda [media] vivid: Code refactor for color encoding [media] vivid: Add support for HSV formats [me

[PATCH v5 11/12] [media] Documentation: Add HSV encodings

2016-08-18 Thread Ricardo Ribalda Delgado
Describe the hsv_enc field and its use. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- Documentation/media/uapi/v4l/pixfmt-002.rst| 12 ++- Documentation/media/uapi/v4l/pixfmt-003.rst| 14 ++-- Documentation/media/uapi/v4l/pixfmt-0

[PATCH v5 11/12] [media] Documentation: Add HSV encodings

2016-08-18 Thread Ricardo Ribalda Delgado
Describe the hsv_enc field and its use. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/pixfmt-002.rst| 12 ++- Documentation/media/uapi/v4l/pixfmt-003.rst| 14 ++-- Documentation/media/uapi/v4l/pixfmt-006.rst| 41

[PATCH v5 02/12] [media] Documentation: Add HSV format

2016-08-18 Thread Ricardo Ribalda Delgado
Describe the HSV formats Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- Documentation/media/uapi/v4l/hsv-formats.rst | 19 +++ Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst | 158 + Documentation/media/uapi/v4l/pixfmt.rst

[PATCH v5 02/12] [media] Documentation: Add HSV format

2016-08-18 Thread Ricardo Ribalda Delgado
Describe the HSV formats Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/hsv-formats.rst | 19 +++ Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst | 158 + Documentation/media/uapi/v4l/pixfmt.rst| 1 + Documentation/media/uapi

Re: [PATCH] serial: 8250_fintek: Fix potential NULL pointer dereference

2016-08-18 Thread Ricardo Ribalda Delgado
y detecting IRQ mode when fintek chip found. > > Suggested-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> > Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> > --- > drivers/tty/serial/8250/8250_fintek.c | 13 +++-- > 1 file changed,

Re: [PATCH] serial: 8250_fintek: Fix potential NULL pointer dereference

2016-08-18 Thread Ricardo Ribalda Delgado
> struct irq_data *irq_data = irq_get_irq_data(uart->port.irq); > bool level_mode = irqd_is_level_type(irq_data); > > But *irq_data had not any check and pass to irqd_is_level_type(), > it may lead to potential NULL pointer dereference. > > Also modify detecting IRQ mode when

[PATCH v5 03/12] [media] Documentation: Add Ricardo Ribalda

2016-08-18 Thread Ricardo Ribalda Delgado
My initials were on the Changelog, but there was no link to my name. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- Documentation/media/uapi/v4l/v4l2.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/media/uapi/v4l/v4l2.rst b/Documentation

[PATCH v5 03/12] [media] Documentation: Add Ricardo Ribalda

2016-08-18 Thread Ricardo Ribalda Delgado
My initials were on the Changelog, but there was no link to my name. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/v4l2.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/media/uapi/v4l/v4l2.rst b/Documentation/media/uapi/v4l/v4l2.rst index

[PATCH v5 08/12] [media] vivid: Fix YUV555 and YUV565 handling

2016-08-18 Thread Ricardo Ribalda Delgado
precalculate_color() had a optimization that avoided duplicated conversion for YUV formats. This optimization did not take into consideration YUV444, YUV555, YUV565 or limited range quantization. This patch keeps the optimization, but fixes the wrong handling. Signed-off-by: Ricardo Ribalda

[PATCH v5 10/12] [media] videodev2.h Add HSV encoding

2016-08-18 Thread Ricardo Ribalda Delgado
Some hardware maps the Hue between 0 and 255 instead of 0-179. Support this format with a new field hsv_enc. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- include/uapi/linux/videodev2.h | 32 +++- 1 file changed, 27 insertions(+), 5 del

[PATCH v5 08/12] [media] vivid: Fix YUV555 and YUV565 handling

2016-08-18 Thread Ricardo Ribalda Delgado
precalculate_color() had a optimization that avoided duplicated conversion for YUV formats. This optimization did not take into consideration YUV444, YUV555, YUV565 or limited range quantization. This patch keeps the optimization, but fixes the wrong handling. Signed-off-by: Ricardo Ribalda

[PATCH v5 10/12] [media] videodev2.h Add HSV encoding

2016-08-18 Thread Ricardo Ribalda Delgado
Some hardware maps the Hue between 0 and 255 instead of 0-179. Support this format with a new field hsv_enc. Signed-off-by: Ricardo Ribalda Delgado --- include/uapi/linux/videodev2.h | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/include

[PATCH v5 05/12] [media] vivid: Add support for HSV formats

2016-08-18 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_HSV24 and V4L2_PIX_FMT_HSV32. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 93 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 14 include

[PATCH v5 07/12] [media] vivid: Introduce TPG_COLOR_ENC_LUMA

2016-08-18 Thread Ricardo Ribalda Delgado
Simplifies handling of Gray formats. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 26 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 6 +++--- include/media/v4l2

[PATCH v5 05/12] [media] vivid: Add support for HSV formats

2016-08-18 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_HSV24 and V4L2_PIX_FMT_HSV32. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 93 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 14 include/media/v4l2-tpg.h

[PATCH v5 07/12] [media] vivid: Introduce TPG_COLOR_ENC_LUMA

2016-08-18 Thread Ricardo Ribalda Delgado
Simplifies handling of Gray formats. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 26 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 6 +++--- include/media/v4l2-tpg.h| 1 + 3 files changed

[PATCH v5 04/12] [media] vivid: Code refactor for color encoding

2016-08-18 Thread Ricardo Ribalda Delgado
Replace is_yuv with color_enc Which can be used by other color encodings such us HSV. This change should ease the review of the following patches. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c

[PATCH v5 04/12] [media] vivid: Code refactor for color encoding

2016-08-18 Thread Ricardo Ribalda Delgado
Replace is_yuv with color_enc Which can be used by other color encodings such us HSV. This change should ease the review of the following patches. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 49 +++ drivers/media/platform

[PATCH v5 01/12] [media] videodev2.h Add HSV formats

2016-08-18 Thread Ricardo Ribalda Delgado
. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v5 01/12] [media] videodev2.h Add HSV formats

2016-08-18 Thread Ricardo Ribalda Delgado
. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 51a0fa144392..16b211f7212b 100644

[PATCH] Documentation: rs485: Do not define manually the ioctl

2016-08-18 Thread Ricardo Ribalda Delgado
It is not a very good practice to define the IOCTL manually instead of using the header file. Fix it on the documentation example. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- Documentation/serial/serial-rs485.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 del

[PATCH] Documentation: rs485: Do not define manually the ioctl

2016-08-18 Thread Ricardo Ribalda Delgado
It is not a very good practice to define the IOCTL manually instead of using the header file. Fix it on the documentation example. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/serial/serial-rs485.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-08-10 Thread Ricardo Ribalda Delgado
ping? On Thu, Jul 14, 2016 at 10:18 PM, Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> wrote: > Xilinx Spartan-3AN FPGAs contain an In-System Flash where they keep > their configuration data and (optionally) some user data. > > The protocol of this flash follows most of th

Re: [PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-08-10 Thread Ricardo Ribalda Delgado
ping? On Thu, Jul 14, 2016 at 10:18 PM, Ricardo Ribalda Delgado wrote: > Xilinx Spartan-3AN FPGAs contain an In-System Flash where they keep > their configuration data and (optionally) some user data. > > The protocol of this flash follows most of the spi-nor standard. With >

Re: [PATCH 0658/1285] Replace numeric parameter like 0444 with macro

2016-08-03 Thread Ricardo Ribalda Delgado
Hi On Tue, Aug 2, 2016 at 1:34 PM, Baole Ni wrote: > thus, I suggest replacing the numeric parameter with the macro. For what my opinion is worth it... I found more comprehensive the octal values than the macros, but maybe it is because I am old and dream in hexadecimal

Re: [PATCH 0658/1285] Replace numeric parameter like 0444 with macro

2016-08-03 Thread Ricardo Ribalda Delgado
Hi On Tue, Aug 2, 2016 at 1:34 PM, Baole Ni wrote: > thus, I suggest replacing the numeric parameter with the macro. For what my opinion is worth it... I found more comprehensive the octal values than the macros, but maybe it is because I am old and dream in hexadecimal I do not know if

[PATCH v2] [media] Documentation: Fix V4L2_CTRL_FLAG_VOLATILE

2016-07-22 Thread Ricardo Ribalda Delgado
-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- v2: By Hans Verkuil <hansv...@cisco.com> -Fix some syntax errors By Mauro Carvalho Chehab <mche...@kernel.org> -Add hyperlinks Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 11 +++ 1 file changed, 7 insertions(

[PATCH v2] [media] Documentation: Fix V4L2_CTRL_FLAG_VOLATILE

2016-07-22 Thread Ricardo Ribalda Delgado
V4L2_CTRL_FLAG_VOLATILE behaviour when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE is set was not properly explained. Also set some hyperlink to ease the Documentation browsing. Reported-by: Dimitrios Katsaros Credit-to: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado --- v2: By Hans Verkuil -Fix

[PATCH] [media] Documentation: Fix V4L2_CTRL_FLAG_VOLATILE

2016-07-22 Thread Ricardo Ribalda Delgado
V4L2_CTRL_FLAG_VOLATILE behaviour when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE is set was not properly explained. Reported-by: Dimitrios Katsaros <patcherw...@gmail.com> Credit-to: Hans Verkuil <hansv...@cisco.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com>

[PATCH] [media] Documentation: Fix V4L2_CTRL_FLAG_VOLATILE

2016-07-22 Thread Ricardo Ribalda Delgado
V4L2_CTRL_FLAG_VOLATILE behaviour when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE is set was not properly explained. Reported-by: Dimitrios Katsaros Credit-to: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 8 1 file changed, 4

Re: [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev

2016-07-18 Thread Ricardo Ribalda Delgado
Hi Stephen It is anything that am I missing? Can I help you somehow? Regards! On Tue, Jul 5, 2016 at 6:23 PM, Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> wrote: > Clock providers can be probed as a normal platform device, or via > of_clk_init() before the rest of the plat

Re: [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev

2016-07-18 Thread Ricardo Ribalda Delgado
Hi Stephen It is anything that am I missing? Can I help you somehow? Regards! On Tue, Jul 5, 2016 at 6:23 PM, Ricardo Ribalda Delgado wrote: > Clock providers can be probed as a normal platform device, or via > of_clk_init() before the rest of the platform devices are initialized &

Re: [PATCH v4 09/12] [media] vivid: Local optimization

2016-07-18 Thread Ricardo Ribalda Delgado
Hi Philipp: On Mon, Jul 18, 2016 at 4:16 PM, Philipp Zabel wrote: > I had the best looking result with this variant, btw: > > y >>= 4; > cb >>= 4; > cr >>= 4; > if (tpg->real_quantization == V4L2_QUANTIZATION_LIM_RANGE) { >

Re: [PATCH v4 09/12] [media] vivid: Local optimization

2016-07-18 Thread Ricardo Ribalda Delgado
Hi Philipp: On Mon, Jul 18, 2016 at 4:16 PM, Philipp Zabel wrote: > I had the best looking result with this variant, btw: > > y >>= 4; > cb >>= 4; > cr >>= 4; > if (tpg->real_quantization == V4L2_QUANTIZATION_LIM_RANGE) { > y = clamp(y, 16, 235);

Re: [PATCH v4 09/12] [media] vivid: Local optimization

2016-07-18 Thread Ricardo Ribalda Delgado
Hi Philipp On Mon, Jul 18, 2016 at 3:13 PM, Philipp Zabel wrote: > Since the constant expressions are evaluated at compile time, you are > not actually removing shifts. The code generated for precalculate_color > by gcc 5.4 even grows by one asr instruction with this

Re: [PATCH v4 09/12] [media] vivid: Local optimization

2016-07-18 Thread Ricardo Ribalda Delgado
Hi Philipp On Mon, Jul 18, 2016 at 3:13 PM, Philipp Zabel wrote: > Since the constant expressions are evaluated at compile time, you are > not actually removing shifts. The code generated for precalculate_color > by gcc 5.4 even grows by one asr instruction with this patch. > I dont think that

[PATCH v4 04/12] [media] vivid: Code refactor for color encoding

2016-07-18 Thread Ricardo Ribalda Delgado
Replace is_yuv with color_enc Which can be used by other color encodings such us HSV. This change should ease the review of the following patches. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c

[PATCH v4 04/12] [media] vivid: Code refactor for color encoding

2016-07-18 Thread Ricardo Ribalda Delgado
Replace is_yuv with color_enc Which can be used by other color encodings such us HSV. This change should ease the review of the following patches. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 49 +++ drivers/media/platform

[PATCH v4 01/12] [media] videodev2.h Add HSV formats

2016-07-18 Thread Ricardo Ribalda Delgado
. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v4 01/12] [media] videodev2.h Add HSV formats

2016-07-18 Thread Ricardo Ribalda Delgado
. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index f899bf1c5fc0..54670cd59212 100644

[PATCH v4 05/12] [media] vivid: Add support for HSV formats

2016-07-18 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_HSV24 and V4L2_PIX_FMT_HSV32. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 93 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 14 include

[PATCH v4 05/12] [media] vivid: Add support for HSV formats

2016-07-18 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_HSV24 and V4L2_PIX_FMT_HSV32. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 93 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 14 include/media/v4l2-tpg.h

[PATCH v4 02/12] [media] Documentation: Add HSV format

2016-07-18 Thread Ricardo Ribalda Delgado
Describe the HSV formats Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- Documentation/media/uapi/v4l/hsv-formats.rst | 19 +++ Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst | 158 + Documentation/media/uapi/v4l/pixfmt.rst

[PATCH v4 02/12] [media] Documentation: Add HSV format

2016-07-18 Thread Ricardo Ribalda Delgado
Describe the HSV formats Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/hsv-formats.rst | 19 +++ Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst | 158 + Documentation/media/uapi/v4l/pixfmt.rst| 1 + Documentation/media/uapi

[PATCH v4 08/12] [media] vivid: Fix YUV555 and YUV565 handling

2016-07-18 Thread Ricardo Ribalda Delgado
precalculate_color() had a optimization that avoided duplicated conversion for YUV formats. This optimization did not take into consideration YUV444, YUV555, YUV565 or limited range quantization. This patch keeps the optimization, but fixes the wrong handling. Signed-off-by: Ricardo Ribalda

[PATCH v4 08/12] [media] vivid: Fix YUV555 and YUV565 handling

2016-07-18 Thread Ricardo Ribalda Delgado
precalculate_color() had a optimization that avoided duplicated conversion for YUV formats. This optimization did not take into consideration YUV444, YUV555, YUV565 or limited range quantization. This patch keeps the optimization, but fixes the wrong handling. Signed-off-by: Ricardo Ribalda

[PATCH v4 06/12] [media] vivid: Rename variable

2016-07-18 Thread Ricardo Ribalda Delgado
r_y and g_u now also contain the H and V components on the HSV formats. Rename the variables to reflect this. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 209 +- 1 file changed, 105 inse

[PATCH v4 06/12] [media] vivid: Rename variable

2016-07-18 Thread Ricardo Ribalda Delgado
r_y and g_u now also contain the H and V components on the HSV formats. Rename the variables to reflect this. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 209 +- 1 file changed, 105 insertions(+), 104 deletions(-) diff

[PATCH v4 11/12] [media] Documentation: Add HSV encodings

2016-07-18 Thread Ricardo Ribalda Delgado
Describe the hsv_enc field and its use. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- Documentation/media/uapi/v4l/pixfmt-002.rst| 12 ++- Documentation/media/uapi/v4l/pixfmt-003.rst| 14 ++-- Documentation/media/uapi/v4l/pixfmt-0

[PATCH v4 09/12] [media] vivid: Local optimization

2016-07-18 Thread Ricardo Ribalda Delgado
Avoid duplicated data shifts when possible. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-cor

[PATCH v4 11/12] [media] Documentation: Add HSV encodings

2016-07-18 Thread Ricardo Ribalda Delgado
Describe the hsv_enc field and its use. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/pixfmt-002.rst| 12 ++- Documentation/media/uapi/v4l/pixfmt-003.rst| 14 ++-- Documentation/media/uapi/v4l/pixfmt-006.rst| 38

[PATCH v4 09/12] [media] vivid: Local optimization

2016-07-18 Thread Ricardo Ribalda Delgado
Avoid duplicated data shifts when possible. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg

[PATCH v4 07/12] [media] vivid: Introduce TPG_COLOR_ENC_LUMA

2016-07-18 Thread Ricardo Ribalda Delgado
Simplifies handling of Gray formats. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 26 +++-- drivers/media/platform/vivid/vivid-vid-common.c | 6 +++--- include/media/v4l2

[PATCH v4 12/12] [media] vivid: Add support for HSV encoding

2016-07-18 Thread Ricardo Ribalda Delgado
Support HSV encoding. Most of the logic is replicated from ycbcr_enc. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 25 + drivers/media/platform/vivid/vivid-core.h | 1 + drivers

[PATCH v4 10/12] [media] videodev2.h Add HSV encoding

2016-07-18 Thread Ricardo Ribalda Delgado
Some hardware maps the Hue between 0 and 255 instead of 0-179. Support this format with a new field hsv_enc. Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- include/uapi/linux/videodev2.h | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-)

[PATCH v4 00/12] Add HSV format

2016-07-18 Thread Ricardo Ribalda Delgado
aster and docs-next -Introduce TPG_COLOR_ENC_LUMA for gray formats -CodeStyle Thanks! v2: Suggested by Mauro Carvalho Chehab <mche...@osg.samsung.com>, -Rebase on top of docs-next (port documentation to .rst) Ricardo Ribalda Delgado (12): [media] videodev2.h Add HSV formats [media] Do

<    2   3   4   5   6   7   8   9   10   11   >