diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-31 06:51:18 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-25 11:41:00 -0400 |
commit | 5908e3ad19cdf68c241bc450952b59cdf5c3c387 (patch) | |
tree | ee899333fe833c0bdc5d7080f703f07b52c0400e /drivers/media/platform/s5p-tv | |
parent | c916194cafa2787a42fe3609386f4ed6f65b23a8 (diff) |
[media] s5p-tv: hdmi: Add pad-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated.
Implement the pad-level version of those operations to prepare for the
removal of the video version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/s5p-tv')
-rw-r--r-- | drivers/media/platform/s5p-tv/hdmi_drv.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c index 534722c04ec5..3db496cf65fb 100644 --- a/drivers/media/platform/s5p-tv/hdmi_drv.c +++ b/drivers/media/platform/s5p-tv/hdmi_drv.c | |||
@@ -674,6 +674,8 @@ static int hdmi_g_mbus_fmt(struct v4l2_subdev *sd, | |||
674 | static int hdmi_enum_dv_timings(struct v4l2_subdev *sd, | 674 | static int hdmi_enum_dv_timings(struct v4l2_subdev *sd, |
675 | struct v4l2_enum_dv_timings *timings) | 675 | struct v4l2_enum_dv_timings *timings) |
676 | { | 676 | { |
677 | if (timings->pad != 0) | ||
678 | return -EINVAL; | ||
677 | if (timings->index >= ARRAY_SIZE(hdmi_timings)) | 679 | if (timings->index >= ARRAY_SIZE(hdmi_timings)) |
678 | return -EINVAL; | 680 | return -EINVAL; |
679 | timings->timings = hdmi_timings[timings->index].dv_timings; | 681 | timings->timings = hdmi_timings[timings->index].dv_timings; |
@@ -687,6 +689,9 @@ static int hdmi_dv_timings_cap(struct v4l2_subdev *sd, | |||
687 | { | 689 | { |
688 | struct hdmi_device *hdev = sd_to_hdmi_dev(sd); | 690 | struct hdmi_device *hdev = sd_to_hdmi_dev(sd); |
689 | 691 | ||
692 | if (cap->pad != 0) | ||
693 | return -EINVAL; | ||
694 | |||
690 | /* Let the phy fill in the pixelclock range */ | 695 | /* Let the phy fill in the pixelclock range */ |
691 | v4l2_subdev_call(hdev->phy_sd, video, dv_timings_cap, cap); | 696 | v4l2_subdev_call(hdev->phy_sd, video, dv_timings_cap, cap); |
692 | cap->type = V4L2_DV_BT_656_1120; | 697 | cap->type = V4L2_DV_BT_656_1120; |
@@ -713,6 +718,11 @@ static const struct v4l2_subdev_video_ops hdmi_sd_video_ops = { | |||
713 | .s_stream = hdmi_s_stream, | 718 | .s_stream = hdmi_s_stream, |
714 | }; | 719 | }; |
715 | 720 | ||
721 | static const struct v4l2_subdev_pad_ops hdmi_sd_pad_ops = { | ||
722 | .enum_dv_timings = hdmi_enum_dv_timings, | ||
723 | .dv_timings_cap = hdmi_dv_timings_cap, | ||
724 | }; | ||
725 | |||
716 | static const struct v4l2_subdev_ops hdmi_sd_ops = { | 726 | static const struct v4l2_subdev_ops hdmi_sd_ops = { |
717 | .core = &hdmi_sd_core_ops, | 727 | .core = &hdmi_sd_core_ops, |
718 | .video = &hdmi_sd_video_ops, | 728 | .video = &hdmi_sd_video_ops, |