media: staging: rkisp1: bugs fixes and vars renames
Subsystems (3)
v3 cover media: staging: rkisp1: bugs fixes and vars renames
RESEND the patchset because I forgot to add the first two patches to the set (now also dropping CC to stable)
The first two patches in this patchset are two bug fixes related to the enumeration and settings of the sink format of the resizer entity.
The next 3 patches are renaming/removing macros and variables.
patch 6 adds documentation to the struct rkisp1_isp_mbus_info
changes from v2:
- patch 3 is new - remove macro RKISP1_DIR_SINK_SRC since the code is more readable without it.
- patch 5 - rename 'direction' to 'isp_pads_mask' instead of 'isp_pads_flags'
- patch 6 is new - add documentation of the struct 'rkisp1_isp_mbus_info'
changes from v1:
- added "Fixes: 56e3b29f9f6b "media: staging: rkisp1: add streaming paths" to the commit log of the first two patches.
- added two patches. One patch rename the macros "RKISP1_DIR_*" to "RKISP1_ISP_SD_*", another that rename the field 'direction' in 'struct rkisp1_isp_mbus_info' to 'isp_pads_flags'
Dafna Hirschfeld (6):
media: staging: rkisp1: rsz: supported formats are the isp's src
formats, not sink formats
media: staging: rkisp1: rsz: set default format if the given format is
not RKISP1_DIR_SRC
media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC
media: staging: rkisp1: rename macros 'RKISP1_DIR_*' to
'RKISP1_ISP_SD_*'
media: staging: rkisp1: rename the field 'direction' in
'rkisp1_isp_mbus_info' to 'isp_pads_mask'
media: staging: rkisp1: common: add documentation for struct
rkisp1_isp_mbus_info
drivers/staging/media/rkisp1/rkisp1-common.h | 18 ++++++- drivers/staging/media/rkisp1/rkisp1-isp.c | 50 +++++++++---------- drivers/staging/media/rkisp1/rkisp1-resizer.c | 6 +-- 3 files changed, 43 insertions(+), 31 deletions(-)
Signature · 1 line
2.17.1
PATCH RESEND v3 1/6 media: staging: rkisp1: rsz: supported formats are the isp's src formats, not sink formats
The rkisp1_resizer's enum callback 'rkisp1_rsz_enum_mbus_code' calls the enum callback of the 'rkisp1_isp' on it's video sink pad. This is a bug, the resizer should support the same formats supported by the 'rkisp1_isp' on the source pad (not the sink pad).
--- drivers/staging/media/rkisp1/rkisp1-resizer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/rkisp1/rkisp1-resizer.c +2 -2
@@ -437,8 +437,8 @@ static int rkisp1_rsz_enum_mbus_code(struct v4l2_subdev *sd,u32 pad = code->pad;int ret; -/* supported mbus codes are the same in isp sink pad */ - code->pad =RKISP1_ISP_PAD_SINK_VIDEO ; +/* supported mbus codes are the same in isp video src pad */ + code->pad =RKISP1_ISP_PAD_SOURCE_VIDEO ; ret =v4l2_subdev_call (&rsz->rkisp1->isp.sd, pad, enum_mbus_code, &dummy_cfg, code);
Signature · 1 line
2.17.1
PATCH RESEND v3 2/6 media: staging: rkisp1: rsz: set default format if the given format is not RKISP1_DIR_SRC
In reply to Dafna HirschfeldWhen setting the sink format of the 'rkisp1_resizer' the format should be supported by 'rkisp1_isp' on the video source pad. This patch checks this condition and set the format to default if the condition is false.
--- drivers/staging/media/rkisp1/rkisp1-common.h | 4 ++++ drivers/staging/media/rkisp1/rkisp1-isp.c | 4 ---- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/media/rkisp1/rkisp1-common.h +4 -0
@@ -22,6 +22,10 @@#include "rkisp1-regs.h" #include "uapi/rkisp1-config.h" +#define RKISP1_DIR_SRC BIT(0) +#define RKISP1_DIR_SINK BIT(1) +#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC) +#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024#define RKISP1_ISP_MIN_WIDTH 32
drivers/staging/media/rkisp1/rkisp1-isp.c +0 -4
@@ -23,10 +23,6 @@#define RKISP1_ISP_DEV_NAME RKISP1_DRIVER_NAME "_isp" -#define RKISP1_DIR_SRC BIT(0) -#define RKISP1_DIR_SINK BIT(1) -#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC) -/* * NOTE: MIPI controller and input MUX are also configured in this file. * This is because ISP Subdev describes not only ISP submodule (input size,
drivers/staging/media/rkisp1/rkisp1-resizer.c +1 -1
@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info) { +if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
Signature · 1 line
2.17.1
Re: [RESEND PATCH v3 2/6] media: staging: rkisp1: rsz: set default format if the given format is not RKISP1_DIR_SRC
Hi Dafna,
Quoted 35 lines · Dafna Hirschfeld
When setting the sink format of the '
rkisp1_resizer' the format should be supported by 'rkisp1_isp' on the video source pad. This patch checks this condition and set the format to default if the condition is false.Fixes 56e3b29f9f6b "media: staging: rkisp1: add streaming paths"Signed-off-by Dafna Hirschfeld <[email protected]>Reviewed-by Tomasz Figa <[email protected]>--- drivers/staging/media/rkisp1/rkisp1-common.h | 4 ++++ drivers/staging/media/rkisp1/rkisp1-isp.c | 4 ---- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)drivers/staging/media/rkisp1/rkisp1-common.h +4
-0@@ -22,6 +22,10 @@#include "rkisp1-regs.h" #include "uapi/rkisp1-config.h" +#define RKISP1_DIR_SRC BIT(0) +#define RKISP1_DIR_SINK BIT(1) +#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC) +#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024#define RKISP1_ISP_MIN_WIDTH 32drivers/staging/media/rkisp1/rkisp1-isp.c +0
-0
drivers/staging/media/rkisp1/rkisp1-isp.c line 28
Quoted 6 lines
drivers/staging/media/rkisp1/rkisp1-isp.c +0
-3@@ -23,10 +23,6 @@#define RKISP1_ISP_DEV_NAME RKISP1_DRIVER_NAME "_isp" -#define RKISP1_DIR_SRC BIT(0) -#define RKISP1_DIR_SINK BIT(1) -#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC)
As mentioned previously, please, check my comment on first version of the patch https://patchwork.linuxtv.org/patch/64292/
Or please let me know if you don't agree.
Thanks
Helen
Quoted 18 lines
drivers/staging/media/rkisp1/rkisp1-isp.c +0
-1-/* * NOTE: MIPI controller and input MUX are also configured in this file. * This is because ISP Subdev describes not only ISP submodule (input size, drivers/staging/media/rkisp1/rkisp1-resizer.c +1
-1@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info) { +if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
Re: [RESEND PATCH v3 2/6] media: staging: rkisp1: rsz: set default format if the given format is not RKISP1_DIR_SRC
Quoted 39 lines · Helen Koike
Hi Dafna,
Quoted 36 lines · Dafna Hirschfeld
When setting the sink format of the '
rkisp1_resizer' the format should be supported by 'rkisp1_isp' on the video source pad. This patch checks this condition and set the format to default if the condition is false.Fixes 56e3b29f9f6b "media: staging: rkisp1: add streaming paths"Signed-off-by Dafna Hirschfeld <[email protected]>Reviewed-by Tomasz Figa <[email protected]>--- drivers/staging/media/rkisp1/rkisp1-common.h | 4 ++++ drivers/staging/media/rkisp1/rkisp1-isp.c | 4 ---- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)drivers/staging/media/rkisp1/rkisp1-common.h +4
-0@@ -22,6 +22,10 @@#include "rkisp1-regs.h" #include "uapi/rkisp1-config.h" +#define RKISP1_DIR_SRC BIT(0) +#define RKISP1_DIR_SINK BIT(1) +#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC) +#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024#define RKISP1_ISP_MIN_WIDTH 32drivers/staging/media/rkisp1/rkisp1-isp.c +0
-0@@ -23,10 +23,6 @@
Quoted 8 lines
drivers/staging/media/rkisp1/rkisp1-isp.c line 28
Quoted 5 lines
drivers/staging/media/rkisp1/rkisp1-isp.c +0
-3#define RKISP1_ISP_DEV_NAME RKISP1_DRIVER_NAME "_isp" -#define RKISP1_DIR_SRC BIT(0) -#define RKISP1_DIR_SINK BIT(1) -#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC)As mentioned previously, please, check my comment on first version of the patch https://patchwork.linuxtv.org/patch/64292/
Or please let me know if you don't agree.
I just saw you submitted the change in a separated patch.
I would submit patch 4/6 before this one.
Thanks
Helen
Quoted 22 lines
Thanks
HelenQuoted 18 lines
drivers/staging/media/rkisp1/rkisp1-isp.c +0
-1-/* * NOTE: MIPI controller and input MUX are also configured in this file. * This is because ISP Subdev describes not only ISP submodule (input size, drivers/staging/media/rkisp1/rkisp1-resizer.c +1
-1@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info) { +if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
PATCH RESEND v3 3/6 media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC
In reply to Dafna HirschfeldThe macro RKISP1_DIR_SINK_SRC is a mask of two flags.
The macro hides the fact that it's a mask and the code
is actually more clear if we replace it the with bitwise-or explicitly.
--- drivers/staging/media/rkisp1/rkisp1-common.h | 1 - drivers/staging/media/rkisp1/rkisp1-isp.c | 24 ++++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-)
drivers/staging/media/rkisp1/rkisp1-common.h +0 -1
@@ -24,7 +24,6 @@#define RKISP1_DIR_SRC BIT(0)#define RKISP1_DIR_SINK BIT(1) -#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC)#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024
drivers/staging/media/rkisp1/rkisp1-isp.c +12 -12
@@ -65,84 +65,84 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = { .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV,
Signature · 1 line
2.17.1
Re: [RESEND PATCH v3 3/6] media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC
Quoted 5 lines · Dafna Hirschfeld
The macro
RKISP1_DIR_SINK_SRCis a mask of two flags.
The macro hides the fact that it's a mask and the code
is actually more clear if we replace it the with bitwise-or explicitly.Signed-off-by Dafna Hirschfeld <[email protected]>
Quoted 119 lines
--- drivers/staging/media/rkisp1/rkisp1-common.h | 1 - drivers/staging/media/rkisp1/rkisp1-isp.c | 24 ++++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-)drivers/staging/media/rkisp1/rkisp1-common.h +0
-1@@ -24,7 +24,6 @@#define RKISP1_DIR_SRC BIT(0)#define RKISP1_DIR_SINK BIT(1) -#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC)#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024drivers/staging/media/rkisp1/rkisp1-isp.c +12
-12@@ -65,84 +65,84 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = { .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV,
PATCH RESEND v3 4/6 media: staging: rkisp1: rename macros 'RKISP1_DIR_*' to 'RKISP1_ISP_SD_*'
In reply to Dafna HirschfeldThe macros 'RKISP1_DIR_*' are flags that indicate on which pads of the isp subdevice the media bus code is supported. so the prefix RKISP1_ISP_SD_ is better.
--- drivers/staging/media/rkisp1/rkisp1-common.h | 4 +- drivers/staging/media/rkisp1/rkisp1-isp.c | 42 +++++++++---------- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-)
drivers/staging/media/rkisp1/rkisp1-common.h +2 -2
@@ -22,8 +22,8 @@#include "rkisp1-regs.h" #include "uapi/rkisp1-config.h" -#define RKISP1_DIR_SRC BIT(0) -#define RKISP1_DIR_SINK BIT(1) +#define RKISP1_ISP_SD_SRC BIT(0) +#define RKISP1_ISP_SD_SINK BIT(1)#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024
drivers/staging/media/rkisp1/rkisp1-isp.c +21 -21
163 lines not on this page · raw message
drivers/staging/media/rkisp1/rkisp1-resizer.c +1 -1
@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SRC )) { +if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
Signature · 1 line
2.17.1
Re: [RESEND PATCH v3 4/6] media: staging: rkisp1: rename macros 'RKISP1_DIR_*' to 'RKISP1_ISP_SD_*'
Hi Dafna,
Quoted 16 lines · Dafna Hirschfeld
The macros 'RKISP1_DIR_*' are flags that indicate on which pads of the isp subdevice the media bus code is supported. so the prefix
RKISP1_ISP_SD_is better.Signed-off-by Dafna Hirschfeld <[email protected]>--- drivers/staging/media/rkisp1/rkisp1-common.h | 4 +- drivers/staging/media/rkisp1/rkisp1-isp.c | 42 +++++++++---------- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-)drivers/staging/media/rkisp1/rkisp1-common.h +0
-0
drivers/staging/media/rkisp1/rkisp1-common.h line 26
Quoted 7 lines
drivers/staging/media/rkisp1/rkisp1-common.h +2
-2@@ -22,8 +22,8 @@#include "rkisp1-regs.h" #include "uapi/rkisp1-config.h" -#define RKISP1_DIR_SRC BIT(0) -#define RKISP1_DIR_SINK BIT(1) +#define RKISP1_ISP_SD_SRC BIT(0) +#define RKISP1_ISP_SD_SINK BIT(1)
Could you submit this change before 2/4? So when you move the macro, it will be correct already.
With this:
Thanks
Helen
Quoted 188 lines
drivers/staging/media/rkisp1/rkisp1-common.h +0
-0#define RKISP1_ISP_MAX_WIDTH 4032#define RKISP1_ISP_MAX_HEIGHT 3024drivers/staging/media/rkisp1/rkisp1-isp.c +21
-21@@ -58,119 +58,119 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = { { .mbus_code = MEDIA_BUS_FMT_YUYV8_2X8, .pixel_enc = V4L2_PIXEL_ENC_YUV, - .direction = RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 10, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 10, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 10, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 10, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 12, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 12, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 12, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 12, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 8, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 8, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 8, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 8, - .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, + .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_YCBYCR, .bus_width = 16, - .direction = RKISP1_DIR_SINK, + .direction = RKISP1_ISP_SD_SINK, }, { .mbus_code = MEDIA_BUS_FMT_YVYU8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_YCRYCB, .bus_width = 16, - .direction = RKISP1_DIR_SINK, + .direction = RKISP1_ISP_SD_SINK, }, { .mbus_code = MEDIA_BUS_FMT_UYVY8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_CBYCRY, .bus_width = 16, - .direction = RKISP1_DIR_SINK, + .direction = RKISP1_ISP_SD_SINK, }, { .mbus_code = MEDIA_BUS_FMT_VYUY8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_CRYCBY, .bus_width = 16, - .direction = RKISP1_DIR_SINK, + .direction = RKISP1_ISP_SD_SINK, }, };@@ -570,9 +570,9 @@ static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd,int pos =0 ;if (code->pad ==RKISP1_ISP_PAD_SINK_VIDEO ) { - dir =RKISP1_DIR_SINK ; + dir =RKISP1_ISP_SD_SINK ; }else if (code->pad ==RKISP1_ISP_PAD_SOURCE_VIDEO ) { - dir =RKISP1_DIR_SRC ; + dir =RKISP1_ISP_SD_SRC ; }else {if (code->index >0 )return -EINVAL ;@@ -657,7 +657,7 @@ static void rkisp1_isp_set_src_fmt(struct rkisp1_isp *isp, src_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (src_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SRC )) { +if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SRC )) { src_fmt->code =RKISP1_DEF_SRC_PAD_FMT ; mbus_info =rkisp1_isp_mbus_info_get (src_fmt->code); }@@ -741,7 +741,7 @@ static void rkisp1_isp_set_sink_fmt(struct rkisp1_isp *isp, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SINK )) { +if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SINK )) { sink_fmt->code =RKISP1_DEF_SINK_PAD_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }drivers/staging/media/rkisp1/rkisp1-resizer.c +1
-1@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_DIR_SRC )) { +if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
PATCH RESEND v3 5/6 media: staging: rkisp1: rename the field 'direction' in 'rkisp1_isp_mbus_info' to 'isp_pads_mask'
In reply to Dafna HirschfeldThe field 'direction' in 'struct rkisp1_isp_mbus_info' is a mask of the supported pads of the mbus code. Therefore
the name 'isp_pads_mask' is better.
The patch also rename a local variable 'dir' that holds such mask to 'pad'.
--- drivers/staging/media/rkisp1/rkisp1-common.h | 2 +- drivers/staging/media/rkisp1/rkisp1-isp.c | 46 +++++++++---------- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-)
drivers/staging/media/rkisp1/rkisp1-common.h +1 -1
@@ -282,7 +282,7 @@ struct rkisp1_isp_mbus_info {u32 yuv_seq;u8 bus_width;enum rkisp1_fmt_raw_pat_type bayer_pat; -unsigned int direction; +unsigned int isp_pads_mask; }; static inline void
drivers/staging/media/rkisp1/rkisp1-isp.c +23 -23
176 lines not on this page · raw message
drivers/staging/media/rkisp1/rkisp1-resizer.c +1 -1
@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SRC )) { +if (!mbus_info || !(mbus_info->isp_pads_mask &RKISP1_ISP_SD_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
Signature · 1 line
2.17.1
Re: [RESEND PATCH v3 5/6] media: staging: rkisp1: rename the field 'direction' in 'rkisp1_isp_mbus_info' to 'isp_pads_mask'
Hi Dafna,
Thank you for the patch.
Quoted 3 lines · Dafna Hirschfeld
The field 'direction' in 'struct
rkisp1_isp_mbus_info' is a mask of the supported pads of the mbus code. Therefore
the name 'isp_pads_mask' is better.
tbh, I'm not sure if it is better, since it feels it masks pads.
Also, the isp prefix is not required, since it is already inside rkisp1_isp_formats[].
My opinion is that the name "direction" make sense.
Or maybe some other name that reflects which pads the format applies to, but tbh I think the current one is fine.
Regards,
Helen
Quoted 222 lines
The patch also rename a local variable 'dir' that holds such mask to 'pad'.
Signed-off-by Dafna Hirschfeld <[email protected]>--- drivers/staging/media/rkisp1/rkisp1-common.h | 2 +- drivers/staging/media/rkisp1/rkisp1-isp.c | 46 +++++++++---------- drivers/staging/media/rkisp1/rkisp1-resizer.c | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-)drivers/staging/media/rkisp1/rkisp1-common.h +1
-1@@ -282,7 +282,7 @@ struct rkisp1_isp_mbus_info {u32 yuv_seq;u8 bus_width;enum rkisp1_fmt_raw_pat_type bayer_pat; -unsigned int direction; +unsigned int isp_pads_mask; }; static inline voiddrivers/staging/media/rkisp1/rkisp1-isp.c +23
-23@@ -58,119 +58,119 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = { { .mbus_code = MEDIA_BUS_FMT_YUYV8_2X8, .pixel_enc = V4L2_PIXEL_ENC_YUV, - .direction = RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 10, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 10, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 10, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 10, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 12, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 12, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 12, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 12, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 8, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 8, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 8, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 8, - .direction = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, + .isp_pads_mask = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC, }, { .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_YCBYCR, .bus_width = 16, - .direction = RKISP1_ISP_SD_SINK, + .isp_pads_mask = RKISP1_ISP_SD_SINK, }, { .mbus_code = MEDIA_BUS_FMT_YVYU8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_YCRYCB, .bus_width = 16, - .direction = RKISP1_ISP_SD_SINK, + .isp_pads_mask = RKISP1_ISP_SD_SINK, }, { .mbus_code = MEDIA_BUS_FMT_UYVY8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_CBYCRY, .bus_width = 16, - .direction = RKISP1_ISP_SD_SINK, + .isp_pads_mask = RKISP1_ISP_SD_SINK, }, { .mbus_code = MEDIA_BUS_FMT_VYUY8_1X16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mipi_dt = RKISP1_CIF_CSI2_DT_YUV422_8b, .yuv_seq = RKISP1_CIF_ISP_ACQ_PROP_CRYCBY, .bus_width = 16, - .direction = RKISP1_ISP_SD_SINK, + .isp_pads_mask = RKISP1_ISP_SD_SINK, }, };@@ -566,13 +566,13 @@ static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd,struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_mbus_code_enum *code) { - unsigned int i, dir; + unsigned int i, pad;int pos =0 ;if (code->pad ==RKISP1_ISP_PAD_SINK_VIDEO ) { - dir =RKISP1_ISP_SD_SINK ; + pad =RKISP1_ISP_SD_SINK ; }else if (code->pad ==RKISP1_ISP_PAD_SOURCE_VIDEO ) { - dir =RKISP1_ISP_SD_SRC ; + pad =RKISP1_ISP_SD_SRC ; }else {if (code->index >0 )return -EINVAL ;@@ -586,7 +586,7 @@ static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd,for (i =0 ; i <ARRAY_SIZE (rkisp1_isp_formats); i++) {const struct rkisp1_isp_mbus_info *fmt = &rkisp1_isp_formats[i]; -if (fmt->direction & dir) +if (fmt->isp_pads_mask & pad) pos++;if (code->index == pos -1 ) {@@ -657,7 +657,7 @@ static void rkisp1_isp_set_src_fmt(struct rkisp1_isp *isp, src_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (src_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SRC )) { +if (!mbus_info || !(mbus_info->isp_pads_mask &RKISP1_ISP_SD_SRC )) { src_fmt->code =RKISP1_DEF_SRC_PAD_FMT ; mbus_info =rkisp1_isp_mbus_info_get (src_fmt->code); }@@ -741,7 +741,7 @@ static void rkisp1_isp_set_sink_fmt(struct rkisp1_isp *isp, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SINK )) { +if (!mbus_info || !(mbus_info->isp_pads_mask &RKISP1_ISP_SD_SINK )) { sink_fmt->code =RKISP1_DEF_SINK_PAD_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }drivers/staging/media/rkisp1/rkisp1-resizer.c +1
-1@@ -542,7 +542,7 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz, which); sink_fmt->code = format->code; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); -if (!mbus_info || !(mbus_info->direction &RKISP1_ISP_SD_SRC )) { +if (!mbus_info || !(mbus_info->isp_pads_mask &RKISP1_ISP_SD_SRC )) { sink_fmt->code =RKISP1_DEF_FMT ; mbus_info =rkisp1_isp_mbus_info_get (sink_fmt->code); }
PATCH RESEND v3 6/6 media: staging: rkisp1: common: add documentation for struct rkisp1_isp_mbus_info
In reply to Dafna HirschfeldAdd documentation for the struct rkisp1_isp_mbus_info with one line doc of each field
--- drivers/staging/media/rkisp1/rkisp1-common.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/staging/media/rkisp1/rkisp1-common.h +13 -0
@@ -268,6 +268,19 @@ struct rkisp1_device {struct rkisp1_debug debug; }; +/* +* struct rkisp1_isp_mbus_info +* +* holds information about the supported isp media bus +* @mbus_code: the media bus code +* @pixel_enc: the pixel encoding +* @mipi_dt: the mipi data type +* @yuv_seq: the order of the yuv values for yuv formats +* @bus_width: the bus width +* @bayer_pat: the bayer pattern for bayer formats +* @isp_pads_mask: a bitmask of the pads that the format is supported on +*/ +/* * struct rkisp1_isp_mbus_info - ISP pad format info *
Signature · 1 line
2.17.1
Re: [RESEND PATCH v3 6/6] media: staging: rkisp1: common: add documentation for struct rkisp1_isp_mbus_info
Hi Dafna,
Thanks for the patch.
Quoted 23 lines · Dafna Hirschfeld
Add documentation for the struct
rkisp1_isp_mbus_infowith one line doc of each fieldSigned-off-by Dafna Hirschfeld <[email protected]>--- drivers/staging/media/rkisp1/rkisp1-common.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/staging/media/rkisp1/rkisp1-common.h +6
-0@@ -268,6 +268,19 @@ struct rkisp1_device {struct rkisp1_debug debug; }; +/* +* struct rkisp1_isp_mbus_info +* +* holds information about the supported isp media bus +* @mbus_code: the media bus code +* @pixel_enc: the pixel encoding
drivers/staging/media/rkisp1/rkisp1-common.h struct rkisp1_device { · line 286
Quoted 10 lines
drivers/staging/media/rkisp1/rkisp1-common.h +7
-0+* @mipi_dt: the mipi data type +* @yuv_seq: the order of the yuv values for yuv formats +* @bus_width: the bus width +* @bayer_pat: the bayer pattern for bayer formats +* @isp_pads_mask: a bitmask of the pads that the format is supported on +*/ +/* * struct rkisp1_isp_mbus_info - ISP pad format info *
Why doesn't it remove the current doc?
Thanks
Helen