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] [day] [month] [year] [list]
Message-ID: <87613w1sf5.fsf@belgarion.home>
Date:	Sun, 30 Aug 2015 21:34:54 +0200
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Guennadi Liakhovetski <g.liakhovetski@....de>
Cc:	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Jiri Kosina <trivial@...nel.org>,
	Linux Media Mailing List <linux-media@...r.kernel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine

Guennadi Liakhovetski <g.liakhovetski@....de> writes:

>> +	last_buf = list_entry(pcdev->capture.prev,
>> +			      struct pxa_buffer, vb.queue);
>
> You can use list_last_entry()
Ok.

>> +	last_status = dma_async_is_tx_complete(pcdev->dma_chans[chan],
>> +					       last_buf->cookie[chan],
>> +					       NULL, &last_issued);
>> +	if (camera_status & overrun &&
>> +	    last_status != DMA_COMPLETE) {
>> +		dev_dbg(dev, "FIFO overrun! CISR: %x\n",
>> +			camera_status);
>> +		pxa_camera_stop_capture(pcdev);
>> +		list_for_each_entry(buf, &pcdev->capture, vb.queue)
>> +			pxa_dma_add_tail_buf(pcdev, buf);
>
> Why have you added this loop? Is it a bug in the current implementation or 
> is it only needed with the switch to dmaengine?
It's a consequence of the switch.

With dmaengine, a dmaengine_terminate_all() removes all queued txs. It is
therefore necessary to requeue them. In the previous implementation, the
chaining was still good, and it was "enough" to just queue the first
videobuffer : the other buffers would follow by chaining.

Cheers.

-- 
Robert
--
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