aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-11-13 08:06:28 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-13 08:15:38 -0500
commit6ee28d94c9bfa0640a7c94c289ca0df239d90a0d (patch)
tree9273de5c53bedf2bc34feb97a858df7aa2deaeb3
parent2c4e11b7c15af70580625657a154ea7ea70b8c76 (diff)
[media] siano: fix build with allmodconfig
As reported by Stephen: After merging the v4l-dvb tree, today's linux-next build (x86_64 allmodconfig) failed like this: ERROR: "sms_ir_exit" [drivers/media/common/siano/smsmdtv.ko] undefined! ERROR: "sms_ir_event" [drivers/media/common/siano/smsmdtv.ko] undefined! ERROR: "sms_ir_init" [drivers/media/common/siano/smsmdtv.ko] undefined! The smsir file should be part of the smsmdtv core, if RC is defined. Fix it. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/common/siano/Makefile2
-rw-r--r--drivers/media/platform/omap3isp/isppreview.c37
2 files changed, 27 insertions, 12 deletions
diff --git a/drivers/media/common/siano/Makefile b/drivers/media/common/siano/Makefile
index 9e7fdf24a6b7..81b1e985bea5 100644
--- a/drivers/media/common/siano/Makefile
+++ b/drivers/media/common/siano/Makefile
@@ -3,7 +3,7 @@ smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o
3obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o 3obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
4 4
5ifeq ($(CONFIG_SMS_SIANO_RC),y) 5ifeq ($(CONFIG_SMS_SIANO_RC),y)
6 obj-$(CONFIG_SMS_SIANO_MDTV) += smsir.o 6 smsmdtv-objs += smsir.o
7endif 7endif
8 8
9ccflags-y += -Idrivers/media/dvb-core 9ccflags-y += -Idrivers/media/dvb-core
diff --git a/drivers/media/platform/omap3isp/isppreview.c b/drivers/media/platform/omap3isp/isppreview.c
index 1ae1c0909ed1..479e5c862b7b 100644
--- a/drivers/media/platform/omap3isp/isppreview.c
+++ b/drivers/media/platform/omap3isp/isppreview.c
@@ -200,10 +200,10 @@ static void preview_enable_invalaw(struct isp_prev_device *prev, bool enable)
200 200
201 if (enable) 201 if (enable)
202 isp_reg_set(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, 202 isp_reg_set(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
203 ISPPRV_PCR_WIDTH | ISPPRV_PCR_INVALAW); 203 ISPPRV_PCR_INVALAW);
204 else 204 else
205 isp_reg_clr(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, 205 isp_reg_clr(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
206 ISPPRV_PCR_WIDTH | ISPPRV_PCR_INVALAW); 206 ISPPRV_PCR_INVALAW);
207} 207}
208 208
209/* 209/*
@@ -1014,7 +1014,7 @@ static void preview_config_averager(struct isp_prev_device *prev, u8 average)
1014/* 1014/*
1015 * preview_config_input_format - Configure the input format 1015 * preview_config_input_format - Configure the input format
1016 * @prev: The preview engine 1016 * @prev: The preview engine
1017 * @format: Format on the preview engine sink pad 1017 * @info: Sink pad format information
1018 * 1018 *
1019 * Enable and configure CFA interpolation for Bayer formats and disable it for 1019 * Enable and configure CFA interpolation for Bayer formats and disable it for
1020 * greyscale formats. 1020 * greyscale formats.
@@ -1025,22 +1025,29 @@ static void preview_config_averager(struct isp_prev_device *prev, u8 average)
1025 * reordered to support non-GRBG Bayer patterns. 1025 * reordered to support non-GRBG Bayer patterns.
1026 */ 1026 */
1027static void preview_config_input_format(struct isp_prev_device *prev, 1027static void preview_config_input_format(struct isp_prev_device *prev,
1028 const struct v4l2_mbus_framefmt *format) 1028 const struct isp_format_info *info)
1029{ 1029{
1030 struct isp_device *isp = to_isp_device(prev); 1030 struct isp_device *isp = to_isp_device(prev);
1031 struct prev_params *params; 1031 struct prev_params *params;
1032 1032
1033 switch (format->code) { 1033 if (info->bpp == 8)
1034 case V4L2_MBUS_FMT_SGRBG10_1X10: 1034 isp_reg_set(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
1035 ISPPRV_PCR_WIDTH);
1036 else
1037 isp_reg_clr(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
1038 ISPPRV_PCR_WIDTH);
1039
1040 switch (info->flavor) {
1041 case V4L2_MBUS_FMT_SGRBG8_1X8:
1035 prev->params.cfa_order = 0; 1042 prev->params.cfa_order = 0;
1036 break; 1043 break;
1037 case V4L2_MBUS_FMT_SRGGB10_1X10: 1044 case V4L2_MBUS_FMT_SRGGB8_1X8:
1038 prev->params.cfa_order = 1; 1045 prev->params.cfa_order = 1;
1039 break; 1046 break;
1040 case V4L2_MBUS_FMT_SBGGR10_1X10: 1047 case V4L2_MBUS_FMT_SBGGR8_1X8:
1041 prev->params.cfa_order = 2; 1048 prev->params.cfa_order = 2;
1042 break; 1049 break;
1043 case V4L2_MBUS_FMT_SGBRG10_1X10: 1050 case V4L2_MBUS_FMT_SGBRG8_1X8:
1044 prev->params.cfa_order = 3; 1051 prev->params.cfa_order = 3;
1045 break; 1052 break;
1046 default: 1053 default:
@@ -1389,6 +1396,7 @@ static unsigned int preview_max_out_width(struct isp_prev_device *prev)
1389static void preview_configure(struct isp_prev_device *prev) 1396static void preview_configure(struct isp_prev_device *prev)
1390{ 1397{
1391 struct isp_device *isp = to_isp_device(prev); 1398 struct isp_device *isp = to_isp_device(prev);
1399 const struct isp_format_info *info;
1392 struct v4l2_mbus_framefmt *format; 1400 struct v4l2_mbus_framefmt *format;
1393 unsigned long flags; 1401 unsigned long flags;
1394 u32 update; 1402 u32 update;
@@ -1402,17 +1410,19 @@ static void preview_configure(struct isp_prev_device *prev)
1402 1410
1403 /* PREV_PAD_SINK */ 1411 /* PREV_PAD_SINK */
1404 format = &prev->formats[PREV_PAD_SINK]; 1412 format = &prev->formats[PREV_PAD_SINK];
1413 info = omap3isp_video_format_info(format->code);
1405 1414
1406 preview_adjust_bandwidth(prev); 1415 preview_adjust_bandwidth(prev);
1407 1416
1408 preview_config_input_format(prev, format); 1417 preview_config_input_format(prev, info);
1409 preview_config_input_size(prev, active); 1418 preview_config_input_size(prev, active);
1410 1419
1411 if (prev->input == PREVIEW_INPUT_CCDC) 1420 if (prev->input == PREVIEW_INPUT_CCDC)
1412 preview_config_inlineoffset(prev, 0); 1421 preview_config_inlineoffset(prev, 0);
1413 else 1422 else
1414 preview_config_inlineoffset(prev, 1423 preview_config_inlineoffset(prev,
1415 ALIGN(format->width, 0x20) * 2); 1424 ALIGN(format->width, 0x20) *
1425 DIV_ROUND_UP(info->bpp, 8));
1416 1426
1417 preview_setup_hw(prev, update, active); 1427 preview_setup_hw(prev, update, active);
1418 1428
@@ -1709,6 +1719,11 @@ __preview_get_crop(struct isp_prev_device *prev, struct v4l2_subdev_fh *fh,
1709 1719
1710/* previewer format descriptions */ 1720/* previewer format descriptions */
1711static const unsigned int preview_input_fmts[] = { 1721static const unsigned int preview_input_fmts[] = {
1722 V4L2_MBUS_FMT_Y8_1X8,
1723 V4L2_MBUS_FMT_SGRBG8_1X8,
1724 V4L2_MBUS_FMT_SRGGB8_1X8,
1725 V4L2_MBUS_FMT_SBGGR8_1X8,
1726 V4L2_MBUS_FMT_SGBRG8_1X8,
1712 V4L2_MBUS_FMT_Y10_1X10, 1727 V4L2_MBUS_FMT_Y10_1X10,
1713 V4L2_MBUS_FMT_SGRBG10_1X10, 1728 V4L2_MBUS_FMT_SGRBG10_1X10,
1714 V4L2_MBUS_FMT_SRGGB10_1X10, 1729 V4L2_MBUS_FMT_SRGGB10_1X10,