public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Hunold <hunold@linuxtv.org>
To: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org,
	hunold@linuxtv.org
Subject: [PATCH 2/9] Update saa7146 driver core
Date: Mon, 23 Feb 2004 16:04:54 -0500	[thread overview]
Message-ID: <10775702813454@convergence.de> (raw)
In-Reply-To: <10775702813893@convergence.de>

- [DVB] saa7146: fix timeout bug on AMD64 in saa7146_wait_for_debi_done()
- [DVB] saa7146: release resources for video overlay properly, don't (incorrectly) rely on VIDIOC_OVERLAY(0)
diff -uNrwB --new-file xx-linux-2.6.3/drivers/media/common/saa7146_core.c linux-2.6.3.p/drivers/media/common/saa7146_core.c
--- xx-linux-2.6.3/drivers/media/common/saa7146_core.c	2004-02-23 12:34:26.000000000 +0100
+++ linux-2.6.3.p/drivers/media/common/saa7146_core.c	2004-02-23 12:52:31.000000000 +0100
@@ -69,14 +69,14 @@
 /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
 int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
 {
-	int start;
+	unsigned long start;
 
 	/* wait for registers to be programmed */
 	start = jiffies;
 	while (1) {
                 if (saa7146_read(dev, MC2) & 2)
                         break;
-		if (jiffies-start > HZ/20) {
+		if (time_after(jiffies, start + HZ/20)) {
 			DEB_S(("timed out while waiting for registers getting programmed\n"));
 			return -ETIMEDOUT;
 		}
@@ -88,7 +88,7 @@
 		if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
 			break;
 		saa7146_read(dev, MC2);
-		if (jiffies-start > HZ/4) {
+		if (time_after(jiffies, start + HZ/4)) {
 			DEB_S(("timed out while waiting for transfer completion\n"));
 			return -ETIMEDOUT;
 		}
diff -uNrwB --new-file xx-linux-2.6.3/drivers/media/common/saa7146_video.c linux-2.6.3.p/drivers/media/common/saa7146_video.c
--- xx-linux-2.6.3/drivers/media/common/saa7146_video.c	2004-02-23 12:34:26.000000000 +0100
+++ linux-2.6.3.p/drivers/media/common/saa7146_video.c	2004-02-02 21:13:12.000000000 +0100
@@ -1413,6 +1419,7 @@
 			spin_lock_irqsave(&dev->slock,flags);
 			saa7146_stop_preview(fh);
 			spin_unlock_irqrestore(&dev->slock,flags);
+			saa7146_res_free(fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP);
 		}
 	}
 	



  reply	other threads:[~2004-02-23 21:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-23 21:04 [PATCH 0/9] LinuxTV.org DVB update Michael Hunold
2004-02-23 21:04 ` [PATCH 1/9] Update the DVB subsystem docs Michael Hunold
2004-02-23 21:04   ` Michael Hunold [this message]
2004-02-23 21:04     ` [PATCH 3/9] Minor DVB Skystar2 updates Michael Hunold
2004-02-23 21:04       ` [PATCH 4/9] DVB core update Michael Hunold
2004-02-23 21:04         ` [PATCH 5/9] Misc. DVB frontend updates Michael Hunold
2004-02-23 21:05           ` [PATCH 6/9] stv0299 DVB frontend update Michael Hunold
2004-02-23 21:05             ` [PATCH 7/9] tda1004x " Michael Hunold
2004-02-23 21:05               ` [PATCH 8/9] av7110 DVB driver update Michael Hunold
2004-02-23 21:05                 ` [PATCH 9/9] TTUSB-Budget " Michael Hunold
2004-02-23 21:18               ` [PATCH 7/9] tda1004x DVB frontend update Christoph Hellwig
2004-02-23 22:47                 ` Michael Hunold
2004-02-23 22:54                   ` Christoph Hellwig
2004-02-23 23:01                     ` Michael Hunold
2004-02-23 22:09               ` Andrew Morton
2004-02-23 22:52                 ` Michael Hunold
2004-02-23 23:11                   ` Andrew Morton
2004-02-23 23:15                   ` Ralph Metzler
2004-02-24 11:34                   ` Marcel Holtmann
2004-02-23 22:23   ` [PATCH 1/9] Update the DVB subsystem docs Richard B. Johnson
2004-02-23 22:57     ` Michael Hunold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10775702813454@convergence.de \
    --to=hunold@linuxtv.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox