Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 810c168c authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] cobalt: accept unchanged timings when vb2_is_busy()



When vb2_is_busy() it should still be possible to call S_DV_TIMINGS
provided the new timings are the same as the current timings.

For input 1 (test generator) the size is always 1080p, so just return
that.

Fixes a v4l2-compliance issue.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent c99235fa
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@


#include <media/v4l2-ctrls.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-event.h>
#include <media/v4l2-dv-timings.h>
#include <media/adv7604.h>
#include <media/adv7604.h>
#include <media/adv7842.h>
#include <media/adv7842.h>


@@ -641,13 +642,17 @@ static int cobalt_s_dv_timings(struct file *file, void *priv_fh,
	struct cobalt_stream *s = video_drvdata(file);
	struct cobalt_stream *s = video_drvdata(file);
	int err;
	int err;


	if (vb2_is_busy(&s->q))
		return -EBUSY;

	if (s->input == 1) {
	if (s->input == 1) {
		*timings = cea1080p60;
		*timings = cea1080p60;
		return 0;
		return 0;
	}
	}

	if (v4l2_match_dv_timings(timings, &s->timings, 0))
		return 0;

	if (vb2_is_busy(&s->q))
		return -EBUSY;

	err = v4l2_subdev_call(s->sd,
	err = v4l2_subdev_call(s->sd,
			video, s_dv_timings, timings);
			video, s_dv_timings, timings);
	if (!err) {
	if (!err) {