From: Hans Verkuil <hverkuil@xs4all.nl>
To: Guillaume Tucker <guillaume.tucker@collabora.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@collabora.com, stable@vger.kernel.org
Subject: Re: [PATCH] media: vivid: fix device init when no_error_inj=1 and fb disabled
Date: Thu, 25 Jul 2019 10:01:07 +0200 [thread overview]
Message-ID: <f17408a7-9fe9-4773-e65e-9b6902b8a3d5@xs4all.nl> (raw)
In-Reply-To: <20190724151922.11124-1-guillaume.tucker@collabora.com>
On 7/24/19 5:19 PM, Guillaume Tucker wrote:
> Add an extra condition to add the video output control class when the
> device has some hdmi outputs defined. This is required to then always
> be able to add the display present control, which is enabled when
> there are some hdmi outputs.
>
> This fixes the corner case where no_error_inj is enabled and the
> device has no frame buffer but some hdmi outputs, as otherwise the
> video output control class would be added anyway. Without this fix,
> the sanity checks fail in v4l2_ctrl_new() as name is NULL.
Good catch.
Note that you can just drop the no_error_inj module option: v4l2-compliance
will detect the vivid driver and skip the error controls while testing.
I stopped using no_error_inj since I made that v4l2-compliance change.
Regards,
Hans
>
> Fixes: c533435ffb91 ("media: vivid: add display present control")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> ---
> drivers/media/platform/vivid/vivid-ctrls.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/vivid/vivid-ctrls.c b/drivers/media/platform/vivid/vivid-ctrls.c
> index 3e916c8befb7..7a52f585cab7 100644
> --- a/drivers/media/platform/vivid/vivid-ctrls.c
> +++ b/drivers/media/platform/vivid/vivid-ctrls.c
> @@ -1473,7 +1473,7 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
> v4l2_ctrl_handler_init(hdl_vid_cap, 55);
> v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_class, NULL);
> v4l2_ctrl_handler_init(hdl_vid_out, 26);
> - if (!no_error_inj || dev->has_fb)
> + if (!no_error_inj || dev->has_fb || dev->num_hdmi_outputs)
> v4l2_ctrl_new_custom(hdl_vid_out, &vivid_ctrl_class, NULL);
> v4l2_ctrl_handler_init(hdl_vbi_cap, 21);
> v4l2_ctrl_new_custom(hdl_vbi_cap, &vivid_ctrl_class, NULL);
>
prev parent reply other threads:[~2019-07-25 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 15:19 Guillaume Tucker
2019-07-25 8:01 ` Hans Verkuil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f17408a7-9fe9-4773-e65e-9b6902b8a3d5@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=guillaume.tucker@collabora.com \
--cc=hans.verkuil@cisco.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®