Changelog | 40 Makefile.in | 139 README | 16 aclocal.m4 | 560 ++- configure | 8225 ++++++++++++++++++++++++++++-------------------------- configure.ac | 8 src/Imakefile | 17 src/Makefile.am | 19 src/Makefile.in | 203 - src/TODO | 12 src/ivtv.c | 741 ++++ src/ivtv.h | 57 src/ivtv_compat.h | 128 src/ivtv_hw.c | 900 +++++ src/ivtv_hw.h | 132 src/ivtv_xv.c | 217 - src/ivtv_xv.h | 33 src/ivtvcompat.h | 77 src/ivtvdev.c | 726 ---- src/ivtvdev.h | 27 src/ivtvhw.c | 922 ------ src/ivtvhw.h | 108 22 files changed, 6995 insertions(+), 6312 deletions(-)
New commits: commit 4045de03e540d6dff52486212e123fa1e6bd4271 Author: hverkuil <[EMAIL PROTECTED]> Date: Tue Aug 28 08:37:51 2007 +0000 Add copyright Matthias (hope I've got this right) git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/ivtv.c b/src/ivtv.c index 26a57d1..ed5be5b 100644 --- a/src/ivtv.c +++ b/src/ivtv.c @@ -3,6 +3,7 @@ X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display using the ivtvfb framebuffer driver. +Copyright (C) 2004 Matthias Badaire Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> diff --git a/src/ivtv.h b/src/ivtv.h index de953e0..af89615 100644 --- a/src/ivtv.h +++ b/src/ivtv.h @@ -2,6 +2,8 @@ X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display using the ivtvfb framebuffer driver. +Copyright (C) 2004 Matthias Badaire +Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c index 54fa066..08f1a76 100644 --- a/src/ivtv_hw.c +++ b/src/ivtv_hw.c @@ -2,6 +2,7 @@ X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display using the ivtvfb framebuffer driver. +Copyright (C) 2004 Matthias Badaire Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> diff --git a/src/ivtv_hw.h b/src/ivtv_hw.h index 571d860..a7d0170 100644 --- a/src/ivtv_hw.h +++ b/src/ivtv_hw.h @@ -2,6 +2,7 @@ X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display using the ivtvfb framebuffer driver. +Copyright (C) 2004 Matthias Badaire Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> diff --git a/src/ivtv_xv.c b/src/ivtv_xv.c index bf36962..1a16e69 100644 --- a/src/ivtv_xv.c +++ b/src/ivtv_xv.c @@ -2,6 +2,7 @@ X Video Extension support for ivtv_drv. Based on s3virge xv code from XFree86 +Copyright (C) 2004 Matthias Badaire Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> commit 8e3f1dcaf0e7c76a8c80eccbdd5cd2f17477da48 Author: hverkuil <[EMAIL PROTECTED]> Date: Tue Aug 28 08:17:36 2007 +0000 Put in correct licenses and (hopefully) correct copyrights. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/ivtv.c b/src/ivtv.c index 1ac7443..26a57d1 100644 --- a/src/ivtv.c +++ b/src/ivtv.c @@ -1,7 +1,32 @@ /* - * Authors: Alan Hourihane, <[EMAIL PROTECTED]> - * Michel D�nzer, <[EMAIL PROTECTED]> - */ + +X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display +using the ivtvfb framebuffer driver. + +Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> +Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. +*/ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/src/ivtv.h b/src/ivtv.h index 9ec8764..de953e0 100644 --- a/src/ivtv.h +++ b/src/ivtv.h @@ -1,3 +1,31 @@ +/* +X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display +using the ivtvfb framebuffer driver. + +Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. +*/ + #ifndef _IVTV_H_ #define _IVTV_H_ diff --git a/src/ivtv_compat.h b/src/ivtv_compat.h index 20a281d..0c9faa5 100644 --- a/src/ivtv_compat.h +++ b/src/ivtv_compat.h @@ -1,9 +1,33 @@ +/* +Allows the IVTV X driver to be built to support both the old & new API. -/* Allows the IVTV X driver to be built to support both the old & new API. +As long as you have valid ivtv.h & videodev2.h files installed from +ivtv 0.7 / linux 2.6.18 or later, this header will allow the driver +to build for both the old & new API. - As long as you have valid ivtv.h & videodev2.h files installed from - ivtv 0.7 / linux 2.6.18 or later, this header will allow the driver - to build for both the old & new API. +Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> +Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. */ #ifndef _IVTVCOMPAT_H_ diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c index e38478c..54fa066 100644 --- a/src/ivtv_hw.c +++ b/src/ivtv_hw.c @@ -1,3 +1,32 @@ +/* +X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display +using the ivtvfb framebuffer driver. + +Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> +Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. +*/ + #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/src/ivtv_hw.h b/src/ivtv_hw.h index cf3e0df..571d860 100644 --- a/src/ivtv_hw.h +++ b/src/ivtv_hw.h @@ -1,3 +1,32 @@ +/* +X11 video driver for the Conexant 23415 MPEG encoder/decoder On-Screen Display +using the ivtvfb framebuffer driver. + +Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> +Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. +*/ + #ifndef _IVTV_HW_H_ #define _IVTV_HW_H_ diff --git a/src/ivtv_xv.c b/src/ivtv_xv.c index 7f5c0e0..bf36962 100644 --- a/src/ivtv_xv.c +++ b/src/ivtv_xv.c @@ -1,6 +1,9 @@ -/* Based on s3virge xv code from XFree86 */ /* -Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved. +X Video Extension support for ivtv_drv. +Based on s3virge xv code from XFree86 + +Copyright (C) 2004-2007 John P. Harvey <[EMAIL PROTECTED]> +Copyright (C) 2006-2007 Ian Armstrong <[EMAIL PROTECTED]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -24,23 +27,6 @@ be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project. */ -/* - * s3v_xv.c - * X Video Extension support - * - * S3 ViRGE driver - * - * 7/2000 Kevin Brosius - * - * Useful references: - * X Video extension support -> xc/programs/hw/xfree86/common/xf86xv.c - * - */ - -/* - * I N C L U D E S - */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -59,7 +45,6 @@ in this Software without prior written authorization from the XFree86 Project. #include "fourcc.h" #include "regionstr.h" -#define IVTV_MAX_PORTS 1 #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) #if !defined(XvExtension) || !defined(IVTV_IOC_DMA_FRAME) @@ -236,7 +221,7 @@ IVTVAllocAdaptor(ScreenPtr pScreen) if (!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn))) return NULL; - if (!(pPriv = xcalloc(1, sizeof(DevUnion) * IVTV_MAX_PORTS))) { + if (!(pPriv = xcalloc(1, sizeof(DevUnion)))) { xfree(adapt); return NULL; } diff --git a/src/ivtv_xv.h b/src/ivtv_xv.h index c36b538..db99e57 100644 --- a/src/ivtv_xv.h +++ b/src/ivtv_xv.h @@ -1,3 +1,30 @@ +/* +X Video Extension support for ivtv_drv. + +Copyright (C) 2007 Hans Verkuil <[EMAIL PROTECTED]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. +*/ + #ifndef _IVTV_XV_H_ #define _IVTV_XV_H_ commit 25ab01ce589ab49f527c05df6b853bbdeffbc329 Author: hverkuil <[EMAIL PROTECTED]> Date: Mon Aug 27 15:08:53 2007 +0000 Fix from Ian Armstrong fixing the bug I managed to introduce in the Imakefile. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/Imakefile b/src/Imakefile index cd976f5..6586c7b 100644 --- a/src/Imakefile +++ b/src/Imakefile @@ -33,7 +33,7 @@ DEFREGIONNULL = -DX_USE_REGION_NULL XCOMM We are using X.org DEFREGIONNULL = -DX_USE_REGION_NULL #endif -DEFINES = IvtvDefines $(DEFREGIONNULL) +DEFINES = FbdevDefines $(DEFREGIONNULL) #if MakeHasPosixVariableSubstitutions SubdirLibraryRule($(OBJS)) commit 3d78da6f67f2562d62ae715c379c160f33745fe6 Author: hverkuil <[EMAIL PROTECTED]> Date: Mon Aug 27 09:39:26 2007 +0000 Add info on how to install the xorg-server-sdk package. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/README b/README index 10311d7..323f3df 100644 --- a/README +++ b/README @@ -1,9 +1,16 @@ Xorg 7.x Servers -=========== +================ For new 7.x servers run the configure script followed by make and then make install. The installation path may well need to be altered using the --prefix option. +If you get this error when running the configure script: + +checking for XORG... configure: error: Package requirements (xorg-server >= 1.0.99.901 xproto fontsproto ) were not met. + +then it is likely that you are missing the xorg-server development +package. For Fedora this package is called 'xorg-x11-server-sdk'. + Xorg 6.x & Xfree86 servers ========================== @@ -16,3 +23,4 @@ Then copy the ivtv_drv.so file into the appropriate location. Note: this driver used to be called ivtvdev_drv.so but the name was changed starting with version 1.0.0 to be consistent with existing X11 video drivers. + commit 87a8054a30b25af5f814a702cbcea664e6b17ae4 Author: hverkuil <[EMAIL PROTECTED]> Date: Mon Aug 27 06:56:00 2007 +0000 Fix 64-bit compile problem. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c index b71c9db..e38478c 100644 --- a/src/ivtv_hw.c +++ b/src/ivtv_hw.c @@ -30,9 +30,6 @@ # define TRACE_ENTER(str) #endif -# include <fcntl.h> -# include <errno.h> - /* -------------------------------------------------------------------- */ /* our private data, and two functions to allocate/free this */ commit 8024eb309e901dd255154811ad9c141b2de11391 Author: hverkuil <[EMAIL PROTECTED]> Date: Sun Aug 26 20:32:39 2007 +0000 Removed some dead code. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c index 9af9c10..b71c9db 100644 --- a/src/ivtv_hw.c +++ b/src/ivtv_hw.c @@ -30,33 +30,8 @@ # define TRACE_ENTER(str) #endif -/* -------------------------------------------------------------------- */ - -#ifdef XFree86LOADER - -static pointer -ivtvhwSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - const char *osname; - - /* Check that we're being loaded on a Linux system */ - LoaderGetOS(&osname, NULL, NULL, NULL); - if (!osname || strcmp(osname, "linux") != 0) { - if (errmaj) - *errmaj = LDR_BADOS; - if (errmin) - *errmin = 0; - return NULL; - } else { - /* OK */ - return (pointer) 1; - } -} - -#else # include <fcntl.h> # include <errno.h> -#endif /* XFree86LOADER */ /* -------------------------------------------------------------------- */ /* our private data, and two functions to allocate/free this */ @@ -437,16 +412,6 @@ ivtvHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp) } int -ivtvHWGetLineLength(ScrnInfoPtr pScrn) -{ - ivtvHWPtr hwPtr = IVTVDEVHWPTR(pScrn); - - if (hwPtr->fix.line_length) - return hwPtr->fix.line_length; - return hwPtr->var.xres_virtual * hwPtr->var.bits_per_pixel / 8; -} - -int ivtvHWGetType(ScrnInfoPtr pScrn) { ivtvHWPtr hwPtr = IVTVDEVHWPTR(pScrn); @@ -535,14 +500,6 @@ ivtvHWSetVideoModes(ScrnInfoPtr pScrn) devPtr->shadow_height = virtY; } -DisplayModePtr -ivtvHWGetBuildinMode(ScrnInfoPtr pScrn) -{ - ivtvHWPtr hwPtr = IVTVDEVHWPTR(pScrn); - - return &hwPtr->buildin; -} - void ivtvHWUseBuildinMode(ScrnInfoPtr pScrn) { @@ -801,7 +758,7 @@ ivtvHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags) return; } -#ifdef JOHN +#ifdef USE_BLANK if (-1 == ioctl(IVTVDEVHWPTR(pScrn)->fd, FBIOBLANK, (void *)fbmode)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOBLANK: %s\n", strerror(errno)); @@ -819,7 +776,7 @@ ivtvHWSaveScreen(ScreenPtr pScreen, int mode) unblank = xf86IsUnblank(mode); -#ifdef JOHN +#ifdef USE_BLANK if (-1 == ioctl(IVTVDEVHWPTR(pScrn)->fd, FBIOBLANK, (void *)(1 - unblank))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOBLANK: %s\n", strerror(errno)); diff --git a/src/ivtv_xv.c b/src/ivtv_xv.c index ed14202..7f5c0e0 100644 --- a/src/ivtv_xv.c +++ b/src/ivtv_xv.c @@ -718,13 +718,6 @@ IVTVPutImage(ScrnInfoPtr pScrn, struct ivtvyuv_ioctl_dma_host_to_ivtv_args legacy_args; int ret; -#ifdef JOHN - ErrorF("src_w %d src_h %d drw_w %d drw_h %d width %d height %d\n", - src_w, src_h, drw_w, drw_h, width, height); - ErrorF("src_x %d src_y %d drw_x %d drw_y %d width %d height %d\n", - src_x, src_y, drw_x, drw_y, width, height); -#endif - switch (id) { case FOURCC_YV12: commit 609bb7b03e1a741c7891155c41c999ef5c3b4998 Author: hverkuil <[EMAIL PROTECTED]> Date: Sun Aug 26 20:28:44 2007 +0000 Fix breakage. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c index fc0b238..9af9c10 100644 --- a/src/ivtv_hw.c +++ b/src/ivtv_hw.c @@ -229,7 +229,7 @@ ivtv_open(int scrnIndex, char *dev, char **namep, ivtvHWPtr hwPtr) } if (fd == -1 || hwPtr == NULL) - return -1; + return fd; devid = dev + 7; @@ -259,9 +259,10 @@ ivtv_open(int scrnIndex, char *dev, char **namep, ivtvHWPtr hwPtr) if (yuvFd == -1) { xf86DrvMsg(scrnIndex, X_ERROR, "Unable to open yuv device '%s'\n", yuvDevFull); - continue; } } + if (yuvFd == -1) + continue; memset(&vcap, 0, sizeof(vcap)); if (ioctl(yuvFd, VIDIOC_QUERYCAP, &vcap) < 0) { commit 68eed5e03b2de8e1d66ab09b39ee304bc91e9629 Author: hverkuil <[EMAIL PROTECTED]> Date: Sun Aug 26 19:08:29 2007 +0000 Oops, shouldn't have renamed that option. Reverted that change. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/ivtv.c b/src/ivtv.c index 4b75351..1ac7443 100644 --- a/src/ivtv.c +++ b/src/ivtv.c @@ -325,7 +325,7 @@ IVTVDevProbe(DriverPtr drv, int flags) for (i = 0; i < numUsed; i++) { ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0); - dev = xf86FindOptionValue(devSections[i]->options, "ivtv"); + dev = xf86FindOptionValue(devSections[i]->options, "fbdev"); if (!ivtvHWProbe(NULL, dev, NULL)) continue; @@ -396,7 +396,7 @@ IVTVDevPreInit(ScrnInfoPtr pScrn, int flags) /* open device */ if (!ivtvHWInit(pScrn, NULL, - xf86FindOptionValue(devPtr->pEnt->device->options, "ivtv"))) + xf86FindOptionValue(devPtr->pEnt->device->options, "fbdev"))) return FALSE; default_depth = ivtvHWGetDepth(pScrn, &fbbpp); if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp, 0)) commit 89a3eeddb3f40ad2c6857e8e755953729e7109f3 Author: hverkuil <[EMAIL PROTECTED]> Date: Sun Aug 26 11:59:34 2007 +0000 Update README. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/README b/README index 13fc4a1..10311d7 100644 --- a/README +++ b/README @@ -11,4 +11,8 @@ cd src xmkmf {path to Xserver xc directory} make -Then copy the ivtvdev_drv.so file into the appropriate location. +Then copy the ivtv_drv.so file into the appropriate location. + +Note: this driver used to be called ivtvdev_drv.so but the name was +changed starting with version 1.0.0 to be consistent with existing +X11 video drivers. commit d4dc4e0b9e0821f45a064842e9a72ba31ec38382 Author: hverkuil <[EMAIL PROTECTED]> Date: Sun Aug 26 11:55:59 2007 +0000 Re-added Imakefile for X11R6 support. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/Imakefile b/src/Imakefile new file mode 100644 index 0000000..cd976f5 --- /dev/null +++ b/src/Imakefile @@ -0,0 +1,54 @@ +XCOMM +XCOMM This is an Imakefile for the ivtv driver. +XCOMM +#undef DefaultCCOptions +#define DefaultCCOptions +#define IHaveModules +#include <Server.tmpl> + +SRCS = ivtv.c ivtv_hw.c ivtv_xv.c +OBJS = ivtv.o ivtv_hw.o ivtv_xv.o + +#if defined(XF86DriverSDK) +INCLUDES = -I. -I../../include +#else +INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \ + -I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi \ + -I$(SERVERSRC)/fb -I$(XF86SRC)/xaa \ + -I$(XF86SRC)/fbdevhw -I$(XF86SRC)/ramdac \ + -I$(XF86SRC)/ddc -I$(XF86SRC)/i2c \ + -I$(XF86SRC)/rac \ + -I$(SERVERSRC)/Xext -I$(XF86SRC)/xf24_32bpp\ + -I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/miext/shadow -I$(EXTINCSRC) -I$(SERVERSRC)/render +#endif +#ifdef XF86_VERSION_CURRENT +XCOMM We are using Xfree86 + +#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,99,16,0) +DEFREGIONNULL = -DX_USE_REGION_NULL +#endif + +#else +XCOMM We are using X.org +DEFREGIONNULL = -DX_USE_REGION_NULL +#endif +DEFINES = IvtvDefines $(DEFREGIONNULL) + +#if MakeHasPosixVariableSubstitutions +SubdirLibraryRule($(OBJS)) +#endif + +ModuleObjectRule() + +ObjectModuleTarget(ivtv,$(OBJS)) + +InstallObjectModule(ivtv,$(MODULEDIR),drivers) + + +DependTarget() + +InstallDriverSDKNonExecFile(Imakefile,$(DRIVERSDKDIR)/drivers/ivtv) +InstallDriverSDKNonExecFile(ivtv.c,$(DRIVERSDKDIR)/drivers/ivtv) + +InstallDriverSDKObjectModule(ivtv,$(DRIVERSDKMODULEDIR),drivers) commit bbacd1dfe4b6efca753f3405b2ebc11cd01529be Author: hverkuil <[EMAIL PROTECTED]> Date: Sun Aug 26 11:50:47 2007 +0000 Add ivtv_xv.h, cleanup header guards and a few 'fbdev' leftovers. git-svn-id: http://ivtvdriver.org/svn/xdriver/[EMAIL PROTECTED] f93e8361-94ff-0310-af1b-c9b61a63ab7d diff --git a/src/Imakefile b/src/Imakefile deleted file mode 100644 index 6701ff3..0000000 --- a/src/Imakefile +++ /dev/null @@ -1,55 +0,0 @@ -XCOMM -XCOMM This is an Imakefile for the fbdev driver. -XCOMM -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/fbdev/Imakefile,v 1.10 2001/04/06 18:16:30 dawes Exp $ -#undef DefaultCCOptions -#define DefaultCCOptions -#define IHaveModules -#include <Server.tmpl> - -SRCS = ivtvdev.c ivtvhw.c ivtv_xv.c -OBJS = ivtvdev.o ivtvhw.o ivtv_xv.o - -#if defined(XF86DriverSDK) -INCLUDES = -I. -I../../include -#else -INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \ - -I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi \ - -I$(SERVERSRC)/fb -I$(XF86SRC)/xaa \ - -I$(XF86SRC)/fbdevhw -I$(XF86SRC)/ramdac \ - -I$(XF86SRC)/ddc -I$(XF86SRC)/i2c \ - -I$(XF86SRC)/rac \ - -I$(SERVERSRC)/Xext -I$(XF86SRC)/xf24_32bpp\ - -I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/miext/shadow -I$(EXTINCSRC) -I$(SERVERSRC)/render -#endif -#ifdef XF86_VERSION_CURRENT -XCOMM We are using Xfree86 - -#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,99,16,0) -DEFREGIONNULL = -DX_USE_REGION_NULL -#endif - -#else -XCOMM We are using X.org -DEFREGIONNULL = -DX_USE_REGION_NULL -#endif -DEFINES = FbdevDefines $(DEFREGIONNULL) - -#if MakeHasPosixVariableSubstitutions -SubdirLibraryRule($(OBJS)) -#endif - -ModuleObjectRule() - -ObjectModuleTarget(ivtvdev,$(OBJS)) - -InstallObjectModule(ivtvdev,$(MODULEDIR),drivers) - - -DependTarget() - -InstallDriverSDKNonExecFile(Imakefile,$(DRIVERSDKDIR)/drivers/ivtvdev) -InstallDriverSDKNonExecFile(ivtvdev.c,$(DRIVERSDKDIR)/drivers/ivtvdev) - -InstallDriverSDKObjectModule(ivtvdev,$(DRIVERSDKMODULEDIR),drivers) diff --git a/src/Makefile.am b/src/Makefile.am index 6aa2854..f74a16a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -34,5 +34,6 @@ ivtv_drv_la_SOURCES = \ ivtv_hw.c \ ivtv_hw.h \ ivtv_xv.c \ + ivtv_xv.h \ ivtv_compat.h diff --git a/src/Makefile.in b/src/Makefile.in index 7e48960..508b162 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -53,7 +53,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -232,6 +232,7 @@ ivtv_drv_la_SOURCES = \ ivtv_hw.c \ ivtv_hw.h \ ivtv_xv.c \ + ivtv_xv.h \ ivtv_compat.h all: all-am diff --git a/src/ivtv.c b/src/ivtv.c index 9b8eb68..4b75351 100644 --- a/src/ivtv.c +++ b/src/ivtv.c @@ -8,7 +8,9 @@ #endif #include "ivtv_hw.h" +#include "ivtv_xv.h" #include "ivtv.h" + /* all drivers need this */ #include "xf86.h" #include "xf86_OSproc.h" @@ -323,7 +325,7 @@ IVTVDevProbe(DriverPtr drv, int flags) for (i = 0; i < numUsed; i++) { ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0); - dev = xf86FindOptionValue(devSections[i]->options, "fbdev"); + dev = xf86FindOptionValue(devSections[i]->options, "ivtv"); if (!ivtvHWProbe(NULL, dev, NULL)) continue; @@ -394,7 +396,7 @@ IVTVDevPreInit(ScrnInfoPtr pScrn, int flags) /* open device */ if (!ivtvHWInit(pScrn, NULL, - xf86FindOptionValue(devPtr->pEnt->device->options, "fbdev"))) + xf86FindOptionValue(devPtr->pEnt->device->options, "ivtv"))) return FALSE; default_depth = ivtvHWGetDepth(pScrn, &fbbpp); if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp, 0)) @@ -502,8 +504,6 @@ IVTVDevPreInit(ScrnInfoPtr pScrn, int flags) return TRUE; } -void IvtvInitVideo(ScreenPtr pScreen); - static Bool IVTVDevCreateScreenResources(ScreenPtr pScreen) { diff --git a/src/ivtv.h b/src/ivtv.h index c62f071..9ec8764 100644 --- a/src/ivtv.h +++ b/src/ivtv.h @@ -1,5 +1,5 @@ -/* -------------------------------------------------------------------- */ -/* our private data, and two functions to allocate/free this */ +#ifndef _IVTV_H_ +#define _IVTV_H_ typedef struct { @@ -24,4 +24,4 @@ typedef struct #define IVTVDEVPTR(p) ((IVTVDevPtr)((p)->driverPrivate)) -Bool IVTVDGAInit(ScreenPtr pScreen); +#endif diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c index 1e25104..fc0b238 100644 --- a/src/ivtv_hw.c +++ b/src/ivtv_hw.c @@ -579,8 +579,8 @@ ivtvHWMapVidmem(ScrnInfoPtr pScrn) hwPtr->fbmem = NULL; } else { /* Perhaps we'd better add fboff to fbmem and return 0 in - * fbdevHWLinearOffset()? Of course we then need to mask - * fPtr->fbmem with PAGE_MASK in fbdevHWUnmapVidmem() as + * ivtvHWLinearOffset()? Of course we then need to mask + * fPtr->fbmem with PAGE_MASK in ivtvHWUnmapVidmem() as * well. [geert] */ } } diff --git a/src/ivtv_hw.h b/src/ivtv_hw.h index 7312f89..cf3e0df 100644 --- a/src/ivtv_hw.h +++ b/src/ivtv_hw.h @@ -1,7 +1,6 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/ivtvhw/ivtvhw.h,v 1.11 2001/10/01 13:44:12 eich Exp $ */ +#ifndef _IVTV_HW_H_ +#define _IVTV_HW_H_ -#ifndef _FBDEVHW_H_ -#define _FBDEVHW_H_ #include "xf86str.h" #include "colormapst.h" #include <asm/ioctl.h> @@ -91,15 +90,13 @@ void ivtvHWSave(ScrnInfoPtr pScrn); void ivtvHWRestore(ScrnInfoPtr pScrn); void ivtvHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual); -int ivtvHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, - int flags); +int ivtvHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); Bool ivtvHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); void ivtvHWAdjustFrame(int scrnIndex, int x, int y, int flags); Bool ivtvHWEnterVT(int scrnIndex, int flags); void ivtvHWLeaveVT(int scrnIndex, int flags); void ivtvHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags); Bool ivtvHWSaveScreen(ScreenPtr pScreen, int mode); -Bool ivtvHWSendDMA(ScrnInfoPtr pScrn, void *ptr, int x1, int x2, int y1, - int y2); +Bool ivtvHWSendDMA(ScrnInfoPtr pScrn, void *ptr, int x1, int x2, int y1, int y2); -#endif /* _FBDEVHW_H_ */ +#endif diff --git a/src/ivtv_xv.c b/src/ivtv_xv.c index adf1864..ed14202 100644 --- a/src/ivtv_xv.c +++ b/src/ivtv_xv.c @@ -513,13 +513,13 @@ IVTVHM12ScaleYUV12(unsigned char *src, unsigned char *dst, /* The PVR350 is limited to 720x576 * Scale the incoming image down to fit */ - unsigned int sc_x, sc_y; /* Scaled coords (destination) */ - unsigned int us_x, us_y; /* Unscaled coords (source) */ - unsigned int u_offset, v_offset; /* Offset to the u & v source planes */ - unsigned int suv_offset; /* Offset to the scaled uv plane */ - unsigned int blk_index; /* Used to index into a macro block */ - unsigned int src_offset_vert; /* Offset to start of line in source buffer */ - unsigned int src_offset; /* Offset to pixel in source buffer */ + unsigned int sc_x = 0, sc_y; /* Scaled coords (destination) */ + unsigned int us_x, us_y; /* Unscaled coords (source) */ + unsigned int u_offset, v_offset; /* Offset to the u & v source planes */ + unsigned int suv_offset; /* Offset to the scaled uv plane */ + unsigned int blk_index; /* Used to index into a macro block */ + unsigned int src_offset_vert; /* Offset to start of line in source buffer */ + unsigned int src_offset; /* Offset to pixel in source buffer */ /* Used for pixel skipping & blending */ int xweight, xweight_m, xweight_skip, xskip, xskip_count; diff --git a/src/ivtv_xv.h b/src/ivtv_xv.h new file mode 100644 index 0000000..c36b538 --- /dev/null +++ b/src/ivtv_xv.h @@ -0,0 +1,6 @@ +#ifndef _IVTV_XV_H_ +#define _IVTV_XV_H_ + +void IvtvInitVideo(ScreenPtr pScreen); + +#endif commit 92233b7ac7e5afa4cc62dd99fb5b21ac4108347d Author: hverkuil <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]