xserver-xorg-video-ivtvdev: Changes to 'debian-unstable'
ChangeLog | 47 ++++++
Changelog | 47 ------
Makefile.in | 2
README | 263 +++++++++++++++++++++++++++++++++++++
debian/changelog | 9 -
debian/control | 2
debian/patches/remove-PAGE_MASK | 45 ------
debian/patches/remove-xf86_ansic.h | 46 ------
debian/patches/series | 2
debian/rules | 2
src/ivtv.c | 1
src/ivtv_hw.c | 20 +-
12 files changed, 333 insertions(+), 153 deletions(-)
New commits:
commit a498d593b9919a92c033a177584e1d2438494dbc
Author: Ian Campbell <ijc@hellion.org.uk>
Date: Sun Oct 14 22:29:12 2007 +0100
Updates for upstream release 1.0.0 plus no longer build-dep on ivtv-utils since
it no longer contains ivtv.h and we don't need that header anyway.
diff --git a/debian/changelog b/debian/changelog
index 9b59c45..2fe40b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
-xserver-xorg-video-ivtvdev (1.0.0~svn4049-4) unstable; urgency=low
+xserver-xorg-video-ivtvdev (1.0.0-1) unstable; urgency=low
- * UNRELEASED.
+ * New upstream release.
+ - remove-PAGE_MASK and remove-xf86_ansic.h have been merged upstream.
+ - Changelog is now ChangeLog.
+ * Do not build depend on ivtv-utils anymore, ivtv.h is no longer required.
- -- Ian Campbell <ijc@hellion.org.uk> Fri, 21 Sep 2007 07:36:24 +0100
+ -- Ian Campbell <ijc@hellion.org.uk> Sun, 14 Oct 2007 22:27:12 +0100
xserver-xorg-video-ivtvdev (1.0.0~svn4049-3) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 6c64475..b071224 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: contrib/x11
Priority: extra
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: David Nusinow <dnusinow@debian.org>, Ian Campbell <ijc@hellion.org.uk>
-Build-Depends: debhelper (>= 5), quilt, pkg-config, xserver-xorg-dev (>= 2:1.4), x11proto-video-dev, libxvmc-dev, x11proto-fonts-dev, x11proto-randr-dev, x11proto-render-dev, x11proto-xext-dev, ivtv-utils
+Build-Depends: debhelper (>= 5), quilt, pkg-config, xserver-xorg-dev (>= 2:1.4), x11proto-video-dev, libxvmc-dev, x11proto-fonts-dev, x11proto-randr-dev, x11proto-render-dev, x11proto-xext-dev
Standards-Version: 3.7.2.2
XS-Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-ivtvdev
XS-Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-ivtvdev.git
diff --git a/debian/patches/remove-PAGE_MASK b/debian/patches/remove-PAGE_MASK
deleted file mode 100644
index b2bd1b9..0000000
--- a/debian/patches/remove-PAGE_MASK
+++ /dev/null
@@ -1,45 +0,0 @@
-Use sysconf(_SC_PAGESIZE) as the portable alternative to PAGE_MASK.
-
-PAGE_MASK is not portable to systems such as powerpc, mips and hppa
-where page size is not a constant.
-
-Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
-
-Index: xserver-xorg-video-ivtvdev.git/src/ivtv_hw.c
-===================================================================
---- xserver-xorg-video-ivtvdev.git.orig/src/ivtv_hw.c 2007-09-20 18:55:16.000000000 +0100
-+++ xserver-xorg-video-ivtvdev.git/src/ivtv_hw.c 2007-09-20 19:00:32.000000000 +0100
-@@ -557,12 +557,13 @@
- ivtvHWMapVidmem(ScrnInfoPtr pScrn)
- {
- ivtvHWPtr hwPtr = IVTVDEVHWPTR(pScrn);
-+ long page_mask = ~(sysconf(_SC_PAGESIZE) - 1);
-
- TRACE_ENTER("MapVidmem");
- if (NULL == hwPtr->fbmem) {
-- hwPtr->fboff = (unsigned long)hwPtr->fix.smem_start & ~PAGE_MASK;
-+ hwPtr->fboff = (unsigned long)hwPtr->fix.smem_start & ~page_mask;
- hwPtr->fbmem_len =
-- (hwPtr->fboff + hwPtr->fix.smem_len + ~PAGE_MASK) & PAGE_MASK;
-+ (hwPtr->fboff + hwPtr->fix.smem_len + ~page_mask) & page_mask;
- hwPtr->fbmem =
- mmap(NULL, hwPtr->fbmem_len, PROT_READ | PROT_WRITE, MAP_SHARED,
- hwPtr->fd, 0);
-@@ -573,14 +574,14 @@
- } else {
- /* Perhaps we'd better add fboff to fbmem and return 0 in
- * ivtvHWLinearOffset()? Of course we then need to mask
-- * fPtr->fbmem with PAGE_MASK in ivtvHWUnmapVidmem() as
-+ * fPtr->fbmem with page_mask in ivtvHWUnmapVidmem() as
- * well. [geert] */
- }
- }
- pScrn->memPhysBase =
-- (unsigned long)hwPtr->fix.smem_start & (unsigned long)(PAGE_MASK);
-+ (unsigned long)hwPtr->fix.smem_start & (unsigned long)(page_mask);
- pScrn->fbOffset =
-- (unsigned long)hwPtr->fix.smem_start & (unsigned long)(~PAGE_MASK);
-+ (unsigned long)hwPtr->fix.smem_start & (unsigned long)(~page_mask);
- return hwPtr->fbmem;
- }
-
diff --git a/debian/patches/remove-xf86_ansic.h b/debian/patches/remove-xf86_ansic.h
deleted file mode 100644
index 339a154..0000000
--- a/debian/patches/remove-xf86_ansic.h
+++ /dev/null
@@ -1,46 +0,0 @@
-x86_ansic.h is deprecated upstream.
-
-Directly include necessary headers instead.
-
-Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
-
-Index: xserver-xorg-video-ivtvdev.git/src/ivtv.c
-===================================================================
---- xserver-xorg-video-ivtvdev.git.orig/src/ivtv.c 2007-09-18 08:24:59.000000000 +0100
-+++ xserver-xorg-video-ivtvdev.git/src/ivtv.c 2007-09-20 18:53:26.000000000 +0100
-@@ -40,7 +40,6 @@
- /* all drivers need this */
- #include "xf86.h"
- #include "xf86_OSproc.h"
--#include "xf86_ansic.h"
-
- #include "mipointer.h"
- #include "mibstore.h"
-Index: xserver-xorg-video-ivtvdev.git/src/ivtv_hw.c
-===================================================================
---- xserver-xorg-video-ivtvdev.git.orig/src/ivtv_hw.c 2007-09-18 08:24:59.000000000 +0100
-+++ xserver-xorg-video-ivtvdev.git/src/ivtv_hw.c 2007-09-20 19:02:15.000000000 +0100
-@@ -32,6 +32,15 @@
- # include "config.h"
- #endif
-
-+#include <sys/ioctl.h>
-+#include <sys/mman.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-+
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+
- #include "ivtv_compat.h"
- #include "ivtv_hw.h"
- #include "ivtv.h"
-@@ -39,7 +48,6 @@
- /* all drivers need this */
- #include "xf86.h"
- #include "xf86_OSproc.h"
--#include "xf86_ansic.h"
-
- /* pci stuff */
- #include "xf86PciInfo.h"
diff --git a/debian/patches/series b/debian/patches/series
index 1596c0f..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +0,0 @@
-remove-xf86_ansic.h
-remove-PAGE_MASK
diff --git a/debian/rules b/debian/rules
index 9068915..d96501a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -74,7 +74,7 @@ binary-arch: build install serverabi
dh_testroot
dh_installdocs
- dh_installchangelogs Changelog
+ dh_installchangelogs ChangeLog
dh_install --sourcedir=debian/tmp --list-missing
dh_link
dh_strip
commit 630bda6d262e226aed774c58f857c201c208ccb1
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Sun Oct 14 17:47:44 2007 +0000
Add late-breaking note on MythTV interlacing.
git-svn-id: http://ivtvdriver.org/svn/xf86-video-ivtv/tags/1.0.0@4074 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/README b/README
index de38ba3..4d52737 100644
--- a/README
+++ b/README
@@ -31,6 +31,12 @@ replace it with 'ivtv-fb'.
The ivtv framebuffer driver can be obtained from www.ivtvdriver.org. It
is part of the ivtv package. It will be merged with kernel 2.6.24.
+The latest MythTV subversion code has overhauled the video out
+handling. By default it will select the 'Bob (2x)' deinterlacer for
+Xv output. This is NOT compatible with the Xv overlay support for the
+PVR-350. It won't crash, but the resulting image will be extremely poor.
+So don't use that.
+
Xorg 7.x Servers
================
commit 6bef49cd48a9b54ffdaafe7e7833ee659b2d3028
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Sun Oct 14 16:36:10 2007 +0000
Changelog -> ChangeLog
Add ChangeLog to dist target.
git-svn-id: http://ivtvdriver.org/svn/xdriver/tags/1.0.0@4070 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..d5da1f9
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,47 @@
+#1.0.0 - Renamed to ivtv_drv and xf86-video-ivtv for consistency with X11R7
+ naming convention.
+ - When the ivtv X driver is loaded, it ensures the osd/framebuffer is switched
+ on, and both global & local alpha are off.
+ - Remove obsolete text from the README.
+ - Delete obsolete xc directory.
+ - Reformatted code to Xorg style
+ - Fixed Xv support for IVTV versions < 1.0.0
+ - Removed dead code
+ - Other minor tweaks & clean-ups to make the code more consistent.
+ - Tweaked configure.ac for a more graceful failure if the base requirements
+ aren't met.
+ - Add support for multiple PVR350's
+ - Add support for multiple 'resolutions', switchable via randr
+ - Add support for 8/16 bpp modes - XV not supported for 8bpp
+ - Add support for Virtual resolutions with panning
+ - Add support for Big-endian CPUs - induces speed penalty since cpu has to byte swap all data
+ - Takes advantage of improved dma if ivtv > 0.10.0
+ - Most ErrorF calls replaced with xf86DrvMsg
+ - New resolution/colour support only works if ivtv-fb is loaded WITHOUT 'osd_compat=1'
+ - compiles with Xorg 7.x as well as older X versions
+ - Add software scaling for images larger than 720x576
+#0.10.6 - Improved performance by only fixing up correct sized region
+ - should build against xorg corrrectly
+#0.10.5 - Add autopaint colorkey support (XV_AUTOPAINTCOLORKEY)
+#0.10.4 - Add colorkey support (XV_COLORKEY)
+#0.10.2 - Fix device identification for /dev/video/1 type fb devices
+ - Allow ivtv/350 to scale up xv playback
+#0.10.1 - Fix NTSC playback
+#0.10 - Fix playback of non full height videos
+ - center video in screen
+ - revert PREP_FRAME code to same as 0.8 for now.
+#0.9 - first attempt at Xv
+ - Remove some ioctl calls we know will fail and aren't important.
+#0.8 - fix error using fbdev option to specify device to use
+#0.7 - frame buffer device now specified with fbdev again
+ - Configuration code is more like most pci cards instead of
+ framebuffer driver so less things go wrong
+ and error messages are more sensible
+ - Uses installed ivtv header file
+ - Probe does ivtvfb ioctl to ensure frame buffer is really ivtv.
+#0.6 - Fix dma too large an area on full screen updates
+#0.5 - Remove name conflicts
+#0.4 - Sends data in multiples of 64K to keep ivtv happ(ish)
+ - Grabs the sum of the dirty regions and just updates that region.
+ - pointer passed to ivtv is not aligned on page boundaries so relies on
+ ivtv-0.1.10-pre2-ck108d or newer version of myth to work properly.
diff --git a/Changelog b/Changelog
deleted file mode 100644
index d5da1f9..0000000
--- a/Changelog
+++ /dev/null
@@ -1,47 +0,0 @@
-#1.0.0 - Renamed to ivtv_drv and xf86-video-ivtv for consistency with X11R7
- naming convention.
- - When the ivtv X driver is loaded, it ensures the osd/framebuffer is switched
- on, and both global & local alpha are off.
- - Remove obsolete text from the README.
- - Delete obsolete xc directory.
- - Reformatted code to Xorg style
- - Fixed Xv support for IVTV versions < 1.0.0
- - Removed dead code
- - Other minor tweaks & clean-ups to make the code more consistent.
- - Tweaked configure.ac for a more graceful failure if the base requirements
- aren't met.
- - Add support for multiple PVR350's
- - Add support for multiple 'resolutions', switchable via randr
- - Add support for 8/16 bpp modes - XV not supported for 8bpp
- - Add support for Virtual resolutions with panning
- - Add support for Big-endian CPUs - induces speed penalty since cpu has to byte swap all data
- - Takes advantage of improved dma if ivtv > 0.10.0
- - Most ErrorF calls replaced with xf86DrvMsg
- - New resolution/colour support only works if ivtv-fb is loaded WITHOUT 'osd_compat=1'
- - compiles with Xorg 7.x as well as older X versions
- - Add software scaling for images larger than 720x576
-#0.10.6 - Improved performance by only fixing up correct sized region
- - should build against xorg corrrectly
-#0.10.5 - Add autopaint colorkey support (XV_AUTOPAINTCOLORKEY)
-#0.10.4 - Add colorkey support (XV_COLORKEY)
-#0.10.2 - Fix device identification for /dev/video/1 type fb devices
- - Allow ivtv/350 to scale up xv playback
-#0.10.1 - Fix NTSC playback
-#0.10 - Fix playback of non full height videos
- - center video in screen
- - revert PREP_FRAME code to same as 0.8 for now.
-#0.9 - first attempt at Xv
- - Remove some ioctl calls we know will fail and aren't important.
-#0.8 - fix error using fbdev option to specify device to use
-#0.7 - frame buffer device now specified with fbdev again
- - Configuration code is more like most pci cards instead of
- framebuffer driver so less things go wrong
- and error messages are more sensible
- - Uses installed ivtv header file
- - Probe does ivtvfb ioctl to ensure frame buffer is really ivtv.
-#0.6 - Fix dma too large an area on full screen updates
-#0.5 - Remove name conflicts
-#0.4 - Sends data in multiples of 64K to keep ivtv happ(ish)
- - Grabs the sum of the dirty regions and just updates that region.
- - pointer passed to ivtv is not aligned on page boundaries so relies on
- ivtv-0.1.10-pre2-ck108d or newer version of myth to work properly.
diff --git a/Makefile.in b/Makefile.in
index 341f761..ee651a5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52,7 +52,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+DIST_COMMON = README ChangeLog $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure config.guess config.sub depcomp \
install-sh ltmain.sh missing
commit 3d1ba92df18f45b7b518bf56093cc8aab7b0e486
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Sun Oct 14 15:27:31 2007 +0000
Applied patch from Ian Armstrong.
git-svn-id: http://ivtvdriver.org/svn/xdriver/trunk@4062 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/README b/README
index 3a5ee55..de38ba3 100644
--- a/README
+++ b/README
@@ -6,16 +6,17 @@ framebuffer driver into the kernel introduced several changes which
impact how you setup the X driver and what MythTV version you can
use.
-This X11 driver supports all ivtv versions >= 0.10. If you are using
-ivtv >= 1.0.0 and you want to use MythTV, then you need to get the
-MythTV subversion trunk or the mythtv-vid branch. The current MythTV
-release (0.20.2) only supports ivtv versions < 1.0.0.
-
-If you use ivtv < 1.0.0 and you are using MythTV <= 0.20.2 (i.e., you
-are not using the MythTV subversion trunk or the mythtv-vid branch), then
-you must set the osd_compat=1 option for the ivtv-fb module. This is the
-only time you need to do this. See the osd_compat section at the bottom
-if you need this, since it impacts the X configuration file.
+This X11 driver supports all ivtv versions >= 0.2. If you are using
+ivtv >= 1.0.0 and you want to use the PVR350 MPEG decoder with MythTV,
+then you need to get the MythTV subversion trunk or the mythtv-vid branch.
+The current MythTV release (0.20.2) only supports ivtv versions < 1.0.0.
+
+If you use ivtv 0.10.x and you are using the PVR350 MPEG decoder with
+MythTV <= 0.20.2 (i.e., you are not using the MythTV subversion trunk or
+the mythtv-vid branch), then you must set the osd_compat=1 option for the
+ivtv-fb module. This is the only time you need to do this. See the osd_compat
+section at the bottom if you need this, since it impacts the X configuration
+file.
There is a bug in the ivtv-1.0.0 driver in kernel 2.6.22 that will make
MythTV from the MythTV subversion trunk or the mythtv-vid branch hit a
@@ -67,7 +68,9 @@ the configuration file is /etc/X11/XF86Config.
The default resolution of the framebuffer is 640x400 for NTSC and
640x480 for PAL and SECAM. So the configuration differs between
-the two.
+the two. (For ivtv < 0.10, the resolution is locked to 720x480 for NTSC
+and 720x576 for PAL. See the osd_compat section at the bottom for
+suitable screen mode entries.)
For NTSC you should add the following to your X config file:
@@ -249,7 +252,7 @@ you find one.
ivtv-fb osd_compat option
=========================
-If you are using ivtv < 1.0.0 and MythTV <= 0.20.2, then you have to set
+If you are using ivtv 0.10.x and MythTV <= 0.20.2, then you have to set
the osd_compat=1 option for the ivtv-fb module. This selects the framebuffer
mode that MythTV expects (these MythTV versions hardcoded the framebuffer
resolution and depth. If these would not match, then you would get a crash).
commit b9b91b755ca4a79d0f1ab3a534111996bf12f5b2
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Sun Oct 14 14:13:45 2007 +0000
More doc updates.
git-svn-id: http://ivtvdriver.org/svn/xdriver/trunk@4055 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/README b/README
index 94a7039..3a5ee55 100644
--- a/README
+++ b/README
@@ -1,3 +1,35 @@
+Compatibility
+=============
+
+Please read this carefully: the merging of ivtv and the ivtv
+framebuffer driver into the kernel introduced several changes which
+impact how you setup the X driver and what MythTV version you can
+use.
+
+This X11 driver supports all ivtv versions >= 0.10. If you are using
+ivtv >= 1.0.0 and you want to use MythTV, then you need to get the
+MythTV subversion trunk or the mythtv-vid branch. The current MythTV
+release (0.20.2) only supports ivtv versions < 1.0.0.
+
+If you use ivtv < 1.0.0 and you are using MythTV <= 0.20.2 (i.e., you
+are not using the MythTV subversion trunk or the mythtv-vid branch), then
+you must set the osd_compat=1 option for the ivtv-fb module. This is the
+only time you need to do this. See the osd_compat section at the bottom
+if you need this, since it impacts the X configuration file.
+
+There is a bug in the ivtv-1.0.0 driver in kernel 2.6.22 that will make
+MythTV from the MythTV subversion trunk or the mythtv-vid branch hit a
+locking error occasionally. This is fixed in kernel 2.6.23 and the fix
+is also expected to go into kernel 2.6.22.11. Kernels < 2.6.22 are fine.
+
+Note that the name of the ivtv framebuffer kernel module changed:
+it is called ivtvfb for ivtv >= 1.0.0 and ivtv-fb for older ivtv versions.
+So if you use ivtv < 1.0.0 and you read 'ivtvfb' in the text below, then
+replace it with 'ivtv-fb'.
+
+The ivtv framebuffer driver can be obtained from www.ivtvdriver.org. It
+is part of the ivtv package. It will be merged with kernel 2.6.24.
+
Xorg 7.x Servers
================
@@ -147,6 +179,10 @@ After restarting X you should see the X screen on your TV.
Custom resolutions
==================
+Note: Custom resolutions are only possible if the osd_compat module option was
+not specified with the ivtv-fb module. Setting that option locks down the
+resolution to a fixed value.
+
If you want to use a custom resolution then you should first load the ivtvfb
module with the resolutions you want. To do that add a line to
/etc/modprobe.conf, e.g.:
@@ -199,3 +235,46 @@ the first framebuffer device (that of your graphics card) is used.
If you don't use a framebuffer at all for your console, then use the option
'fbcon=vc:64-63', this will prevent any framebuffer device from being used
for the console.
+
+However, in kernel 2.6.23 the 'vc:64-63' trick no longer works. Instead
+enable the VT_HW_CONSOLE_BINDING configuration option when compiling
+the kernel: 'Device Drivers', 'Character devices', 'Support for binding and
+unbinding console drivers'. You can now unload ivtvfb by running
+'rmmod -f ivtvfb' and the standard console will automatically be reattached.
+
+There may be more elegant methods of doing this, please let me know if
+you find one.
+
+
+ivtv-fb osd_compat option
+=========================
+
+If you are using ivtv < 1.0.0 and MythTV <= 0.20.2, then you have to set
+the osd_compat=1 option for the ivtv-fb module. This selects the framebuffer
+mode that MythTV expects (these MythTV versions hardcoded the framebuffer
+resolution and depth. If these would not match, then you would get a crash).
+
+In practice this means that the X configuration changes. Instead of having
+a section Mode "640x480" (PAL) or Mode "640x400" (NTSC) you now have to
+specify this:
+
+NTSC:
+
+Mode "720x480"
+ DotClock 23.832
+ HTimings 720 775 799 800
+ VTimings 480 494 496 497
+ Flags "-HSync" "-VSync"
+EndMode
+
+PAL:
+
+Mode "720x576"
+ DotClock 23.721
+ HTimings 720 775 799 800
+ VTimings 576 590 592 593
+ Flags "-HSync" "-VSync"
+EndMode
+
+And the Modes line in your Screen section also changes from "640x400" or
+"640x480" to "720x480" or "720x576" respectively.
commit e49e6dd0bf7484e1a4734e5d7c262406bacd221c
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Fri Oct 12 08:39:23 2007 +0000
Update README with info on how to configure X.
git-svn-id: http://ivtvdriver.org/svn/xdriver/trunk@4052 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/README b/README
index 323f3df..94a7039 100644
--- a/README
+++ b/README
@@ -11,6 +11,7 @@ checking for XORG... configure: error: Package requirements (xorg-server >= 1.0.
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
==========================
@@ -24,3 +25,177 @@ 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.
+
+X configuration
+===============
+
+The next step is to setup the X configuration to enable the X display.
+For Xorg the configuration file is /etc/X11/xorg.conf, for Xfree86
+the configuration file is /etc/X11/XF86Config.
+
+The default resolution of the framebuffer is 640x400 for NTSC and
+640x480 for PAL and SECAM. So the configuration differs between
+the two.
+
+For NTSC you should add the following to your X config file:
+
+------------------------- cut here -------------------------
+Section "Monitor"
+ Identifier "NTSC Monitor"
+ HorizSync 10-68
+ VertRefresh 25-120
+
+ Mode "640x400"
+ DotClock 23.832
+ HTimings 640 735 759 800
+ VTimings 400 454 456 497
+ Flags "-HSync" "-VSync"
+ EndMode
+EndSection
+
+Section "Device"
+ Identifier "Hauppauge PVR-350 Framebuffer"
+ Driver "ivtv"
+ Option "fbdev" "/dev/fb0" # <-- modify if using another device
+ BusID "0:10:0" # <-- obtain from lspci (see later)
+EndSection
+
+Section "Screen"
+ Identifier "TV Screen"
+ Device "Hauppauge PVR-350 Framebuffer"
+ Monitor "NTSC Monitor"
+ DefaultDepth 24
+ DefaultFbBpp 32
+ SubSection "Display"
+ Depth 24
+ FbBpp 32
+ Modes "640x400"
+ EndSubSection
+EndSection
+------------------------- cut here -------------------------
+
+For PAL/SECAM you should add the following to your X config file:
+
+------------------------- cut here -------------------------
+Section "Monitor"
+ Identifier "PAL Monitor"
+ HorizSync 10-68
+ VertRefresh 25-120
+
+ Mode "640x480"
+ DotClock 23.721
+ HTimings 640 735 759 800
+ VTimings 480 542 544 593
+ Flags "-HSync" "-VSync"
+ EndMode
+EndSection
+
+Section "Device"
+ Identifier "Hauppauge PVR-350 Framebuffer"
+ Driver "ivtv"
+ Option "fbdev" "/dev/fb0" # <-- modify if using another device
+ BusID "0:10:0" # <-- obtain from lspci (see later)
+EndSection
+
+Section "Screen"
+ Identifier "TV Screen"
+ Device "Hauppauge PVR-350 Framebuffer"
+ Monitor "PAL Monitor"
+ DefaultDepth 24
+ DefaultFbBpp 32
+ SubSection "Display"
+ Depth 24
+ FbBpp 32
+ Modes "640x480"
+ EndSubSection
+EndSection
+------------------------- cut here -------------------------
+
+In the "Device" section you will have to modify the Option field to select
+the correct framebuffer device (usually /dev/fb0 or /dev/fb1). You also have
+to obtain the correct BusID of the framebuffer device. To do that run:
+
+lspci | grep iTVC15
+
+You should get a line like this:
+
+06:02.0 Multimedia video controller: Internext Compression Inc iTVC15 MPEG-2 Encoder (rev 01)
+
+The numbers at the beginning form the BusID: 06:02.0 becomes "6:2:0" in the
+X config file. Note that lspci reports the numbers as hexadecimal where the
+BusID option expects them as decimal. So if lspci reports "01:0e.0", then
+BusID should be "1:14:0".
+
+The final step is to add the TV Screen to you server layout:
+
+Section "ServerLayout"
+ ...
+ Screen 0 "Screen 1" # << (your computer monitor)
+
+ # (add the following line)
+ Screen 1 "TV Screen" RightOf "Screen 1" # << (TV screen)
+ ...
+EndSection
+
+If you want to use the TV Screen as the main display, then you can just use:
+
+ Screen 0 "TV Screen"
+
+After restarting X you should see the X screen on your TV.
+
+
+Custom resolutions
+==================
+
+If you want to use a custom resolution then you should first load the ivtvfb
+module with the resolutions you want. To do that add a line to
+/etc/modprobe.conf, e.g.:
+
+options ivtvfb osd_xres=720 osd_yres=576
+
+(Run 'modinfo ivtvfb' to see all module options.)
+
+Now load ivtvfb ('modprobe ivtvfb') and the new height and width will be used.
+
+Note that you should make sure that either X isn't started at all, or that
+X isn't using the PVR-350 framebuffer. You can get problems if the
+X configuration and the framebuffer have a mismatch regarding the resolution
+or timings.
+
+Next run 'fbset -x /dev/fbX' (replace /dev/fbX with the correct framebuffer
+device). That gives you a new Mode description, e.g.:
+
+Mode "720x576"
+ # D: 23.720 MHz, H: 29.650 kHz, V: 50.001 Hz
+ DotClock 23.721
+ HTimings 720 775 799 800
+ VTimings 576 590 592 593
+ Flags "-HSync" "-VSync"
+EndMode
+
+Replace the "Mode" subsection in the "Monitor" section and update the
+Modes resolution in the "Screen" section.
+
+Start X and the new resolution should be used.
+
+You can also have multiple "Mode" subsections in "Monitor" and use xrandr to
+switch dynamically.
+
+
+How to prevent the console from using the framebuffer
+=====================================================
+
+By default when you load ivtvfb the framebuffer is used for the console
+output. Unfortunately, this is usually very annoying since this makes it
+hard to unload ivtvfb.
+
+You can prevent this by adding a magic incantation to the kernel options
+in your grub or lilo configuration.
+
+If your monitor console is using the framebuffer of you graphics cards,
+then you should use kernel option 'fbcon=vc:0-0'. This ensures that only
+the first framebuffer device (that of your graphics card) is used.
+
+If you don't use a framebuffer at all for your console, then use the option
+'fbcon=vc:64-63', this will prevent any framebuffer device from being used
+for the console.
commit 89cd9b89d704c27e3be05b260c47d81c38c06bf0
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Fri Oct 12 07:14:57 2007 +0000
Use sysconf(_SC_PAGESIZE) as the portable alternative to PAGE_MASK.
Thanks to Ian Campbell for this patch.
git-svn-id: http://ivtvdriver.org/svn/xdriver/trunk@4051 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c
index e16caf0..21bb49d 100644
--- a/src/ivtv_hw.c
+++ b/src/ivtv_hw.c
@@ -556,12 +556,13 @@ void *
ivtvHWMapVidmem(ScrnInfoPtr pScrn)
{
ivtvHWPtr hwPtr = IVTVDEVHWPTR(pScrn);
+ long page_mask = ~(sysconf(_SC_PAGESIZE) - 1);
TRACE_ENTER("MapVidmem");
if (NULL == hwPtr->fbmem) {
- hwPtr->fboff = (unsigned long)hwPtr->fix.smem_start & ~PAGE_MASK;
+ hwPtr->fboff = (unsigned long)hwPtr->fix.smem_start & ~page_mask;
hwPtr->fbmem_len =
- (hwPtr->fboff + hwPtr->fix.smem_len + ~PAGE_MASK) & PAGE_MASK;
+ (hwPtr->fboff + hwPtr->fix.smem_len + ~page_mask) & page_mask;
hwPtr->fbmem =
mmap(NULL, hwPtr->fbmem_len, PROT_READ | PROT_WRITE, MAP_SHARED,
hwPtr->fd, 0);
@@ -572,14 +573,14 @@ ivtvHWMapVidmem(ScrnInfoPtr pScrn)
} else {
/* Perhaps we'd better add fboff to fbmem and return 0 in
* ivtvHWLinearOffset()? Of course we then need to mask
- * fPtr->fbmem with PAGE_MASK in ivtvHWUnmapVidmem() as
+ * fPtr->fbmem with page_mask in ivtvHWUnmapVidmem() as
* well. [geert] */
}
}
pScrn->memPhysBase =
- (unsigned long)hwPtr->fix.smem_start & (unsigned long)(PAGE_MASK);
+ (unsigned long)hwPtr->fix.smem_start & (unsigned long)(page_mask);
pScrn->fbOffset =
- (unsigned long)hwPtr->fix.smem_start & (unsigned long)(~PAGE_MASK);
+ (unsigned long)hwPtr->fix.smem_start & (unsigned long)(~page_mask);
return hwPtr->fbmem;
}
commit 717f034d8e5383c1335aaae9b46e343be1e2a4d4
Author: hverkuil <hverkuil@f93e8361-94ff-0310-af1b-c9b61a63ab7d>
Date: Fri Oct 12 07:12:46 2007 +0000
x86_ansic.h is deprecated.
Thanks to Ian Campbell for this patch.
git-svn-id: http://ivtvdriver.org/svn/xdriver/trunk@4050 f93e8361-94ff-0310-af1b-c9b61a63ab7d
diff --git a/src/ivtv.c b/src/ivtv.c
index ed5be5b..069d439 100644
--- a/src/ivtv.c
+++ b/src/ivtv.c
@@ -40,7 +40,6 @@ in this Software without prior written authorization from the XFree86 Project.
/* all drivers need this */
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "mipointer.h"
#include "mibstore.h"
diff --git a/src/ivtv_hw.c b/src/ivtv_hw.c
index 08f1a76..e16caf0 100644
--- a/src/ivtv_hw.c
+++ b/src/ivtv_hw.c
@@ -32,6 +32,14 @@ in this Software without prior written authorization from the XFree86 Project.
# include "config.h"
#endif
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
#include "ivtv_compat.h"
#include "ivtv_hw.h"
#include "ivtv.h"
@@ -39,7 +47,6 @@ in this Software without prior written authorization from the XFree86 Project.
/* all drivers need this */
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
/* pci stuff */
#include "xf86PciInfo.h"
Reply to: