Re: [PATCH] vpif: replace preset with the timings API.
Hi Mauro, On Wed, Aug 8, 2012 at 5:39 PM, Prabhakar Lad prabhakar@ti.com wrote: From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Lad, Prabhakar prabhakar@ti.com Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com --- drivers/media/video/davinci/vpif.c | 16 ++-- drivers/media/video/davinci/vpif.h |4 +- drivers/media/video/davinci/vpif_capture.c | 114 +--- drivers/media/video/davinci/vpif_capture.h |3 +- drivers/media/video/davinci/vpif_display.c | 102 +++-- drivers/media/video/davinci/vpif_display.h |3 +- 6 files changed, 43 insertions(+), 199 deletions(-) Can you pull these patch ? Please inform me if anything is needed from my side. Regards, --Prabhakar diff --git a/drivers/media/video/davinci/vpif.c b/drivers/media/video/davinci/vpif.c index b3637af..b95bff7 100644 --- a/drivers/media/video/davinci/vpif.c +++ b/drivers/media/video/davinci/vpif.c @@ -25,6 +25,8 @@ #include linux/io.h #include linux/clk.h #include linux/err.h +#include linux/v4l2-dv-timings.h + #include mach/hardware.h #include vpif.h @@ -65,7 +67,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_480P59_94, + .dv_timings = V4L2_DV_BT_CEA_720X480P59_94, }, { .name = 576p50, @@ -82,7 +84,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_576P50, + .dv_timings = V4L2_DV_BT_CEA_720X576P50, }, { .name = 720p50, @@ -99,7 +101,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_720P50, + .dv_timings = V4L2_DV_BT_CEA_1280X720P50, }, { .name = 720p60, @@ -116,7 +118,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_720P60, + .dv_timings = V4L2_DV_BT_CEA_1280X720P60, }, { .name = 1080I50, @@ -136,7 +138,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_1080I50, + .dv_timings = V4L2_DV_BT_CEA_1920X1080I50, }, { .name = 1080I60, @@ -156,7 +158,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_1080I60, + .dv_timings = V4L2_DV_BT_CEA_1920X1080I60, }, { .name = 1080p60, @@ -173,7 +175,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_1080P60, + .dv_timings = V4L2_DV_BT_CEA_1920X1080P60, }, /* SDTV formats */ diff --git a/drivers/media/video/davinci/vpif.h b/drivers/media/video/davinci/vpif.h index c2ce4d9..a1ab6a0 100644 --- a/drivers/media/video/davinci/vpif.h +++ b/drivers/media/video/davinci/vpif.h @@ -533,7 +533,7 @@ static inline void channel2_clipping_enable(int enable) } } -/* function to enable clipping (for both active and blanking regions) on ch 2 */ +/* function to enable clipping (for both active and blanking regions) on ch 3 */ static inline void channel3_clipping_enable(int enable) { if (enable) { @@ -634,7 +634,7 @@ struct vpif_channel_config_params { * supports capturing vbi or not */ u8 hd_sd; /* HDTV (1) or SDTV (0) format */ v4l2_std_id stdid; /* SDTV format */ - u32 dv_preset; /* HDTV format */ + struct v4l2_dv_timings dv_timings; /* HDTV format */ }; extern const unsigned int vpif_ch_params_count; diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index 266025e..e684c48 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c @@ -551,7 +551,8 @@ static int vpif_update_std_info(struct channel_obj *ch) } } else { vpif_dbg(2,
[PATCH] vpif: replace preset with the timings API.
From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Lad, Prabhakar prabhakar@ti.com Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com --- drivers/media/video/davinci/vpif.c | 16 ++-- drivers/media/video/davinci/vpif.h |4 +- drivers/media/video/davinci/vpif_capture.c | 114 +--- drivers/media/video/davinci/vpif_capture.h |3 +- drivers/media/video/davinci/vpif_display.c | 102 +++-- drivers/media/video/davinci/vpif_display.h |3 +- 6 files changed, 43 insertions(+), 199 deletions(-) diff --git a/drivers/media/video/davinci/vpif.c b/drivers/media/video/davinci/vpif.c index b3637af..b95bff7 100644 --- a/drivers/media/video/davinci/vpif.c +++ b/drivers/media/video/davinci/vpif.c @@ -25,6 +25,8 @@ #include linux/io.h #include linux/clk.h #include linux/err.h +#include linux/v4l2-dv-timings.h + #include mach/hardware.h #include vpif.h @@ -65,7 +67,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_480P59_94, + .dv_timings = V4L2_DV_BT_CEA_720X480P59_94, }, { .name = 576p50, @@ -82,7 +84,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_576P50, + .dv_timings = V4L2_DV_BT_CEA_720X576P50, }, { .name = 720p50, @@ -99,7 +101,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_720P50, + .dv_timings = V4L2_DV_BT_CEA_1280X720P50, }, { .name = 720p60, @@ -116,7 +118,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_720P60, + .dv_timings = V4L2_DV_BT_CEA_1280X720P60, }, { .name = 1080I50, @@ -136,7 +138,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_1080I50, + .dv_timings = V4L2_DV_BT_CEA_1920X1080I50, }, { .name = 1080I60, @@ -156,7 +158,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_1080I60, + .dv_timings = V4L2_DV_BT_CEA_1920X1080I60, }, { .name = 1080p60, @@ -173,7 +175,7 @@ const struct vpif_channel_config_params ch_params[] = { .capture_format = 0, .vbi_supported = 0, .hd_sd = 1, - .dv_preset = V4L2_DV_1080P60, + .dv_timings = V4L2_DV_BT_CEA_1920X1080P60, }, /* SDTV formats */ diff --git a/drivers/media/video/davinci/vpif.h b/drivers/media/video/davinci/vpif.h index c2ce4d9..a1ab6a0 100644 --- a/drivers/media/video/davinci/vpif.h +++ b/drivers/media/video/davinci/vpif.h @@ -533,7 +533,7 @@ static inline void channel2_clipping_enable(int enable) } } -/* function to enable clipping (for both active and blanking regions) on ch 2 */ +/* function to enable clipping (for both active and blanking regions) on ch 3 */ static inline void channel3_clipping_enable(int enable) { if (enable) { @@ -634,7 +634,7 @@ struct vpif_channel_config_params { * supports capturing vbi or not */ u8 hd_sd; /* HDTV (1) or SDTV (0) format */ v4l2_std_id stdid; /* SDTV format */ - u32 dv_preset; /* HDTV format */ + struct v4l2_dv_timings dv_timings; /* HDTV format */ }; extern const unsigned int vpif_ch_params_count; diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index 266025e..e684c48 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c @@ -551,7 +551,8 @@ static int vpif_update_std_info(struct channel_obj *ch) } } else { vpif_dbg(2, debug, HD format\n); - if (config-dv_preset == vid_ch-dv_preset) { + if (!memcmp(config-dv_timings, vid_ch-dv_timings, + sizeof(vid_ch-dv_timings))) { memcpy(std_info, config,