Commit ef2d41b1 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS

Remove VPBE_ENC_DV_PRESET (the DV_PRESET API is no longer supported) and
VPBE_ENC_CUSTOM_TIMINGS is renamed to VPBE_ENC_DV_TIMINGS since the old
"CUSTOM_TIMINGS" name is deprecated in favor of "DV_TIMINGS".
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4bd3bb71
...@@ -649,7 +649,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { ...@@ -649,7 +649,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = {
static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
{ {
.name = "480p59_94", .name = "480p59_94",
.timings_type = VPBE_ENC_CUSTOM_TIMINGS, .timings_type = VPBE_ENC_DV_TIMINGS,
.dv_timings = V4L2_DV_BT_CEA_720X480P59_94, .dv_timings = V4L2_DV_BT_CEA_720X480P59_94,
.interlaced = 0, .interlaced = 0,
.xres = 720, .xres = 720,
...@@ -661,7 +661,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { ...@@ -661,7 +661,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
}, },
{ {
.name = "576p50", .name = "576p50",
.timings_type = VPBE_ENC_CUSTOM_TIMINGS, .timings_type = VPBE_ENC_DV_TIMINGS,
.dv_timings = V4L2_DV_BT_CEA_720X576P50, .dv_timings = V4L2_DV_BT_CEA_720X576P50,
.interlaced = 0, .interlaced = 0,
.xres = 720, .xres = 720,
......
...@@ -706,7 +706,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, ...@@ -706,7 +706,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
v |= DM644X_VPSS_DACCLKEN; v |= DM644X_VPSS_DACCLKEN;
writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
break; break;
case VPBE_ENC_CUSTOM_TIMINGS: case VPBE_ENC_DV_TIMINGS:
if (pclock <= 27000000) { if (pclock <= 27000000) {
v |= DM644X_VPSS_DACCLKEN; v |= DM644X_VPSS_DACCLKEN;
writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
......
...@@ -344,7 +344,7 @@ static int vpbe_s_dv_timings(struct vpbe_device *vpbe_dev, ...@@ -344,7 +344,7 @@ static int vpbe_s_dv_timings(struct vpbe_device *vpbe_dev,
return -EINVAL; return -EINVAL;
for (i = 0; i < output->num_modes; i++) { for (i = 0; i < output->num_modes; i++) {
if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS && if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS &&
!memcmp(&output->modes[i].dv_timings, !memcmp(&output->modes[i].dv_timings,
dv_timings, sizeof(*dv_timings))) dv_timings, sizeof(*dv_timings)))
break; break;
...@@ -385,7 +385,7 @@ static int vpbe_g_dv_timings(struct vpbe_device *vpbe_dev, ...@@ -385,7 +385,7 @@ static int vpbe_g_dv_timings(struct vpbe_device *vpbe_dev,
struct v4l2_dv_timings *dv_timings) struct v4l2_dv_timings *dv_timings)
{ {
if (vpbe_dev->current_timings.timings_type & if (vpbe_dev->current_timings.timings_type &
VPBE_ENC_CUSTOM_TIMINGS) { VPBE_ENC_DV_TIMINGS) {
*dv_timings = vpbe_dev->current_timings.dv_timings; *dv_timings = vpbe_dev->current_timings.dv_timings;
return 0; return 0;
} }
...@@ -412,7 +412,7 @@ static int vpbe_enum_dv_timings(struct vpbe_device *vpbe_dev, ...@@ -412,7 +412,7 @@ static int vpbe_enum_dv_timings(struct vpbe_device *vpbe_dev,
return -EINVAL; return -EINVAL;
for (i = 0; i < output->num_modes; i++) { for (i = 0; i < output->num_modes; i++) {
if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS) { if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS) {
if (j == timings->index) if (j == timings->index)
break; break;
j++; j++;
...@@ -515,7 +515,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev, ...@@ -515,7 +515,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev,
return vpbe_s_std(vpbe_dev, return vpbe_s_std(vpbe_dev,
&preset_mode->std_id); &preset_mode->std_id);
if (preset_mode->timings_type & if (preset_mode->timings_type &
VPBE_ENC_CUSTOM_TIMINGS) { VPBE_ENC_DV_TIMINGS) {
dv_timings = dv_timings =
preset_mode->dv_timings; preset_mode->dv_timings;
return vpbe_s_dv_timings(vpbe_dev, &dv_timings); return vpbe_s_dv_timings(vpbe_dev, &dv_timings);
......
...@@ -1202,7 +1202,7 @@ vpbe_display_g_dv_timings(struct file *file, void *priv, ...@@ -1202,7 +1202,7 @@ vpbe_display_g_dv_timings(struct file *file, void *priv,
/* Get the given standard in the encoder */ /* Get the given standard in the encoder */
if (vpbe_dev->current_timings.timings_type & if (vpbe_dev->current_timings.timings_type &
VPBE_ENC_CUSTOM_TIMINGS) { VPBE_ENC_DV_TIMINGS) {
*dv_timings = vpbe_dev->current_timings.dv_timings; *dv_timings = vpbe_dev->current_timings.dv_timings;
} else { } else {
return -EINVAL; return -EINVAL;
......
...@@ -313,7 +313,7 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd) ...@@ -313,7 +313,7 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd)
return -EINVAL; return -EINVAL;
/* Setup clock at VPSS & VENC for SD */ /* Setup clock at VPSS & VENC for SD */
if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0) if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
return -EINVAL; return -EINVAL;
venc_enabledigitaloutput(sd, 0); venc_enabledigitaloutput(sd, 0);
...@@ -360,7 +360,7 @@ static int venc_set_576p50(struct v4l2_subdev *sd) ...@@ -360,7 +360,7 @@ static int venc_set_576p50(struct v4l2_subdev *sd)
venc->venc_type != VPBE_VERSION_2) venc->venc_type != VPBE_VERSION_2)
return -EINVAL; return -EINVAL;
/* Setup clock at VPSS & VENC for SD */ /* Setup clock at VPSS & VENC for SD */
if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0) if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
return -EINVAL; return -EINVAL;
venc_enabledigitaloutput(sd, 0); venc_enabledigitaloutput(sd, 0);
...@@ -400,7 +400,7 @@ static int venc_set_720p60_internal(struct v4l2_subdev *sd) ...@@ -400,7 +400,7 @@ static int venc_set_720p60_internal(struct v4l2_subdev *sd)
struct venc_state *venc = to_state(sd); struct venc_state *venc = to_state(sd);
struct venc_platform_data *pdata = venc->pdata; struct venc_platform_data *pdata = venc->pdata;
if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0) if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
return -EINVAL; return -EINVAL;
venc_enabledigitaloutput(sd, 0); venc_enabledigitaloutput(sd, 0);
...@@ -428,7 +428,7 @@ static int venc_set_1080i30_internal(struct v4l2_subdev *sd) ...@@ -428,7 +428,7 @@ static int venc_set_1080i30_internal(struct v4l2_subdev *sd)
struct venc_state *venc = to_state(sd); struct venc_state *venc = to_state(sd);
struct venc_platform_data *pdata = venc->pdata; struct venc_platform_data *pdata = venc->pdata;
if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0) if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
return -EINVAL; return -EINVAL;
venc_enabledigitaloutput(sd, 0); venc_enabledigitaloutput(sd, 0);
......
...@@ -26,8 +26,7 @@ enum vpbe_version { ...@@ -26,8 +26,7 @@ enum vpbe_version {
/* vpbe_timing_type - Timing types used in vpbe device */ /* vpbe_timing_type - Timing types used in vpbe device */
enum vpbe_enc_timings_type { enum vpbe_enc_timings_type {
VPBE_ENC_STD = 0x1, VPBE_ENC_STD = 0x1,
VPBE_ENC_DV_PRESET = 0x2, VPBE_ENC_DV_TIMINGS = 0x4,
VPBE_ENC_CUSTOM_TIMINGS = 0x4,
/* Used when set timings through FB device interface */ /* Used when set timings through FB device interface */
VPBE_ENC_TIMINGS_INVALID = 0x8, VPBE_ENC_TIMINGS_INVALID = 0x8,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment