Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333773
b: refs/heads/master
c: 311673e
h: refs/heads/master
i:
  333771: afd795c
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent 7bccff1 commit 9adc2bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 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: 6f47c6c69cd45d9e57458e31528628af2d346f73
refs/heads/master: 311673ee9b6746aa366cc19049899308ce8bd01f
17 changes: 6 additions & 11 deletions trunk/drivers/media/platform/davinci/vpif_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,6 @@ static int vpif_s_output(struct file *file, void *priv, unsigned int i)
{
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;
struct video_obj *vid_ch = &ch->video;
struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];
int ret = 0;

Expand All @@ -1246,17 +1245,16 @@ static int vpif_s_output(struct file *file, void *priv, unsigned int i)
if (ret < 0)
vpif_err("Failed to set output standard\n");

vid_ch->output_id = i;
ch->output_idx = i;
return ret;
}

static int vpif_g_output(struct file *file, void *priv, unsigned int *i)
{
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;
struct video_obj *vid_ch = &ch->video;

*i = vid_ch->output_id;
*i = ch->output_idx;

return 0;
}
Expand Down Expand Up @@ -1291,9 +1289,8 @@ vpif_enum_dv_timings(struct file *file, void *priv,
{
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;
struct video_obj *vid_ch = &ch->video;

return v4l2_subdev_call(vpif_obj.sd[vid_ch->output_id],
return v4l2_subdev_call(vpif_obj.sd[ch->output_idx],
video, enum_dv_timings, timings);
}

Expand All @@ -1320,7 +1317,7 @@ static int vpif_s_dv_timings(struct file *file, void *priv,
}

/* Configure subdevice timings, if any */
ret = v4l2_subdev_call(vpif_obj.sd[vid_ch->output_id],
ret = v4l2_subdev_call(vpif_obj.sd[ch->output_idx],
video, s_dv_timings, timings);
if (ret == -ENOIOCTLCMD) {
vpif_dbg(2, debug, "Custom DV timings not supported by "
Expand Down Expand Up @@ -1451,9 +1448,8 @@ static int vpif_dbg_g_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg){
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;
struct video_obj *vid_ch = &ch->video;

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

Expand All @@ -1470,9 +1466,8 @@ static int vpif_dbg_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg){
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;
struct video_obj *vid_ch = &ch->video;

return v4l2_subdev_call(vpif_obj.sd[vid_ch->output_id], core,
return v4l2_subdev_call(vpif_obj.sd[ch->output_idx], core,
s_register, reg);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/davinci/vpif_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ struct video_obj {
v4l2_std_id stdid; /* Currently selected or default
* standard */
struct v4l2_dv_timings dv_timings;
u32 output_id; /* Current output id */
};

struct vpif_disp_buffer {
Expand Down Expand Up @@ -125,6 +124,7 @@ struct channel_obj {
* which is being displayed */
u8 initialized; /* flag to indicate whether
* encoder is initialized */
u32 output_idx; /* Current output index */

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

0 comments on commit 9adc2bd

Please sign in to comment.