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]
Message-ID: <30a80568-6da0-2502-3346-a4b900c7f1ce@gmail.com>
Date:   Mon, 23 Jan 2017 18:15:56 -0800
From:   Steve Longerbeam <slongerbeam@...il.com>
To:     Hans Verkuil <hverkuil@...all.nl>, robh+dt@...nel.org,
        mark.rutland@....com, shawnguo@...nel.org, kernel@...gutronix.de,
        fabio.estevam@....com, linux@...linux.org.uk, mchehab@...nel.org,
        nick@...anahar.org, markus.heiser@...marIT.de,
        p.zabel@...gutronix.de, laurent.pinchart+renesas@...asonboard.com,
        bparrot@...com, geert@...ux-m68k.org, arnd@...db.de,
        sudipm.mukherjee@...il.com, minghsiu.tsai@...iatek.com,
        tiffany.lin@...iatek.com, jean-christophe.trotin@...com,
        horms+renesas@...ge.net.au, niklas.soderlund+renesas@...natech.se,
        robert.jarzmik@...e.fr, songjun.wu@...rochip.com,
        andrew-ct.chen@...iatek.com, gregkh@...uxfoundation.org
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org,
        devel@...verdev.osuosl.org,
        Steve Longerbeam <steve_longerbeam@...tor.com>
Subject: Re: [PATCH v3 20/24] media: imx: Add Camera Interface subdev driver



On 01/20/2017 06:38 AM, Hans Verkuil wrote:
> On 01/07/2017 03:11 AM, Steve Longerbeam wrote:
>> +static int vidioc_querycap(struct file *file, void *fh,
>> +			   struct v4l2_capability *cap)
>> +{
>> +	strncpy(cap->driver, "imx-media-camif", sizeof(cap->driver) - 1);
>> +	strncpy(cap->card, "imx-media-camif", sizeof(cap->card) - 1);
>> +	cap->bus_info[0] = 0;
> Should be set to something like 'platform:imx-media-camif'. v4l2-compliance should
> complain about this.

Right, I've fixed this already as part of v4l2-compliance testing.

>
>> +	cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
>> +	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
> Set device_caps in struct video_device, then drop these two lines since
> the core will set these up based on the device_caps field in struct video_device.

done.

>
>> +
>> +static int camif_enum_input(struct file *file, void *fh,
>> +			    struct v4l2_input *input)
>> +{
>> +	struct camif_priv *priv = video_drvdata(file);
>> +	struct imx_media_subdev *sensor;
>> +	int index = input->index;
>> +
>> +	sensor = imx_media_find_sensor(priv->md, &priv->sd.entity);
>> +	if (IS_ERR(sensor)) {
>> +		v4l2_err(&priv->sd, "no sensor attached\n");
>> +		return PTR_ERR(sensor);
>> +	}
>> +
>> +	if (index >= sensor->input.num)
>> +		return -EINVAL;
>> +
>> +	input->type = V4L2_INPUT_TYPE_CAMERA;
>> +	strncpy(input->name, sensor->input.name[index], sizeof(input->name));
>> +
>> +	if (index == priv->current_input) {
>> +		v4l2_subdev_call(sensor->sd, video, g_input_status,
>> +				 &input->status);
>> +		v4l2_subdev_call(sensor->sd, video, querystd, &input->std);
> Wrong op, use g_tvnorms instead.

done.


Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ