Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333781
b: refs/heads/master
c: 882084a
h: refs/heads/master
i:
  333779: 7edac4b
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent 47a10e1 commit b2d690b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 178cce1262762b636bcde6685a014c70640b15cc
refs/heads/master: 882084ad0f9791f2e8386ba3f9f3836f0c3e9fa6
17 changes: 9 additions & 8 deletions trunk/drivers/media/platform/davinci/vpif_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,8 @@ static int vpif_s_output(struct file *file, void *priv, unsigned int i)
vpif_err("Failed to set output standard\n");

ch->output_idx = i;
if (vpif_obj.sd[i])
ch->sd = vpif_obj.sd[i];
return ret;
}

Expand Down Expand Up @@ -1317,14 +1319,13 @@ static int vpif_s_dv_timings(struct file *file, void *priv,
}

/* Configure subdevice timings, if any */
ret = v4l2_subdev_call(vpif_obj.sd[ch->output_idx],
video, s_dv_timings, timings);
ret = v4l2_subdev_call(ch->sd, video, s_dv_timings, timings);
if (ret == -ENOIOCTLCMD) {
vpif_dbg(2, debug, "Custom DV timings not supported by "
"subdevice\n");
return -EINVAL;
return -ENODATA;
}
if (ret < 0) {
if (ret < 0 && ret != -ENODEV) {
vpif_dbg(2, debug, "Error setting custom DV timings\n");
return ret;
}
Expand Down Expand Up @@ -1449,8 +1450,7 @@ static int vpif_dbg_g_register(struct file *file, void *priv,
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;

return v4l2_subdev_call(vpif_obj.sd[ch->output_idx], core,
g_register, reg);
return v4l2_subdev_call(ch->sd, core, g_register, reg);
}

/*
Expand All @@ -1467,8 +1467,7 @@ static int vpif_dbg_s_register(struct file *file, void *priv,
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;

return v4l2_subdev_call(vpif_obj.sd[ch->output_idx], core,
s_register, reg);
return v4l2_subdev_call(ch->sd, core, s_register, reg);
}
#endif

Expand Down Expand Up @@ -1739,6 +1738,8 @@ static __init int vpif_probe(struct platform_device *pdev)

}
ch->initialized = 0;
if (subdev_count)
ch->sd = vpif_obj.sd[0];
ch->channel_id = j;
if (j < 2)
ch->common[VPIF_VIDEO_INDEX].numbuffers =
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/platform/davinci/vpif_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ struct channel_obj {
u8 initialized; /* flag to indicate whether
* encoder is initialized */
u32 output_idx; /* Current output index */
struct v4l2_subdev *sd; /* Current output subdev(may be NULL) */

enum vpif_channel_id channel_id;/* Identifies channel */
struct vpif_params vpifparams;
Expand Down

0 comments on commit b2d690b

Please sign in to comment.