diff options
author | André Almeida <andrealmeid@collabora.com> | 2019-05-30 09:19:56 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-05 12:47:08 -0400 |
commit | 3c1b9ac753e99005d7ee0a883d6e5b577ba32aa9 (patch) | |
tree | ab4def1e4d61ac9de2b8c0b8571f69298de9a799 /drivers/media/platform/vimc/vimc-scaler.c | |
parent | 84060c65a8fa14ea9974a8f15b8280517b869cdd (diff) |
media: vimc: Remove or modify stream checks
Change the way subdevices check if the stream is running. Verify the stream
pointer instead of src_frame. This makes easier to get rid of the void* and
u8* that points to frames in the subdevices structs.
Remove checks that s_stream does on subdevices. They are redundant since
the Media Controller Framework doesn't allow two streaming on the same
media pipeline at the same time.
Signed-off-by: André Almeida <andrealmeid@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-scaler.c')
-rw-r--r-- | drivers/media/platform/vimc/vimc-scaler.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c index 8aecf8e92031..617f2920b86b 100644 --- a/drivers/media/platform/vimc/vimc-scaler.c +++ b/drivers/media/platform/vimc/vimc-scaler.c | |||
@@ -158,7 +158,7 @@ static int vimc_sca_set_fmt(struct v4l2_subdev *sd, | |||
158 | 158 | ||
159 | if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { | 159 | if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { |
160 | /* Do not change the format while stream is on */ | 160 | /* Do not change the format while stream is on */ |
161 | if (vsca->src_frame) | 161 | if (vsca->ved.stream) |
162 | return -EBUSY; | 162 | return -EBUSY; |
163 | 163 | ||
164 | sink_fmt = &vsca->sink_fmt; | 164 | sink_fmt = &vsca->sink_fmt; |
@@ -213,9 +213,6 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable) | |||
213 | const struct v4l2_format_info *pix_info; | 213 | const struct v4l2_format_info *pix_info; |
214 | unsigned int frame_size; | 214 | unsigned int frame_size; |
215 | 215 | ||
216 | if (vsca->src_frame) | ||
217 | return 0; | ||
218 | |||
219 | if (!vimc_sca_is_pixfmt_supported(pixelformat)) { | 216 | if (!vimc_sca_is_pixfmt_supported(pixelformat)) { |
220 | dev_err(vsca->dev, "pixfmt (0x%08x) is not supported\n", | 217 | dev_err(vsca->dev, "pixfmt (0x%08x) is not supported\n", |
221 | pixelformat); | 218 | pixelformat); |
@@ -337,7 +334,7 @@ static void *vimc_sca_process_frame(struct vimc_ent_device *ved, | |||
337 | ved); | 334 | ved); |
338 | 335 | ||
339 | /* If the stream in this node is not active, just return */ | 336 | /* If the stream in this node is not active, just return */ |
340 | if (!vsca->src_frame) | 337 | if (!ved->stream) |
341 | return ERR_PTR(-EINVAL); | 338 | return ERR_PTR(-EINVAL); |
342 | 339 | ||
343 | vimc_sca_fill_src_frame(vsca, sink_frame); | 340 | vimc_sca_fill_src_frame(vsca, sink_frame); |