lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 Oct 2021 20:27:09 +0100
From:   Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To:     unlisted-recipients:; (no To-header on input)
Cc:     linuxarm@...wei.com, mauro.chehab@...wei.com,
        Alan <alan@...ux.intel.com>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
        Tsuchiya Yuto <kitakar@...il.com>,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-staging@...ts.linux.dev
Subject: Re: [PATCH 2/2] media: atomisp: set default mode

Em Fri, 29 Oct 2021 09:49:36 +0100
Mauro Carvalho Chehab <mchehab+huawei@...nel.org> escreveu:

> Without setting a default mode at open(), applications that
> don't call VIDIOC_SET_PARM with a custom atomisp parameters
> won't work, as the pipeline won't be set:
> 
> 	atomisp-isp2 0000:00:03.0: can't create streams
> 	atomisp-isp2 0000:00:03.0: __get_frame_info 1600x1200 (padded to 0) returned -22
> 
> So, as an step to allow generic apps to use this driver, put
> the device's run_mode in preview after open.
> 
> After this patch, using v4l2grab starts to work:
> 
> 	$ v4l2grab -D -f 'NV12' -x 1600 -y 1200 -d /dev/video2 -u
> 	$ nvt/raw2pnm -x1600 -y1200 -f NV12 out017.raw out017.pnm
> 	$ feh out017.pnm

Added support for YUYV at v4l2grab (at contrib/test, under v4l-utils). 
The above can now be just:

	$ v4l2grab -f YUYV  -x 1600 -y 1200 -d /dev/video2 -u
	$ feh out017.pnm

(on a side note, the colorspace conversion from YUYV seems ackward,
but this can be adjusted later on at the toolset and/or at atomisp)

> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> ---
>  drivers/staging/media/atomisp/pci/atomisp_fops.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c
> index 72cbdce2142a..7df982c80b1a 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
> @@ -893,6 +893,11 @@ static int atomisp_open(struct file *file)
>  	else
>  		pipe->users++;
>  	rt_mutex_unlock(&isp->mutex);
> +
> +	/* Ensure that a mode is set */
> +	if (asd)
> +		v4l2_ctrl_s_ctrl(asd->run_mode, ATOMISP_RUN_MODE_PREVIEW);
> +
>  	return 0;
>  
>  css_error:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ