mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] zr36120: implement pcipci checks
@ 2006-09-14 12:55 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2006-09-14 12:55 UTC (permalink / raw)
  To: mchehab, linux-kernel

Again depends on the PCIAGP_FAIL patch for a define. Someone with more
card knowledge should look at the ALIMAGIK case and whether latency can
be safely to set to 0xA or so.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-rc6-mm1/drivers/media/video/zr36120.c linux-2.6.18-rc6-mm1/drivers/media/video/zr36120.c
--- linux.vanilla-2.6.18-rc6-mm1/drivers/media/video/zr36120.c	2006-09-11 11:02:17.000000000 +0100
+++ linux-2.6.18-rc6-mm1/drivers/media/video/zr36120.c	2006-09-13 12:04:33.000000000 +0100
@@ -987,6 +987,8 @@
 			 VID_TYPE_SCALES;
 		if (ztv->have_tuner)
 			c.type |= VID_TYPE_TUNER;
+		if (pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
+			c.type &= ~VID_TYPE_OVERLAY;
 		if (ztv->have_decoder) {
 			c.channels = ztv->card->video_inputs;
 			c.audios = ztv->card->audio_inputs;
@@ -1284,6 +1286,8 @@
 		struct video_buffer v;
 		if(!capable(CAP_SYS_ADMIN))
 			return -EPERM;
+		if (pcipci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
+			return -ENXIO;
 		if (copy_from_user(&v, arg,sizeof(v)))
 			return -EFAULT;
 		DEBUG(printk(CARD_DEBUG "VIDIOCSFBUF(%p,%d,%d,%d,%d)\n",CARD,v.base, v.width,v.height,v.depth,v.bytesperline));


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-14 12:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-14 12:55 [PATCH] zr36120: implement pcipci checks Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®