Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH 6/9] staging/atomisp: add PCI dependency

19 views
Skip to first unread message

Arnd Bergmann

unread,
Mar 20, 2017, 5:40:06 AM3/20/17
to
Without CONFIG_PCI, config space reads never return any data,
leading to undefined behavior that gcc warns about:

platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw':
platform/intel-mid/intel_mid_pcihelpers.c:66:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw_ext':
platform/intel-mid/intel_mid_pcihelpers.c:84:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32':
platform/intel-mid/intel_mid_pcihelpers.c:137:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]

With a dependency on CONFIG_PCI, we don't get this warning. This seems
safe as PCI config space accessors should always return something
when PCI is enabled.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig
index f7d8a841c629..3af2acdc7e96 100644
--- a/drivers/staging/media/atomisp/Kconfig
+++ b/drivers/staging/media/atomisp/Kconfig
@@ -1,6 +1,6 @@
menuconfig INTEL_ATOMISP
bool "Enable support to Intel MIPI camera drivers"
- depends on X86
+ depends on X86 && PCI
help
Enable support for the Intel ISP2 camera interfaces and MIPI
sensor drivers.
--
2.9.0

Arnd Bergmann

unread,
Mar 20, 2017, 5:40:09 AM3/20/17
to
The plat_clock implementation fails ot build in some configurations:

platform/clock/vlv2_plat_clock.c: In function 'vlv2_plat_set_clock_freq':
platform/clock/vlv2_plat_clock.c:88:2: error: implicit declaration of function 'writel';did you mean 'wrmsrl'? [-Werror=implicit-function-declaration]
platform/clock/vlv2_plat_clock.c:88:12: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
platform/clock/vlv2_plat_clock.c: In function 'vlv2_plat_clk_probe':
platform/clock/vlv2_plat_clock.c:193:13: error: implicit declaration of function 'ioremap_nocache' [-Werror=implicit-function-declaration]
platform/clock/vlv2_plat_clock.c:193:11: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
platform/clock/vlv2_plat_clock.c: In function 'vlv2_plat_clk_remove':
platform/clock/vlv2_plat_clock.c:209:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]

This includes the required header file.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c b/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c
index a8ca93dbfbb5..25e939c50aef 100644
--- a/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c
+++ b/drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c
@@ -20,6 +20,7 @@
*/

#include <linux/err.h>
+#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include "../../include/linux/vlv2_plat_clock.h"
--
2.9.0

Arnd Bergmann

unread,
Mar 20, 2017, 5:40:10 AM3/20/17
to
I ran into a build warning on my randconfig build box:

drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_lace_statistics_free':
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2845:64: error: parameter 'me' set but not used [-Werror=unused-but-set-parameter]

It turns out that not only the parameter is unused but the entire function has no
caller. Let's just remove it.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
.../staging/media/atomisp/pci/atomisp2/Makefile | 1 -
.../media/atomisp/pci/atomisp2/css2400/ia_css.h | 1 -
.../atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 1 -
.../pci/atomisp2/css2400/ia_css_lace_stat.h | 37 ----------------------
.../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 1 -
.../pci/atomisp2/css2400/sh_css_lace_stat.c | 16 ----------
.../atomisp/pci/atomisp2/css2400/sh_css_params.c | 15 ---------
7 files changed, 72 deletions(-)
delete mode 100644 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_lace_stat.h
delete mode 100644 drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_lace_stat.c

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/Makefile b/drivers/staging/media/atomisp/pci/atomisp2/Makefile
index f538e56ed1a7..463f84cca4d8 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/Makefile
+++ b/drivers/staging/media/atomisp/pci/atomisp2/Makefile
@@ -108,7 +108,6 @@ atomisp-objs += \
css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.o \
css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.o \
css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.o \
- css2400/sh_css_lace_stat.o \
css2400/sh_css_pipe.o \
css2400/ia_css_device_access.o \
css2400/sh_css_host_data.o \
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h
index f67626f5258c..2458b3767c90 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h
@@ -42,7 +42,6 @@
#include "ia_css_stream_format.h"
#include "ia_css_stream_public.h"
#include "ia_css_tpg.h"
-#include "ia_css_lace_stat.h"
#include "ia_css_version.h"
#include "ia_css_mmu.h"
#include "ia_css_morph.h"
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
index 26b16f469042..b2ecf3618c15 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
@@ -60,7 +60,6 @@ struct ia_css_buffer {
struct ia_css_isp_3a_statistics *stats_3a; /**< 3A statistics & optionally RGBY statistics. */
struct ia_css_isp_dvs_statistics *stats_dvs; /**< DVS statistics. */
struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs; /**< SKC DVS statistics. */
- struct ia_css_isp_lace_statistics *stats_lace; /**< LACE statistics. */
struct ia_css_frame *frame; /**< Frame buffer. */
struct ia_css_acc_param *custom_data; /**< Custom buffer. */
struct ia_css_metadata *metadata; /**< Sensor metadata. */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_lace_stat.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_lace_stat.h
deleted file mode 100644
index 6fee1e200a8a..000000000000
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_lace_stat.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- */
-
-#ifndef __IA_CSS_LACE_STAT_H
-#define __IA_CSS_LACE_STAT_H
-
-/** @file
- * This file contains types used for LACE statistics
- */
-
-struct ia_css_isp_lace_statistics;
-
-/** @brief Allocate mem for the LACE statistics on the ISP
- * @return Pointer to the allocated LACE statistics
- * buffer on the ISP
-*/
-struct ia_css_isp_lace_statistics *ia_css_lace_statistics_allocate(void);
-
-/** @brief Free the ACC LACE statistics memory on the isp
- * @param[in] me Pointer to the LACE statistics buffer on the
- * ISP.
- * @return None
-*/
-void ia_css_lace_statistics_free(struct ia_css_isp_lace_statistics *me);
-
-#endif /* __IA_CSS_LACE_STAT_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
index a70a72a34507..9a3fe2b5d9ca 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
@@ -44,7 +44,6 @@
#include "ia_css_frame_comm.h"
#include "ia_css_3a.h"
#include "ia_css_dvs.h"
-#include "ia_css_lace_stat.h"
#include "ia_css_metadata.h"
#include "runtime/bufq/interface/ia_css_bufq.h"
#include "ia_css_timer.h"
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_lace_stat.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_lace_stat.c
deleted file mode 100644
index 850aa5e5f811..000000000000
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_lace_stat.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- */
-
-/* This file will contain the code to implement the functions declared in ia_css_lace_stat.h
- and associated helper functions */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
index 1f346394c6b1..eab9e7ecae06 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
@@ -1225,10 +1225,6 @@ struct ia_css_isp_skc_dvs_statistics {
ia_css_ptr p_data;
};

-struct ia_css_isp_lace_statistics {
- ia_css_ptr p_data;
-};
-
static enum ia_css_err
ref_sh_css_ddr_address_map(
struct sh_css_ddr_address_map *map,
@@ -2841,17 +2837,6 @@ struct ia_css_isp_skc_dvs_statistics *ia_css_skc_dvs_statistics_allocate(void)
return NULL;
}

-void
-ia_css_lace_statistics_free(struct ia_css_isp_lace_statistics *me)
-{
- me = NULL;
-}
-
-struct ia_css_isp_lace_statistics *ia_css_lace_statistics_allocate(void)
-{
- return NULL;
-}
-
struct ia_css_metadata *
ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info)
{
--
2.9.0

Arnd Bergmann

unread,
Mar 20, 2017, 6:00:05 AM3/20/17
to
ia_css_dequeue_param_buffers does not have an arguement type, causing a warning:

drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_dequeue_param_buffers':
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:3728:6: error: old-style function definition [-Werror=old-style-definition]

This adds a 'void' keywork to silence the warning.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
index 9d51f1c653a2..1f346394c6b1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
@@ -3725,7 +3725,7 @@ static void sh_css_update_isp_mem_params_to_ddr(
IA_CSS_LEAVE_PRIVATE("void");
}

-void ia_css_dequeue_param_buffers(/*unsigned int pipe_num*/)
+void ia_css_dequeue_param_buffers(/*unsigned int pipe_num*/ void)
{
unsigned int i;
hrt_vaddress cpy;
--
2.9.0

Arnd Bergmann

unread,
Mar 20, 2017, 6:00:07 AM3/20/17
to
Defining a debug function to nothing causes a warning with an empty block
after if()/else():

drivers/staging/media/atomisp/i2c/ov2680.c: In function 'ov2680_s_stream':
drivers/staging/media/atomisp/i2c/ov2680.c:1208:55: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]

This changes the empty debug statement to dev_dbg(), which by default also
does nothing, but avoids this warning and also checks the format string.
As a side-effect, we can now use dynamic debugging to turn on the
output at runtime.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/i2c/ov2680.c | 37 +++++++++++++++---------------
1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/ov2680.c b/drivers/staging/media/atomisp/i2c/ov2680.c
index 58d2a075d436..c08dd0b18fbb 100644
--- a/drivers/staging/media/atomisp/i2c/ov2680.c
+++ b/drivers/staging/media/atomisp/i2c/ov2680.c
@@ -35,7 +35,6 @@

#include "ov2680.h"

-#define ov2680_debug(...) //dev_err(__VA_ARGS__)
static int h_flag = 0;
static int v_flag = 0;
static enum atomisp_bayer_order ov2680_bayer_order_mapping[] = {
@@ -99,7 +98,7 @@ static int ov2680_read_reg(struct i2c_client *client,
*val = be16_to_cpu(*(u16 *)&data[0]);
else
*val = be32_to_cpu(*(u32 *)&data[0]);
- //ov2680_debug(&client->dev, "++++i2c read adr%x = %x\n", reg,*val);
+ //dev_dbg(&client->dev, "++++i2c read adr%x = %x\n", reg,*val);
return 0;
}

@@ -114,7 +113,7 @@ static int ov2680_i2c_write(struct i2c_client *client, u16 len, u8 *data)
msg.len = len;
msg.buf = data;
ret = i2c_transfer(client->adapter, &msg, 1);
- //ov2680_debug(&client->dev, "+++i2c write reg=%x->%x\n", data[0]*256 +data[1],data[2]);
+ //dev_dbg(&client->dev, "+++i2c write reg=%x->%x\n", data[0]*256 +data[1],data[2]);
return ret == num_msg ? 0 : -EIO;
}

@@ -235,7 +234,7 @@ static int ov2680_write_reg_array(struct i2c_client *client,
const struct ov2680_reg *next = reglist;
struct ov2680_write_ctrl ctrl;
int err;
- ov2680_debug(&client->dev, "++++write reg array\n");
+ dev_dbg(&client->dev, "++++write reg array\n");
ctrl.index = 0;
for (; next->type != OV2680_TOK_TERM; next++) {
switch (next->type & OV2680_TOK_MASK) {
@@ -250,7 +249,7 @@ static int ov2680_write_reg_array(struct i2c_client *client,
* If next address is not consecutive, data needs to be
* flushed before proceed.
*/
- ov2680_debug(&client->dev, "+++ov2680_write_reg_array reg=%x->%x\n", next->reg,next->val);
+ dev_dbg(&client->dev, "+++ov2680_write_reg_array reg=%x->%x\n", next->reg,next->val);
if (!__ov2680_write_reg_is_consecutive(client, &ctrl,
next)) {
err = __ov2680_flush_reg_array(client, &ctrl);
@@ -296,7 +295,8 @@ static int ov2680_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
static int ov2680_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
{
struct ov2680_device *dev = to_ov2680_sensor(sd);
- ov2680_debug(dev, "++++ov2680_g_bin_factor_x\n");
+ struct i2c_client *client = v4l2_get_subdevdata(sd);
+ dev_dbg(&client->dev, "++++ov2680_g_bin_factor_x\n");
*val = ov2680_res[dev->fmt_idx].bin_factor_x;

return 0;
@@ -305,9 +305,10 @@ static int ov2680_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
static int ov2680_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
{
struct ov2680_device *dev = to_ov2680_sensor(sd);
+ struct i2c_client *client = v4l2_get_subdevdata(sd);

*val = ov2680_res[dev->fmt_idx].bin_factor_y;
- ov2680_debug(dev, "++++ov2680_g_bin_factor_y\n");
+ dev_dbg(&client->dev, "++++ov2680_g_bin_factor_y\n");
return 0;
}

@@ -322,7 +323,7 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
unsigned int pix_clk_freq_hz;
u16 reg_val;
int ret;
- ov2680_debug(dev, "++++ov2680_get_intg_factor\n");
+ dev_dbg(&client->dev, "++++ov2680_get_intg_factor\n");
if (!info)
return -EINVAL;

@@ -399,7 +400,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
u16 vts,hts;
int ret,exp_val;

- ov2680_debug(dev, "+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n",coarse_itg, gain, digitgain);
+ dev_dbg(&client->dev, "+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n",coarse_itg, gain, digitgain);

hts = ov2680_res[dev->fmt_idx].pixels_per_line;
vts = ov2680_res[dev->fmt_idx].lines_per_frame;
@@ -605,7 +606,7 @@ static int ov2680_v_flip(struct v4l2_subdev *sd, s32 value)
int ret;
u16 val;
u8 index;
- ov2680_debug(&client->dev, "@%s: value:%d\n", __func__, value);
+ dev_dbg(&client->dev, "@%s: value:%d\n", __func__, value);
ret = ov2680_read_reg(client, OV2680_8BIT, OV2680_FLIP_REG, &val);
if (ret)
return ret;
@@ -636,7 +637,7 @@ static int ov2680_h_flip(struct v4l2_subdev *sd, s32 value)
int ret;
u16 val;
u8 index;
- ov2680_debug(&client->dev, "@%s: value:%d\n", __func__, value);
+ dev_dbg(&client->dev, "@%s: value:%d\n", __func__, value);

ret = ov2680_read_reg(client, OV2680_8BIT, OV2680_MIRROR_REG, &val);
if (ret)
@@ -1069,7 +1070,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
struct camera_mipi_info *ov2680_info = NULL;
int ret = 0;
int idx = 0;
- ov2680_debug(&client->dev, "+++++ov2680_s_mbus_fmt+++++l\n");
+ dev_dbg(&client->dev, "+++++ov2680_s_mbus_fmt+++++l\n");
if (format->pad)
return -EINVAL;

@@ -1097,7 +1098,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
return 0;
}
dev->fmt_idx = get_resolution_index(fmt->width, fmt->height);
- ov2680_debug(&client->dev, "+++++get_resolution_index=%d+++++l\n",
+ dev_dbg(&client->dev, "+++++get_resolution_index=%d+++++l\n",
dev->fmt_idx);
if (dev->fmt_idx == -1) {
dev_err(&client->dev, "get resolution fail\n");
@@ -1106,7 +1107,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
}
v4l2_info(client, "__s_mbus_fmt i=%d, w=%d, h=%d\n", dev->fmt_idx,
fmt->width, fmt->height);
- ov2680_debug(&client->dev, "__s_mbus_fmt i=%d, w=%d, h=%d\n",
+ dev_dbg(&client->dev, "__s_mbus_fmt i=%d, w=%d, h=%d\n",
dev->fmt_idx, fmt->width, fmt->height);

ret = ov2680_write_reg_array(client, ov2680_res[dev->fmt_idx].regs);
@@ -1203,9 +1204,9 @@ static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)

mutex_lock(&dev->input_lock);
if(enable )
- ov2680_debug(&client->dev, "ov2680_s_stream one \n");
+ dev_dbg(&client->dev, "ov2680_s_stream one \n");
else
- ov2680_debug(&client->dev, "ov2680_s_stream off \n");
+ dev_dbg(&client->dev, "ov2680_s_stream off \n");

ret = ov2680_write_reg(client, OV2680_8BIT, OV2680_SW_STREAM,
enable ? OV2680_START_STREAMING :
@@ -1508,11 +1509,11 @@ static int ov2680_probe(struct i2c_client *client,
if (ret)
{
ov2680_remove(client);
- ov2680_debug(&client->dev, "+++ remove ov2680 \n");
+ dev_dbg(&client->dev, "+++ remove ov2680 \n");
}
return ret;
out_free:
- ov2680_debug(&client->dev, "+++ out free \n");
+ dev_dbg(&client->dev, "+++ out free \n");
v4l2_device_unregister_subdev(&dev->sd);
kfree(dev);
return ret;
--
2.9.0

Arnd Bergmann

unread,
Mar 20, 2017, 6:00:08 AM3/20/17
to
Without ACPI, some of the code fails to build:

media/atomisp/platform/intel-mid/atomisp_gmin_platform.c: In function 'atomisp_register_i2c_module':
media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:174:7: error: dereferencing pointer to incomplete type 'struct acpi_device'

We could work around that in the code, but since we already have a hard
dependency on x86, adding the ACPI dependency seems to be the easiest
solution.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig
index 3af2acdc7e96..97ffa2fc5384 100644
--- a/drivers/staging/media/atomisp/Kconfig
+++ b/drivers/staging/media/atomisp/Kconfig
@@ -1,6 +1,6 @@
menuconfig INTEL_ATOMISP
bool "Enable support to Intel MIPI camera drivers"
- depends on X86 && PCI
+ depends on X86 && PCI && ACPI

Arnd Bergmann

unread,
Mar 20, 2017, 8:50:05 AM3/20/17
to
The driver fails to build if this is disabled, so we need an explicit
Kconfig dependency:

drivers/staging/media/atomisp/pci/atomisp2/./atomisp_cmd.c:6085:48: error: 'struct v4l2_subdev_fh' has no member named 'pad'

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/pci/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/Kconfig b/drivers/staging/media/atomisp/pci/Kconfig
index e8f67835d03d..a72421431c7a 100644
--- a/drivers/staging/media/atomisp/pci/Kconfig
+++ b/drivers/staging/media/atomisp/pci/Kconfig
@@ -4,7 +4,7 @@

config VIDEO_ATOMISP
tristate "Intel Atom Image Signal Processor Driver"
- depends on VIDEO_V4L2
+ depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
select VIDEOBUF_VMALLOC
---help---
Say Y here if your platform supports Intel Atom SoC
--
2.9.0

Arnd Bergmann

unread,
Mar 20, 2017, 8:50:06 AM3/20/17
to
Without CONFIG_EFI, the driver fails to call efivar_entry_get:

drivers/staging/built-in.o: In function `gmin_get_config_var':
(.text+0x1e3b): undefined reference to `efivar_entry_get'

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig
index f24ae1c8cc90..e0ae0c93f800 100644
--- a/drivers/staging/media/atomisp/Kconfig
+++ b/drivers/staging/media/atomisp/Kconfig
@@ -1,6 +1,6 @@
menuconfig INTEL_ATOMISP
bool "Enable support to Intel MIPI camera drivers"
- depends on X86 && PCI && ACPI && MEDIA_CONTROLLER
+ depends on X86 && PCI && ACPI && EFI && MEDIA_CONTROLLER

Arnd Bergmann

unread,
Mar 20, 2017, 8:50:09 AM3/20/17
to
One i2c driver already gained a dependency, but the others are equally broken:

drivers/staging/media/atomisp/i2c/ap1302.c: In function 'ap1302_remove':
drivers/staging/media/atomisp/i2c/ap1302.c:1143:31: error: 'struct v4l2_subdev' has no member named 'entity'
drivers/staging/media/atomisp/i2c/mt9m114.c: In function 'mt9m114_remove':
drivers/staging/media/atomisp/i2c/mt9m114.c:1850:31: error: 'struct v4l2_subdev' has no member named 'entity'
drivers/staging/media/atomisp/i2c/gc0310.c: In function 'gc0310_remove':
drivers/staging/media/atomisp/i2c/gc0310.c:1372:31: error: 'struct v4l2_subdev' has no member named 'entity'
drivers/staging/media/atomisp/i2c/gc0310.c: In function 'gc0310_probe':
drivers/staging/media/atomisp/i2c/gc0310.c:1422:9: error: 'struct v4l2_subdev' has no member named 'entity'
drivers/staging/media/atomisp/i2c/ov2722.c: In function 'ov2722_remove':
drivers/staging/media/atomisp/i2c/ov2722.c:1253:31: error: 'struct v4l2_subdev' has no member named 'entity'

Let's just require MEDIA_CONTROLLER for all of them.

Fixes: dd1c0f278b0e ("staging: media: atomisp: fix build error in ov5693 driver")
Signed-off-by: Arnd Bergmann <ar...@arndb.de>
---
drivers/staging/media/atomisp/Kconfig | 2 +-
drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig
index 97ffa2fc5384..f24ae1c8cc90 100644
--- a/drivers/staging/media/atomisp/Kconfig
+++ b/drivers/staging/media/atomisp/Kconfig
@@ -1,6 +1,6 @@
menuconfig INTEL_ATOMISP
bool "Enable support to Intel MIPI camera drivers"
- depends on X86 && PCI && ACPI
+ depends on X86 && PCI && ACPI && MEDIA_CONTROLLER
help
Enable support for the Intel ISP2 camera interfaces and MIPI
sensor drivers.
diff --git a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
index 3954b8c65fd1..9fb1bffbe9b3 100644
--- a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
+++ b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
@@ -1,6 +1,6 @@
config VIDEO_OV5693
tristate "Omnivision ov5693 sensor support"
- depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
+ depends on I2C && VIDEO_V4L2
---help---
This is a Video4Linux2 sensor-level driver for the Micron
ov5693 5 Mpixel camera.
--
2.9.0

Stephen Hemminger

unread,
Mar 20, 2017, 11:10:06 AM3/20/17
to
On Mon, 20 Mar 2017 10:32:19 +0100
Arnd Bergmann <ar...@arndb.de> wrote:

> -void ia_css_dequeue_param_buffers(/*unsigned int pipe_num*/)
> +void ia_css_dequeue_param_buffers(/*unsigned int pipe_num*/ void)
> {
Why keep the comment?

Arnd Bergmann

unread,
Mar 20, 2017, 12:40:08 PM3/20/17
to
The comment matches one later in the file when this function gets called.

I thought about cleaning up both at the same time, but couldn't figure out
how the comment ended up in there or why it was left behind in the first
place, so I ended up leaving both for another patch on top. If you prefer,
I could resend the patch and do both at once.

Arnd
0 new messages