summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2007-06-15 14:37:33 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2007-06-15 14:37:33 +0000
commitd89786fd1a9b6b13a658daaeedbe2a7700adb619 (patch)
treecab0868190ec7d50e17a7d56d00698522395f48d
parent8cb15a1795601b515b012a3adbf289f9079a4c95 (diff)
parent5ac52eab35f8c7a8540c8c877080d969f4b3b570 (diff)
merge of '20f86cced0cd0f3af307002570f8505ef976e07a'
and '70d9ddd6b089b40485aa1c7a16d7bfc63d80cb81'
-rw-r--r--conf/distro/angstrom-2007.1.conf10
-rw-r--r--packages/gpe-announce/files/.mtn2git_empty0
-rw-r--r--packages/gpe-announce/files/fix-esound.diff24
-rw-r--r--packages/gpe-announce/gpe-announce_0.13.bb2
-rw-r--r--packages/gspcav1/gspcav1_20070110.bb4
-rw-r--r--packages/gspcav1/gspcav1_20070508.bb4
-rw-r--r--packages/linux/linux-rp-2.6.20/defconfig-akita48
-rw-r--r--packages/linux/linux-rp-2.6.20/defconfig-spitz47
-rw-r--r--packages/linux/linux-rp_2.6.20.bb2
-rw-r--r--packages/matchbox2/matchbox-panel-2_svn.bb4
-rw-r--r--packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb2
-rw-r--r--packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch1700
12 files changed, 1078 insertions, 769 deletions
diff --git a/conf/distro/angstrom-2007.1.conf b/conf/distro/angstrom-2007.1.conf
index 66cb1df12f..e7d1478ef3 100644
--- a/conf/distro/angstrom-2007.1.conf
+++ b/conf/distro/angstrom-2007.1.conf
@@ -125,13 +125,13 @@ MACHINE_KERNEL_VERSION = "2.6"
PCMCIA_MANAGER = "pcmciautils"
#Preferred version for the kernel on various machines
-PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.16-hh9"
-PREFERRED_VERSION_linux-handhelds-2.6_h3900 ?= "2.6.20-hh6"
-PREFERRED_VERSION_linux-handhelds-2.6_h4000 ?= "2.6.20-hh6"
+PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.20-hh6"
+PREFERRED_VERSION_linux-handhelds-2.6_h3900 ?= "2.6.21-hh7"
+PREFERRED_VERSION_linux-handhelds-2.6_h4000 ?= "2.6.21-hh7"
PREFERRED_VERSION_linux-handhelds-2.6_h5000 ?= "2.6.20-hh6"
-PREFERRED_VERSION_linux-handhelds-2.6_htcuniversal ?= "2.6.19-hh13"
+PREFERRED_VERSION_linux-handhelds-2.6_htcuniversal ?= "2.6.21-hh7"
PREFERRED_VERSION_linux-handhelds-2.6_hx4700 ?= "2.6.20-hh6"
-PREFERRED_VERSION_linux-handhelds-2.6_magician ?= "2.6.20-hh6"
+PREFERRED_VERSION_linux-handhelds-2.6_magician ?= "2.6.21-hh7"
# Needed for crappy ipaqs with broken hostap in the kernel
PREFERRED_VERSION_hostap-modules ?= "0.4.7"
diff --git a/packages/gpe-announce/files/.mtn2git_empty b/packages/gpe-announce/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gpe-announce/files/.mtn2git_empty
diff --git a/packages/gpe-announce/files/fix-esound.diff b/packages/gpe-announce/files/fix-esound.diff
new file mode 100644
index 0000000000..71ff7e8f2c
--- /dev/null
+++ b/packages/gpe-announce/files/fix-esound.diff
@@ -0,0 +1,24 @@
+diff -ruN gpe-announce-0.13/callbacks.c gpe-announce-0.13-new/callbacks.c
+--- gpe-announce-0.13/callbacks.c 2007-06-14 20:56:15.000000000 +0400
++++ gpe-announce-0.13-new/callbacks.c 2005-08-24 23:04:31.000000000 +0400
+@@ -28,7 +28,7 @@
+ #include <linux/soundcard.h>
+ #include <pthread.h>
+
+-#include <gpe/soundgen.h>
++#include <soundgen.h>
+ #include <gpe/schedule.h>
+
+ #include <linux/types.h>
+diff -ruN gpe-announce-0.13/Makefile gpe-announce-0.13-new/Makefile
+--- gpe-announce-0.13/Makefile 2007-06-14 20:30:00.000000000 +0400
++++ gpe-announce-0.13-new/Makefile 2007-06-14 20:28:30.000000000 +0400
+@@ -43,7 +43,7 @@
+ all: $(PACKAGE)
+
+ $(PACKAGE): $(OBJS)
+- $(CC) -o $@ $^ $(LDFLAGS) $(PACKAGE_LDFLAGS) -lsoundgen -lschedule
++ $(CC) -o $@ $^ $(LDFLAGS) $(PACKAGE_LDFLAGS) -lsoundgen -lschedule -lesd
+
+ install-program: all
+ install -d $(DESTDIR)$(PREFIX)/bin
diff --git a/packages/gpe-announce/gpe-announce_0.13.bb b/packages/gpe-announce/gpe-announce_0.13.bb
index 6124b4c4a8..6ffe317a12 100644
--- a/packages/gpe-announce/gpe-announce_0.13.bb
+++ b/packages/gpe-announce/gpe-announce_0.13.bb
@@ -2,4 +2,6 @@ inherit gpe
DEPENDS = "libsoundgen libschedule gtk+ libgpewidget"
LICENSE = "GPL"
+PR = "r1"
+SRC_URI += "file://fix-esound.diff;patch=1"
diff --git a/packages/gspcav1/gspcav1_20070110.bb b/packages/gspcav1/gspcav1_20070110.bb
index e1fc443d36..40a99d9bd9 100644
--- a/packages/gspcav1/gspcav1_20070110.bb
+++ b/packages/gspcav1/gspcav1_20070110.bb
@@ -4,7 +4,9 @@ PRIORITY = "optional"
SECTION = "kernel/modules"
LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
+
+RRECOMMENDS = "kernel-module-videodev kernel-module-v4l1-compat kernel-module-v4l2-common"
SRC_URI = "http://mxhaard.free.fr/spca50x/Download/oldrelease/${PN}-${PV}.tar.gz \
file://Makefile.patch;patch=1 \
diff --git a/packages/gspcav1/gspcav1_20070508.bb b/packages/gspcav1/gspcav1_20070508.bb
index 14c98e3e3a..866d32b86a 100644
--- a/packages/gspcav1/gspcav1_20070508.bb
+++ b/packages/gspcav1/gspcav1_20070508.bb
@@ -6,7 +6,9 @@ LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
-PR = "r1"
+PR = "r2"
+
+RRECOMMENDS = "kernel-module-videodev kernel-module-v4l1-compat kernel-module-v4l2-common"
SRC_URI = "http://mxhaard.free.fr/spca50x/Download/oldrelease/${PN}-${PV}.tar.gz \
file://Makefile.patch;patch=1 \
diff --git a/packages/linux/linux-rp-2.6.20/defconfig-akita b/packages/linux/linux-rp-2.6.20/defconfig-akita
index cdaf06f7bc..c20d0c2030 100644
--- a/packages/linux/linux-rp-2.6.20/defconfig-akita
+++ b/packages/linux/linux-rp-2.6.20/defconfig-akita
@@ -922,7 +922,53 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
#
# Multimedia devices
#
-# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+
+#
+# Video Capture Adapters
+#
+
+#
+# Video Capture Adapters
+#
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+
+#
+# V4L USB devices
+#
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+# CONFIG_USB_OV511 is not set
+# CONFIG_USB_SE401 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_STV680 is not set
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+
+#
+# Radio Adapters
+#
+# CONFIG_USB_DSBR is not set
+
+#
#
# Digital Video Broadcasting Devices
diff --git a/packages/linux/linux-rp-2.6.20/defconfig-spitz b/packages/linux/linux-rp-2.6.20/defconfig-spitz
index 572f212544..ed290b2959 100644
--- a/packages/linux/linux-rp-2.6.20/defconfig-spitz
+++ b/packages/linux/linux-rp-2.6.20/defconfig-spitz
@@ -936,9 +936,54 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
#
# Multimedia devices
#
-# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=y
+ #
+# Video Capture Adapters
+#
+
+#
+# Video Capture Adapters
+#
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+
+#
+# V4L USB devices
+#
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+# CONFIG_USB_OV511 is not set
+# CONFIG_USB_SE401 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_STV680 is not set
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+
+#
+# Radio Adapters
+#
+# CONFIG_USB_DSBR is not set
+
+#
+
#
# Digital Video Broadcasting Devices
#
diff --git a/packages/linux/linux-rp_2.6.20.bb b/packages/linux/linux-rp_2.6.20.bb
index 9ef9413641..95a87621d7 100644
--- a/packages/linux/linux-rp_2.6.20.bb
+++ b/packages/linux/linux-rp_2.6.20.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r17"
+PR = "r18"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
diff --git a/packages/matchbox2/matchbox-panel-2_svn.bb b/packages/matchbox2/matchbox-panel-2_svn.bb
index be2e7f39cf..63e6dd9265 100644
--- a/packages/matchbox2/matchbox-panel-2_svn.bb
+++ b/packages/matchbox2/matchbox-panel-2_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "matchbox-panel-2 is a lightweight dock (system tray) application based on Gtk+"
LICENSE = "GPL"
SECTION = "x11/panels"
-DEPENDS = "gtk+"
+DEPENDS = "gtk+ apmd startup-notification"
PV = "0.1+svn${SRCDATE}"
PR = "r6"
@@ -11,7 +11,7 @@ S = "${WORKDIR}/${PN}"
inherit autotools pkgconfig
-EXTRA_OECONF = "--disable-startup-notification --disable-libnotify"
+EXTRA_OECONF = "--enable-startup-notification --disable-libnotify"
# matchbox-<anything>-2 aims to replace their -1 counterpart, but at this point in time it's unfinished and unusable, so make it parallel installable
do_install_append() {
diff --git a/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb b/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb
index 106d5405a6..9cdc72f797 100644
--- a/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb
+++ b/packages/xorg-xserver/xserver-kdrive-imageon_X11R7.1-1.1.0.bb
@@ -11,7 +11,7 @@ DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext
PROVIDES = "virtual/xserver"
RPROVIDES = "virtual/xserver"
-PR = "r1"
+PR = "r2"
FILESPATH = "${FILE_DIRNAME}/xserver-kdrive"
diff --git a/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch b/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch
index f4272f80e0..2f7f5ca020 100644
--- a/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch
+++ b/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch
@@ -902,7 +902,7 @@
+#endif
--- /dev/null
+++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_cursor.c
-@@ -0,0 +1,566 @@
+@@ -0,0 +1,565 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -934,8 +934,9 @@
+#include "imageon_regs.h"
+
+#define W100_CURSOR_HEIGHT (16)
-+#define W100_CURSOR_PITCH (4)
+#define W100_CURSOR_WIDTH (16)
++#define W100_CURSOR_PITCH (W100_CURSOR_WIDTH / 4)
++
+#define W100_CURSOR_SIZE W100_CURSOR_PITCH * W100_CURSOR_WIDTH
+
+static CARD16 expand2bpp[256];
@@ -968,7 +969,7 @@
+ (((y) * W100_CURSOR_PITCH + ((x) / 4)) >> 2)
+
+#define PixelShift(x, y) \
-+ (2 * ((x) % W100_CURSOR_WIDTH))
++ (2 * ((x) % 16))
+
+#define PixelMask(x, y) \
+ ((0xc0000000) >> PixelShift(x, y))
@@ -1210,7 +1211,7 @@
+ cursor_v_pos_u vpos;
+ graphic_h_disp_u graphic_hdisp;
+ graphic_v_disp_u graphic_vdisp;
-+ int tx, ty, tw, th;
++ BoxRec cursorBox, deviceBox;
+
+
+ if (!pCurPriv->has_cursor) {
@@ -1224,30 +1225,28 @@
+ graphic_vdisp.val = w100c->regs.GRAPHIC_V_DISP;
+ xoffs = 0;
+ yoffs = 0;
-+ x -= pCurPriv->xhot;
-+ y -= pCurPriv->yhot;
-+ tx = W100MapToHWX(w100c, x, y, pCurPriv->width, pCurPriv->height);
-+ ty = W100MapToHWY(w100c, x, y, pCurPriv->width, pCurPriv->height);
-+ tw = W100MapToHWW(w100c, x, y, pCurPriv->width, pCurPriv->height);
-+ th = W100MapToHWH(w100c, x, y, pCurPriv->width, pCurPriv->height);
++ cursorBox.x1 = x - pCurPriv->xhot;
++ cursorBox.y1 = y - pCurPriv->yhot;
++ cursorBox.x2 = cursorBox.x1 + pCurPriv->width - 1;
++ cursorBox.y2 = cursorBox.y1 + pCurPriv->height - 1;
++ W100MapToDevice(w100c, &cursorBox, &deviceBox);
+
-+ if (tx < 0) {
-+ xoffs = -tx;
-+ tw -= xoffs;
-+ tx = 0;
++ if (deviceBox.x1 < 0) {
++ xoffs = -deviceBox.x1;
++ deviceBox.x1 = 0;
+ }
+
-+ if (ty < 0) {
-+ yoffs = -ty;
-+ th -= yoffs;
-+ ty = 0;
++ if (deviceBox.y1 < 0) {
++ yoffs = -deviceBox.y1;
++ deviceBox.y1 = 0;
+ }
-+
-+ hpos.f.cur_h_start = graphic_hdisp.f.graphic_h_start + tx;
-+ hpos.f.cur_h_end = hpos.f.cur_h_start + tw;
++
++ hpos.f.cur_h_start = graphic_hdisp.f.graphic_h_start + deviceBox.x1;
++ hpos.f.cur_h_end = graphic_hdisp.f.graphic_h_start + deviceBox.x2 + 1;
+ hpos.f.cur_en = 1;
-+ vpos.f.cur_v_start = graphic_vdisp.f.graphic_v_start + ty;
-+ vpos.f.cur_v_end = vpos.f.cur_v_start + th;
++ vpos.f.cur_v_start = graphic_vdisp.f.graphic_v_start + deviceBox.y1;
++ vpos.f.cur_v_end = graphic_vdisp.f.graphic_v_start + deviceBox.y2 + 1;
++
+ cursor_offset.f.cur_x_offset = xoffs;
+ cursor_offset.f.cur_y_offset = yoffs;
+ cursor_offset.f.cur_offset = (CARD32)
@@ -1255,7 +1254,7 @@
+ + pCurPriv->area->offset);
+ DBG_IMAGEON(("W100MoveCursor dst(x:%d,y:%d),"
+ "mapped(x:%d,y:%d,xoffs:%d,yoffs:%d)\n",
-+ x, y, tx, ty, xoffs, yoffs));
++ x, y, deviceBox.x1, deviceBox.y1, xoffs, yoffs));
+
+ W100DisableDisplayUpdate(w100c);
+ MMIO_OUT32(mmCURSOR1_OFFSET, cursor_offset.val);
@@ -1471,7 +1470,7 @@
+}
--- /dev/null
+++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_draw.c
-@@ -0,0 +1,237 @@
+@@ -0,0 +1,238 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -1520,6 +1519,7 @@
+ KdScreenPriv(pPix->drawable.pScreen);
+ W100ScreenInfo(pScreenPriv);
+ W100CardInfo(pScreenPriv);
++ W100PortPrivPtr pPortPriv = w100s->pAdaptor->pPortPrivates[0].ptr;
+ int fifoEntries = 4;
+
+ DBG_IMAGEON(("W100PrepareSolid(alu:%d, pm:0x%08x, fg:%d)\n",
@@ -1711,7 +1711,7 @@
+}
--- /dev/null
+++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon.h
-@@ -0,0 +1,261 @@
+@@ -0,0 +1,284 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -1822,6 +1822,13 @@
+ Bool supported;
+} W100ModeSpec;
+
++typedef struct _W100BoxRec {
++ CARD16 x;
++ CARD16 y;
++ CARD16 w;
++ CARD16 h;
++} W100BoxRec, *W100BoxPtr;
++
+typedef struct _W100Mode {
+ CARD16 width;
+ CARD16 height;
@@ -1929,23 +1936,39 @@
+ CARD32 videoStatus;
+ CARD32 videoCtrl;
+ RegionRec clip;
-+ KdOffscreenArea *offSurface;
-+ CARD32 offSize;
-+ KdOffscreenArea *ovlSurface;
-+ CARD32 ovlSize;
-+ CARD32 YPlaneOffset;
-+ CARD32 UPlaneOffset;
-+ CARD32 VPlaneOffset;
-+ CARD32 colorKey;
-+ CARD8 brightness;
-+ CARD32 maxOverlaySize;
-+ CARD16 ovlX;
-+ CARD16 ovlY;
-+ CARD16 ovlWidth;
-+ CARD16 ovlHeight;
-+ CARD8 videoHorExp;
-+ CARD8 videoVerExp;
-+ int id;
++ struct {
++ int width; /* Source width */
++ int height; /* Source height */
++ unsigned char *buffer; /* Source buffer */
++ int id; /* Source FOURCC */
++ int size; /* Size of source rect (bytes) */
++ KdOffscreenArea *surface; /* Source surface (on card memory) */
++ BoxRec box; /* Source rect boundaries */
++ } src;
++ struct {
++ BoxRec box; /* Screen rectangle */
++ } dst;
++ struct {
++ int size; /* Size of the overlay surface (bytes) */
++ KdOffscreenArea *surface; /* Overlay surface (on card memory) */
++ BoxRec box; /* Overlay box (util size) */
++ BoxRec frame; /* Overlay box (plus corrections) */
++ Bool changed; /* To avoid recalculations */
++ int horExp; /* Horizontal expansion */
++ int verExp; /* Vertical expansion */
++ int maxSize; /* Maximum allowed surface size (bytes) */
++ int colorKey; /* Colour to replace with overlay */
++ int brightness; /* Brigthness */
++ } ovl;
++ struct {
++ int size; /* Number of planes */
++ int bpp; /* bpp of the planes */
++ int offset[3]; /* Planes offsets */
++ CARD32 yplane; /* Offset (card) of Y plane */
++ CARD32 uplane; /* Offset (card) of U plane */
++ CARD32 vplane; /* Offset (card) of V plane */
++ } planes;
++ Bool changed; /* To track changes and avoid recalculations */
+} W100PortPrivRec, *W100PortPrivPtr;
+
+extern KdCardFuncs W100Funcs;
@@ -6231,7 +6254,7 @@
+}
--- /dev/null
+++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_support.c
-@@ -0,0 +1,1438 @@
+@@ -0,0 +1,1474 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -6856,7 +6879,6 @@
+ } else {
+ w100c->ctx.mask.enable = FALSE;
+ }
-+
+}
+
+Bool W100SetSource(KdScreenInfo *screen,
@@ -6962,184 +6984,140 @@
+ pPix->drawable.bitsPerPixel);
+}
+
-+int W100MapToHWX(W100CardInfo *w100c,
-+ int x, int y, int w, int h)
++void W100MapToDevice(W100CardInfo *w100c, BoxPtr src, BoxPtr dst)
+{
-+ int tx;
+ switch (w100c->hw_window.randr & RR_Rotate_All) {
+ case RR_Rotate_0:
-+ tx = x;
++ dst->x1 = src->x1;
++ dst->y1 = src->y1;
++ dst->x2 = src->x2;
++ dst->y2 = src->y2;
+ break;
+ case RR_Rotate_90:
-+ tx = w100c->hw_window.height - (y + h);
++ dst->x1 = w100c->hw_window.height - src->y2 - 1;
++ dst->y1 = src->x1;
++ dst->x2 = w100c->hw_window.height - src->y1 - 1;
++ dst->y2 = src->x2;
+ break;
+ case RR_Rotate_180:
-+ tx = w100c->hw_window.width - (x + w);
++ dst->x1 = w100c->hw_window.width - src->x2 - 1;
++ dst->y1 = w100c->hw_window.height - src->y2 - 1;
++ dst->x2 = w100c->hw_window.width - src->x1 - 1;
++ dst->y2 = w100c->hw_window.height - src->y1 - 1;
+ break;
+ case RR_Rotate_270:
-+ tx = y;
++ dst->x1 = src->y1;
++ dst->y1 = w100c->hw_window.width - src->x2 - 1;
++ dst->x2 = src->y2;
++ dst->y2 = w100c->hw_window.height - src->x1 - 1;
+ break;
-+ default:
-+ tx = x;
+ }
-+ return tx;
++ DBG_IMAGEON(("MapToDevice (x1:%d,y1:%d,x2:%d,y2:%d)->(x1:%d,y1:%d,x2:%d,y2:%d)\n",
++ src->x1, src->y1, src->x2, src->y2,
++ dst->x1, dst->y1, dst->x2, dst->y2));
+}
+
-+int W100MapToHWY(W100CardInfo *w100c,
-+ int x, int y, int w, int h)
++void W100MapFromDevice(W100CardInfo *w100c, BoxPtr src, BoxPtr dst)
+{
-+ int ty;
+ switch (w100c->hw_window.randr & RR_Rotate_All) {
+ case RR_Rotate_0:
-+ ty = y;
++ dst->x1 = src->x1;
++ dst->y1 = src->y1;
++ dst->x2 = src->x2;
++ dst->y2 = src->y2;
+ break;
+ case RR_Rotate_90:
-+ ty = x;
++ dst->x1 = src->y1;
++ dst->y1 = w100c->hw_window.height - src->x2 - 1;
++ dst->x2 = src->y2;
++ dst->y2 = w100c->hw_window.height - src->x1 - 1;
+ break;
+ case RR_Rotate_180:
-+ ty = w100c->hw_window.height - (y + h);
++ dst->x1 = w100c->hw_window.width - src->x2 - 1;
++ dst->y1 = w100c->hw_window.height - src->y2 - 1;
++ dst->x2 = w100c->hw_window.width - src->x1 - 1;
++ dst->y2 = w100c->hw_window.height - src->y1 - 1;
+ break;
+ case RR_Rotate_270:
-+ ty = w100c->hw_window.width - (x + w);
++ dst->x1 = w100c->hw_window.height - src->y2 - 1;
++ dst->y1 = src->x1;
++ dst->x2 = w100c->hw_window.width - src->y1 - 1;
++ dst->y2 = src->x2;
+ break;
-+ default:
-+ ty = y;
+ }
-+ return ty;
++ DBG_IMAGEON(("MapFromDevice (x1:%d,y1:%d,x2:%d,y2:%d)->(x1:%d,y1:%d,x2:%d,y2:%d)\n",
++ src->x1, src->y1, src->x2, src->y2,
++ dst->x1, dst->y1, dst->x2, dst->y2));
+}
+
-+int W100MapToHWW(W100CardInfo *w100c,
-+ int x, int y, int w, int h)
++void W100MoveTo(BoxPtr src, int x, int y)
+{
-+ int tw;
-+ switch (w100c->hw_window.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ tw = w;
-+ break;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ tw = h;
-+ break;
-+ }
-+ return tw;
++ src->x1 += x;
++ src->y1 += y;
++ src->x2 += x;
++ src->y2 += y;
+}
+
-+int W100MapToHWH(W100CardInfo *w100c,
-+ int x, int y, int w, int h)
++void W100ChangeOrigin(BoxPtr src, int x, int y)
+{
-+ int th;
-+ switch (w100c->hw_window.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ th = h;
-+ break;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ th = w;
-+ break;
++ src->x1 -= x;
++ src->y1 -= y;
++ src->x2 -= x;
++ src->y2 -= y;
++}
++
++void W100ScaleBox(BoxPtr src, BoxPtr dst, int scale)
++{
++ if (scale >= 0) {
++ dst->x1 = src->x1 << scale;
++ dst->x2 = src->x2 << scale;
++ dst->y1 = src->y1 << scale;
++ dst->y2 = src->y2 << scale;
++ } else {
++ dst->x1 = src->x1 >> -scale;
++ dst->x2 = src->x2 >> -scale;
++ dst->y1 = src->y1 >> -scale;
++ dst->y2 = src->y2 >> -scale;
+ }
-+ return th;
+}
+
-+CARD16 W100XformX(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
++void W100TrajectoryOrigin(W100CardInfo *w100c, BoxPtr box, short *x, short *y)
+{
-+ CARD16 tx;
+ switch (w100c->ctx.xform.randr & RR_Rotate_All) {
+ case RR_Rotate_0:
+ if (w100c->ctx.xform.mirror) {
-+ tx = x + w - 1;
++ *x = box->x2;
+ } else {
-+ tx = x;
++ *x = box->x1;
+ }
++ *y = box->y1;
+ break;
+ case RR_Rotate_90:
-+ tx = x + h - 1;
-+ break;
-+ case RR_Rotate_180:
++ *x = box->x2;
+ if (w100c->ctx.xform.mirror) {
-+ tx = x;
++ *y = box->y2;
+ } else {
-+ tx = x + w - 1;
++ *y = box->y1;
+ }
+ break;
-+ case RR_Rotate_270:
-+ default:
-+ tx = x;
-+ break;
-+ }
-+ return tx;
-+}
-+
-+CARD16 W100XformY(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
-+{
-+ CARD16 ty;
-+ switch (w100c->ctx.xform.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ ty = y;
-+ break;
-+ case RR_Rotate_90:
++ case RR_Rotate_180:
+ if (w100c->ctx.xform.mirror) {
-+ ty = y + w - 1;
++ *x = box->x1;
+ } else {
-+ ty = y;
++ *x = box->x2;
+ }
-+ break;
-+ case RR_Rotate_180:
-+ ty = y + h - 1;
++ *y = box->y2;
+ break;
+ case RR_Rotate_270:
-+ default:
++ *x = box->x1;
+ if (w100c->ctx.xform.mirror) {
-+ ty = y;
++ *y = box->y1;
+ } else {
-+ ty = y + w - 1;
++ *y = box->y2;
+ }
-+ break;
+ }
-+ return ty;
+}
-+
-+CARD16 W100XformW(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
-+{
-+ CARD16 tw;
-+
-+ switch (w100c->ctx.xform.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ default:
-+ tw = w;
-+ break;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ tw = h;
-+ break;
-+ }
-+ return tw;
-+}
-+
-+CARD16 W100XformH(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
-+{
-+ CARD16 th;
-+
-+ switch (w100c->ctx.xform.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ default:
-+ th = h;
-+ break;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ th = w;
-+ break;
-+ }
-+ return th;
-+}
-+
++
+CARD8 W100GetScaler(CARD16 dstsize, CARD16 srcsize)
+{
+ return W100_MAX(1, W100_MIN(31, ((16 * srcsize) + dstsize - 1) / dstsize));
@@ -7152,22 +7130,18 @@
+}
+
+
-+static void W100Blt(KdScreenInfo *screen,
-+ int randr,
-+ int bpp,
++static void W100Blt(KdScreenInfo *screen,
++ int randr, int bpp,
+ CARD32 srcOffset,
-+ CARD16 srcW,
-+ CARD16 srcH,
+ CARD16 srcPitch,
++ BoxPtr srcBox,
+ CARD32 dstOffset,
+ CARD16 dstPitch,
-+ CARD16 dstX,
-+ CARD16 dstY)
++ BoxPtr dstBox)
+{
+ ScreenPtr pScreen = screen->pScreen;
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
-+ CARD16 x, y, w, h;
+ int fifoEntries = 9;
+ Bool hasXForm = FALSE;
+ eng_cntl_u eng_cntl;
@@ -7176,12 +7150,8 @@
+ src_width_u src_width;
+ src_height_u src_height;
+ dst_width_height_u dst_width_height;
-+
-+ DBG_IMAGEON(("W100Blt(randr:%d,bpp:%d,srcOffset:0x%08x,"
-+ "srcW:%d,srcH:%d,srcPitch:%d,dstOffset:0x%08x,"
-+ "dstPitch:%d,dstX:%d,dstY:%d)\n",
-+ randr, bpp, srcOffset, srcW, srcH,
-+ srcPitch, dstOffset, dstPitch, dstX, dstY));
++ CARD16 dstX;
++ CARD16 dstY;
+
+ if (randr & (RR_Rotate_90|RR_Rotate_270)) {
+ hasXForm = TRUE;
@@ -7195,21 +7165,28 @@
+ W100SetRotation(w100c, randr, FALSE);
+ W100SetSource(screen, srcPitch, srcOffset, bpp);
+ W100SetDestination(screen, dstPitch, dstOffset, bpp);
-+
-+ x = W100XformX(w100c, dstX, dstY, srcW, srcH);
-+ y = W100XformY(w100c, dstX, dstY, srcW, srcH);
-+ w = W100XformW(w100c, dstX, dstY, srcW, srcH);
-+ h = W100XformH(w100c, dstX, dstY, srcW, srcH);
-+
-+ src_x_y.f.src_y = 0;
-+ src_x_y.f.src_x = 0;
-+ dst_x_y.f.dst_x = x;
-+ dst_x_y.f.dst_y = y;
-+ src_width.f.src_width = srcW;
-+ src_height.f.src_height = srcH;
-+ dst_width_height.f.dst_height = h;
-+ dst_width_height.f.dst_width_b0 = w & 0xff;
-+ dst_width_height.f.dst_width_b1 = (w >> 8) & 0x3f;
++ W100TrajectoryOrigin(w100c, dstBox, &dstX, &dstY);
++
++ src_x_y.f.src_x = srcBox->x1;
++ src_x_y.f.src_y = srcBox->y1;
++ dst_x_y.f.dst_x = dstX;
++ dst_x_y.f.dst_y = dstY;
++ src_width.f.src_width = srcBox->x2 - srcBox->x1 + 1;
++ src_height.f.src_height = srcBox->y2 - srcBox->y1 + 1;
++ dst_width_height.f.dst_height = dstBox->y2 - dstBox->y1 + 1;
++ dst_width_height.f.dst_width_b0 = (dstBox->x2 - dstBox->x1 + 1) & 0xff;
++ dst_width_height.f.dst_width_b1 = ((dstBox->x2 - dstBox->x1 + 1) >> 8) & 0x3f;
++
++ DBG_IMAGEON(("W100Blt src(x:%d,y:%d,w:%d,h:%d) dst(x:%d,y:%d,w:%d,h:%d)\n",
++ src_x_y.f.src_x,
++ src_x_y.f.src_y,
++ src_width.f.src_width,
++ src_height.f.src_height,
++ dst_x_y.f.dst_x,
++ dst_x_y.f.dst_y,
++ dst_width_height.f.dst_width_b0 |
++ dst_width_height.f.dst_width_b1 << 8,
++ dst_width_height.f.dst_height));
+
+ if (W100WaitCmdFifoEntries(w100c, fifoEntries)) {
+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
@@ -7239,20 +7216,17 @@
+ int randr,
+ int bpp,
+ CARD32 srcOffset,
-+ CARD16 srcW,
-+ CARD16 srcH,
+ CARD16 srcPitch,
++ BoxPtr srcBox,
+ CARD32 dstOffset,
+ CARD16 dstPitch,
-+ CARD16 dstX,
-+ CARD16 dstY,
++ BoxPtr dstBox,
+ CARD8 xscaler,
+ CARD8 yscaler)
+{
+ ScreenPtr pScreen = screen->pScreen;
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
-+ CARD16 x, y, w, h, sw, sh;
+ Bool hasXForm = FALSE;
+ dp_datatype_u dp_datatype;
+ dp_mix_u dp_mix;
@@ -7266,13 +7240,22 @@
+ dst_width_height_u dst_width_height;
+ int firstStage = 10;
+ int secondStage = 10;
-+
-+ DBG_IMAGEON(("W100StretchBlt(randr:%d,bpp:%d,srcOffset:0x%08x,"
-+ "srcW:%d,srcH:%d,srcPitch:%d,dstOffset:0x%08x,"
-+ "dstPitch:%d,dstX:%d,dstY:%d,xscaler:%d,yscaler:%d)\n",
-+ randr, bpp, srcOffset, srcW, srcH,
-+ srcPitch, dstOffset, dstPitch,
-+ dstX, dstY, xscaler, yscaler));
++ CARD16 dx, dy, sw, sh, dw, dh;
++ BoxRec dst;
++
++ DBG_IMAGEON(("W100StretchBlt(randr:%d,bpp:%d,"
++ "src(x1:%d,y1:%d,x2:%d,y2:%d,pitch:%d,offset:%d),"
++ "dst(x1:%d,y1:%d,x2:%d,y2:%d,pitch:%d,offset:%d),"
++ "xscaler:%d,yscaler:%d)\n",
++ randr, bpp,
++ srcBox->x1, srcBox->y1, srcBox->x2, srcBox->y2,
++ srcPitch, srcOffset,
++ dstBox->x1, dstBox->y1, dstBox->x2, dstBox->y2,
++ dstPitch, dstOffset,
++ xscaler, yscaler));
++
++ sw = W100ApplyScaler(srcBox->x2 - srcBox->x1 + 1, xscaler);
++ sh = W100ApplyScaler(srcBox->y2 - srcBox->y1 + 1, yscaler);
+
+ if (randr & (RR_Rotate_90|RR_Rotate_270)) {
+ hasXForm = TRUE;
@@ -7281,12 +7264,23 @@
+ eng_cntl.f.dis_src_uses_dst_dirmaj = 1;
+ ++firstStage;
+ ++secondStage;
++ dh = sw;
++ dw = sh;
++ } else {
++ dh = sh;
++ dw = sw;
+ }
+
++ dst.x1 = dstBox->x1;
++ dst.y1 = dstBox->y1;
++ dst.x2 = dst.x1 + dw - 1;
++ dst.y2 = dst.y1 + dh - 1;
++
+ W100ResetContext(w100c);
+ W100SetRotation(w100c, randr, FALSE);
+ W100SetSource(screen, srcPitch, srcOffset, bpp);
+ W100SetDestination(screen, dstPitch, dstOffset, bpp);
++ W100TrajectoryOrigin(w100c, &dst, &dx, &dy);
+
+ src_inc.val = 0;
+ src_inc.f.src_xinc = xscaler;
@@ -7308,23 +7302,15 @@
+ e2.f.srcblend = E2_SRCBLEND_ZERO;
+ e2.f.dstblend = E2_DSTBLEND_ZERO;
+
-+ sw = W100ApplyScaler(srcW, xscaler);
-+ sh = W100ApplyScaler(srcH, yscaler);
-+
-+ x = W100XformX(w100c, dstX, dstY, sw, sh);
-+ y = W100XformY(w100c, dstX, dstY, sw, sh);
-+ w = W100XformW(w100c, dstX, dstY, sw, sh);
-+ h = W100XformH(w100c, dstX, dstY, sw, sh);
-+
-+ src_x_y.f.src_y = 0;
-+ src_x_y.f.src_x = 0;
-+ dst_x_y.f.dst_x = x;
-+ dst_x_y.f.dst_y = y;
++ src_x_y.f.src_x = srcBox->x1;
++ src_x_y.f.src_y = srcBox->y1;
++ dst_x_y.f