Commit b861d139 authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC

The 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.
Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 7b8ce1f2
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define RKISP1_DIR_SRC BIT(0) #define RKISP1_DIR_SRC BIT(0)
#define RKISP1_DIR_SINK BIT(1) #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. * NOTE: MIPI controller and input MUX are also configured in this file.
...@@ -69,84 +68,84 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = { ...@@ -69,84 +68,84 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = {
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10,
.bayer_pat = RKISP1_RAW_RGGB, .bayer_pat = RKISP1_RAW_RGGB,
.bus_width = 10, .bus_width = 10,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10,
.bayer_pat = RKISP1_RAW_BGGR, .bayer_pat = RKISP1_RAW_BGGR,
.bus_width = 10, .bus_width = 10,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10, .mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10,
.bayer_pat = RKISP1_RAW_GBRG, .bayer_pat = RKISP1_RAW_GBRG,
.bus_width = 10, .bus_width = 10,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10, .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10,
.bayer_pat = RKISP1_RAW_GRBG, .bayer_pat = RKISP1_RAW_GRBG,
.bus_width = 10, .bus_width = 10,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12, .mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12,
.bayer_pat = RKISP1_RAW_RGGB, .bayer_pat = RKISP1_RAW_RGGB,
.bus_width = 12, .bus_width = 12,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12,
.bayer_pat = RKISP1_RAW_BGGR, .bayer_pat = RKISP1_RAW_BGGR,
.bus_width = 12, .bus_width = 12,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12, .mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12,
.bayer_pat = RKISP1_RAW_GBRG, .bayer_pat = RKISP1_RAW_GBRG,
.bus_width = 12, .bus_width = 12,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12, .mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12,
.bayer_pat = RKISP1_RAW_GRBG, .bayer_pat = RKISP1_RAW_GRBG,
.bus_width = 12, .bus_width = 12,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8, .mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8,
.bayer_pat = RKISP1_RAW_RGGB, .bayer_pat = RKISP1_RAW_RGGB,
.bus_width = 8, .bus_width = 8,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8,
.bayer_pat = RKISP1_RAW_BGGR, .bayer_pat = RKISP1_RAW_BGGR,
.bus_width = 8, .bus_width = 8,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8, .mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8,
.bayer_pat = RKISP1_RAW_GBRG, .bayer_pat = RKISP1_RAW_GBRG,
.bus_width = 8, .bus_width = 8,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8, .mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8,
.pixel_enc = V4L2_PIXEL_ENC_BAYER, .pixel_enc = V4L2_PIXEL_ENC_BAYER,
.mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8,
.bayer_pat = RKISP1_RAW_GRBG, .bayer_pat = RKISP1_RAW_GRBG,
.bus_width = 8, .bus_width = 8,
.direction = RKISP1_DIR_SINK_SRC, .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
}, { }, {
.mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16,
.pixel_enc = V4L2_PIXEL_ENC_YUV, .pixel_enc = V4L2_PIXEL_ENC_YUV,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment