summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>2018-05-29 15:14:54 +0200
committerJakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>2018-05-29 15:14:54 +0200
commit455b5819edb0ac0b1a8ea6082d5cbff03944f9ae (patch)
tree6ff32c58b20504ada6d5504afea70596cd0e9a2f
parent8b34af17b0dd27d16bc0eded293136e43df4ec17 (diff)
-rw-r--r--drivers/media/i2c/tc35874x.c3
-rw-r--r--drivers/media/platform/rockchip/isp1/capture.c14
-rw-r--r--drivers/media/platform/rockchip/isp1/rkisp1.c8
3 files changed, 18 insertions, 7 deletions
diff --git a/drivers/media/i2c/tc35874x.c b/drivers/media/i2c/tc35874x.c
index a6c7d7abf6e7..0ee754a8bd78 100644
--- a/drivers/media/i2c/tc35874x.c
+++ b/drivers/media/i2c/tc35874x.c
@@ -585,11 +585,10 @@ static inline void enable_stream(struct v4l2_subdev *sd, bool enable)
enable ? (MASK_VBUFEN | MASK_ABUFEN) : 0x0);
mutex_unlock(&state->confctl_mutex);
-/*
+
if (enable) {
tc35874x_log_status(sd);
}
-*/
}
static void tc35874x_set_pll(struct v4l2_subdev *sd)
diff --git a/drivers/media/platform/rockchip/isp1/capture.c b/drivers/media/platform/rockchip/isp1/capture.c
index c0b6859c016a..592ea2107e48 100644
--- a/drivers/media/platform/rockchip/isp1/capture.c
+++ b/drivers/media/platform/rockchip/isp1/capture.c
@@ -645,9 +645,10 @@ struct capture_fmt *find_fmt(struct rkisp1_stream *stream, const u32 pixelfmt)
struct video_device *vdev = &stream->vnode.vdev;
int i;
- printk("%s:%d: stream=%s, wanted fmt: ", __func__, __LINE__, vdev->name);
+ printk("%s:%d: stream=%s, fmts=%px, wanted fmt: ", __func__, __LINE__, vdev->name, stream->config->fmts);
pretty_print_fourcc(pixelfmt);
printk("\n");
+ printk(KERN_DEBUG "sp_fmts=%px mp_fmts=%px ", sp_fmts, mp_fmts);
printk(KERN_DEBUG "%s:%d: available: ", __func__, __LINE__);
for (i = 0; i < stream->config->fmt_size; i++) {
fmt = &stream->config->fmts[i];
@@ -887,7 +888,7 @@ static void update_mi(struct rkisp1_stream *stream)
* throw data to it if there is no available buffer.
*/
if (stream->next_buf) {
- printk_ratelimited(KERN_DEBUG "%s:%d: setting y_add to %x\n", __func__, __LINE__, stream->next_buf->buff_addr[RKISP1_PLANE_Y]);
+ //printk_ratelimited(KERN_DEBUG "%s:%d: setting y_add to %x\n", __func__, __LINE__, stream->next_buf->buff_addr[RKISP1_PLANE_Y]);
mi_set_y_addr(stream,
stream->next_buf->buff_addr[RKISP1_PLANE_Y]);
mi_set_cb_addr(stream,
@@ -966,7 +967,7 @@ static int mi_frame_end(struct rkisp1_stream *stream)
unsigned long lock_flags = 0;
int i = 0;
- printk_ratelimited(KERN_DEBUG "%s:%d: called\n", __func__, __LINE__);
+ //printk_ratelimited(KERN_DEBUG "%s:%d: called\n", __func__, __LINE__);
if (stream->curr_buf) {
u64 ns = ktime_get_ns();
@@ -1373,10 +1374,13 @@ static void rkisp1_set_fmt(struct rkisp1_stream *stream,
int i;
printk("%s:%d: called\n", __func__, __LINE__);
+ //dump_stack();
fmt = find_fmt(stream, pixm->pixelformat);
- if (!fmt)
+ if (!fmt) {
+ printk("%s:%d: not found, fallback to fmts[0]\n", __func__, __LINE__);
fmt = config->fmts;
+ }
/* do checks on resolution */
pixm->width = clamp_t(u32, pixm->width, config->min_rsz_width,
@@ -1793,7 +1797,7 @@ void rkisp1_mi_isr(struct rkisp1_stream *stream)
void __iomem *base = stream->ispdev->base_addr;
u32 val;
- printk_ratelimited(KERN_DEBUG "%s:%d: called\n", __func__, __LINE__);
+ //printk_ratelimited(KERN_DEBUG "%s:%d: called\n", __func__, __LINE__);
stream->ops->clr_frame_end_int(base);
if (stream->ops->is_frame_end_int_masked(base)) {
diff --git a/drivers/media/platform/rockchip/isp1/rkisp1.c b/drivers/media/platform/rockchip/isp1/rkisp1.c
index 3b012f559233..f1a4abbe7079 100644
--- a/drivers/media/platform/rockchip/isp1/rkisp1.c
+++ b/drivers/media/platform/rockchip/isp1/rkisp1.c
@@ -769,6 +769,8 @@ static int rkisp1_isp_sd_set_fmt(struct v4l2_subdev *sd,
struct rkisp1_isp_subdev *isp_sd = &isp_dev->isp_sdev;
struct v4l2_mbus_framefmt *mf = &fmt->format;
+ printk("%s:%d: called\n", __func__, __LINE__);
+
if ((fmt->pad != RKISP1_ISP_PAD_SINK) &&
(fmt->pad != RKISP1_ISP_PAD_SOURCE_PATH))
return -EINVAL;
@@ -973,17 +975,22 @@ static int rkisp1_isp_sd_s_power(struct v4l2_subdev *sd, int on)
static int rkisp1_subdev_link_validate(struct media_link *link)
{
+ printk("%s:%d: called\n", __func__, __LINE__);
+
if (link->source->index == RKISP1_ISP_PAD_SINK_PARAMS)
return 0;
return v4l2_subdev_link_validate(link);
}
+// NEVER CALLED --JU
static int rkisp1_subdev_fmt_link_validate(struct v4l2_subdev *sd,
struct media_link *link,
struct v4l2_subdev_format *source_fmt,
struct v4l2_subdev_format *sink_fmt)
{
+ printk("%s:%d: called\n", __func__, __LINE__);
+
if (source_fmt->format.code != sink_fmt->format.code)
return -EINVAL;
@@ -992,6 +999,7 @@ static int rkisp1_subdev_fmt_link_validate(struct v4l2_subdev *sd,
source_fmt->format.height < sink_fmt->format.height)
return -EINVAL;
+ printk("%s:%d: return 0\n", __func__, __LINE__);
return 0;
}