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-sensor.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-sensor.c')
-rw-r--r-- | drivers/media/platform/vimc/vimc-sensor.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c index baca9ca67ce0..d70f1a1408f1 100644 --- a/drivers/media/platform/vimc/vimc-sensor.c +++ b/drivers/media/platform/vimc/vimc-sensor.c | |||
@@ -141,7 +141,7 @@ static int vimc_sen_set_fmt(struct v4l2_subdev *sd, | |||
141 | 141 | ||
142 | if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { | 142 | if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { |
143 | /* Do not change the format while stream is on */ | 143 | /* Do not change the format while stream is on */ |
144 | if (vsen->frame) | 144 | if (vsen->ved.stream) |
145 | return -EBUSY; | 145 | return -EBUSY; |
146 | 146 | ||
147 | mf = &vsen->mbus_format; | 147 | mf = &vsen->mbus_format; |
@@ -197,10 +197,6 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable) | |||
197 | const struct v4l2_format_info *pix_info; | 197 | const struct v4l2_format_info *pix_info; |
198 | unsigned int frame_size; | 198 | unsigned int frame_size; |
199 | 199 | ||
200 | if (vsen->kthread_sen) | ||
201 | /* tpg is already executing */ | ||
202 | return 0; | ||
203 | |||
204 | /* Calculate the frame size */ | 200 | /* Calculate the frame size */ |
205 | pix_info = v4l2_format_info(pixelformat); | 201 | pix_info = v4l2_format_info(pixelformat); |
206 | frame_size = vsen->mbus_format.width * pix_info->bpp[0] * | 202 | frame_size = vsen->mbus_format.width * pix_info->bpp[0] * |