mirror of
https://github.com/adulau/aha.git
synced 2025-01-03 22:53:18 +00:00
V4L/DVB (9190): ivtv: yuv write() error handling tweak
Modifies behaviour of a failed dma write() operation for the yuv device. If the dma transfer for the yuv device fails, the write() operation will now exit immediately. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
26e9a39777
commit
2e668962a5
1 changed files with 8 additions and 7 deletions
|
@ -600,13 +600,14 @@ retry:
|
||||||
since we may get here before the stream has been fully set-up */
|
since we may get here before the stream has been fully set-up */
|
||||||
if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) {
|
if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) {
|
||||||
while (count >= itv->dma_data_req_size) {
|
while (count >= itv->dma_data_req_size) {
|
||||||
if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) {
|
rc = ivtv_yuv_udma_stream_frame(itv, (void __user *)user_buf);
|
||||||
|
|
||||||
|
if (rc < 0)
|
||||||
|
return rc;
|
||||||
|
|
||||||
bytes_written += itv->dma_data_req_size;
|
bytes_written += itv->dma_data_req_size;
|
||||||
user_buf += itv->dma_data_req_size;
|
user_buf += itv->dma_data_req_size;
|
||||||
count -= itv->dma_data_req_size;
|
count -= itv->dma_data_req_size;
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
IVTV_DEBUG_HI_FILE("Wrote %d bytes to %s (%d)\n", bytes_written, s->name, s->q_full.bytesused);
|
IVTV_DEBUG_HI_FILE("Wrote %d bytes to %s (%d)\n", bytes_written, s->name, s->q_full.bytesused);
|
||||||
|
|
Loading…
Reference in a new issue