diff options
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_hsit.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_hsit.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c b/drivers/media/platform/vsp1/vsp1_hsit.c index 0bc0471746c9..8ffb817ae525 100644 --- a/drivers/media/platform/vsp1/vsp1_hsit.c +++ b/drivers/media/platform/vsp1/vsp1_hsit.c | |||
@@ -55,7 +55,7 @@ static int hsit_s_stream(struct v4l2_subdev *subdev, int enable) | |||
55 | */ | 55 | */ |
56 | 56 | ||
57 | static int hsit_enum_mbus_code(struct v4l2_subdev *subdev, | 57 | static int hsit_enum_mbus_code(struct v4l2_subdev *subdev, |
58 | struct v4l2_subdev_fh *fh, | 58 | struct v4l2_subdev_pad_config *cfg, |
59 | struct v4l2_subdev_mbus_code_enum *code) | 59 | struct v4l2_subdev_mbus_code_enum *code) |
60 | { | 60 | { |
61 | struct vsp1_hsit *hsit = to_hsit(subdev); | 61 | struct vsp1_hsit *hsit = to_hsit(subdev); |
@@ -73,12 +73,14 @@ static int hsit_enum_mbus_code(struct v4l2_subdev *subdev, | |||
73 | } | 73 | } |
74 | 74 | ||
75 | static int hsit_enum_frame_size(struct v4l2_subdev *subdev, | 75 | static int hsit_enum_frame_size(struct v4l2_subdev *subdev, |
76 | struct v4l2_subdev_fh *fh, | 76 | struct v4l2_subdev_pad_config *cfg, |
77 | struct v4l2_subdev_frame_size_enum *fse) | 77 | struct v4l2_subdev_frame_size_enum *fse) |
78 | { | 78 | { |
79 | struct vsp1_hsit *hsit = to_hsit(subdev); | ||
79 | struct v4l2_mbus_framefmt *format; | 80 | struct v4l2_mbus_framefmt *format; |
80 | 81 | ||
81 | format = v4l2_subdev_get_try_format(fh, fse->pad); | 82 | format = vsp1_entity_get_pad_format(&hsit->entity, cfg, fse->pad, |
83 | fse->which); | ||
82 | 84 | ||
83 | if (fse->index || fse->code != format->code) | 85 | if (fse->index || fse->code != format->code) |
84 | return -EINVAL; | 86 | return -EINVAL; |
@@ -102,25 +104,25 @@ static int hsit_enum_frame_size(struct v4l2_subdev *subdev, | |||
102 | } | 104 | } |
103 | 105 | ||
104 | static int hsit_get_format(struct v4l2_subdev *subdev, | 106 | static int hsit_get_format(struct v4l2_subdev *subdev, |
105 | struct v4l2_subdev_fh *fh, | 107 | struct v4l2_subdev_pad_config *cfg, |
106 | struct v4l2_subdev_format *fmt) | 108 | struct v4l2_subdev_format *fmt) |
107 | { | 109 | { |
108 | struct vsp1_hsit *hsit = to_hsit(subdev); | 110 | struct vsp1_hsit *hsit = to_hsit(subdev); |
109 | 111 | ||
110 | fmt->format = *vsp1_entity_get_pad_format(&hsit->entity, fh, fmt->pad, | 112 | fmt->format = *vsp1_entity_get_pad_format(&hsit->entity, cfg, fmt->pad, |
111 | fmt->which); | 113 | fmt->which); |
112 | 114 | ||
113 | return 0; | 115 | return 0; |
114 | } | 116 | } |
115 | 117 | ||
116 | static int hsit_set_format(struct v4l2_subdev *subdev, | 118 | static int hsit_set_format(struct v4l2_subdev *subdev, |
117 | struct v4l2_subdev_fh *fh, | 119 | struct v4l2_subdev_pad_config *cfg, |
118 | struct v4l2_subdev_format *fmt) | 120 | struct v4l2_subdev_format *fmt) |
119 | { | 121 | { |
120 | struct vsp1_hsit *hsit = to_hsit(subdev); | 122 | struct vsp1_hsit *hsit = to_hsit(subdev); |
121 | struct v4l2_mbus_framefmt *format; | 123 | struct v4l2_mbus_framefmt *format; |
122 | 124 | ||
123 | format = vsp1_entity_get_pad_format(&hsit->entity, fh, fmt->pad, | 125 | format = vsp1_entity_get_pad_format(&hsit->entity, cfg, fmt->pad, |
124 | fmt->which); | 126 | fmt->which); |
125 | 127 | ||
126 | if (fmt->pad == HSIT_PAD_SOURCE) { | 128 | if (fmt->pad == HSIT_PAD_SOURCE) { |
@@ -143,7 +145,7 @@ static int hsit_set_format(struct v4l2_subdev *subdev, | |||
143 | fmt->format = *format; | 145 | fmt->format = *format; |
144 | 146 | ||
145 | /* Propagate the format to the source pad. */ | 147 | /* Propagate the format to the source pad. */ |
146 | format = vsp1_entity_get_pad_format(&hsit->entity, fh, HSIT_PAD_SOURCE, | 148 | format = vsp1_entity_get_pad_format(&hsit->entity, cfg, HSIT_PAD_SOURCE, |
147 | fmt->which); | 149 | fmt->which); |
148 | *format = fmt->format; | 150 | *format = fmt->format; |
149 | format->code = hsit->inverse ? MEDIA_BUS_FMT_ARGB8888_1X32 | 151 | format->code = hsit->inverse ? MEDIA_BUS_FMT_ARGB8888_1X32 |