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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+V-a8sB_1DD63ch=VOp3iu6m73wKF+HUCqs+PR0y7LV+NKnOQ@mail.gmail.com>
Date:	Wed, 21 Jan 2015 11:28:16 +0000
From:	"Lad, Prabhakar" <prabhakar.csengg@...il.com>
To:	Scott Jiang <scott.jiang.linux@...il.com>
Cc:	LMML <linux-media@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	adi-buildroot-devel@...ts.sourceforge.net,
	Mauro Carvalho Chehab <m.chehab@...sung.com>
Subject: Re: [PATCH 08/15] media: blackfin: bfin_capture: use vb2_ioctl_* helpers

On Wed, Jan 21, 2015 at 10:55 AM, Scott Jiang
<scott.jiang.linux@...il.com> wrote:
> 2014-12-20 18:47 GMT+08:00 Lad, Prabhakar <prabhakar.csengg@...il.com>:
>> this patch adds support to vb2_ioctl_* helpers.
>>
>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
>> ---
>>  drivers/media/platform/blackfin/bfin_capture.c | 107 +++++--------------------
>>  1 file changed, 22 insertions(+), 85 deletions(-)
>>
>> diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
>> index 30f1fe0..80a0efc 100644
>> --- a/drivers/media/platform/blackfin/bfin_capture.c
>> +++ b/drivers/media/platform/blackfin/bfin_capture.c
>> @@ -272,15 +272,28 @@ static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count)
>>         struct ppi_if *ppi = bcap_dev->ppi;
>>         struct bcap_buffer *buf, *tmp;
>>         struct ppi_params params;
>> +       dma_addr_t addr;
>>         int ret;
>>
>>         /* enable streamon on the sub device */
>>         ret = v4l2_subdev_call(bcap_dev->sd, video, s_stream, 1);
>>         if (ret && (ret != -ENOIOCTLCMD)) {
>>                 v4l2_err(&bcap_dev->v4l2_dev, "stream on failed in subdev\n");
>> +               bcap_dev->cur_frm = NULL;
>>                 goto err;
>>         }
>>
>> +       /* get the next frame from the dma queue */
>> +       bcap_dev->cur_frm = list_entry(bcap_dev->dma_queue.next,
>> +                                       struct bcap_buffer, list);
>> +       /* remove buffer from the dma queue */
>> +       list_del_init(&bcap_dev->cur_frm->list);
>> +       addr = vb2_dma_contig_plane_dma_addr(&bcap_dev->cur_frm->vb, 0);
>> +       /* update DMA address */
>> +       ppi->ops->update_addr(ppi, (unsigned long)addr);
>> +       /* enable ppi */
>> +       ppi->ops->start(ppi);
>> +
>
> Absolutely wrong here. You can't start ppi before you set ppi params.
> In fact  vb2_streamon() is called before this in bcap_streamon().

Agreed need to move the  ppi->ops->start(ppi); call after
ret = ppi->ops->set_params(ppi, &params); that should fix it.

Thanks,
--Prabhakar Lad
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ