xserver-xorg-video-intel: Changes to 'debian-experimental'
ChangeLog | 114 ++++++++++++++++++++++++++++++++++++++++++++++++
NEWS | 30 ++++++++++++
configure.ac | 2
debian/changelog | 21 ++++++++
debian/control | 2
man/intel.man | 34 ++++++++++----
src/drmmode_display.c | 2
src/i830_driver.c | 2
src/i830_render.c | 67 +++++++---------------------
src/i830_uxa.c | 29 ++++++++++++
src/i915_render.c | 23 ++-------
uxa/uxa-render.c | 117 ++++++++++++++++++--------------------------------
12 files changed, 292 insertions(+), 151 deletions(-)
New commits:
commit f0a6efadeb339a28a1f91ecf2bcd4607131907da
Author: Brice Goglin <bgoglin@debian.org>
Date: Tue Mar 23 07:39:32 2010 +0100
Prepare changelog for upload
diff --git a/debian/changelog b/debian/changelog
index a9bc5e9..af3f09c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-video-intel (2:2.10.903-1) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.10.903-1) experimental; urgency=low
* New upstream release candidate.
- -- Brice Goglin <bgoglin@debian.org> Tue, 23 Mar 2010 07:38:21 +0100
+ -- Brice Goglin <bgoglin@debian.org> Tue, 23 Mar 2010 07:39:23 +0100
xserver-xorg-video-intel (2:2.10.902-1) experimental; urgency=low
commit bac709198c4a9754d3e68fd61459b9568c87fe0d
Author: Brice Goglin <bgoglin@debian.org>
Date: Tue Mar 23 07:38:49 2010 +0100
New upstream release candidate
diff --git a/ChangeLog b/ChangeLog
index 66579fc..20a5740 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,117 @@
+commit 9c037f61a490c96f9095f7ff3fecbf41f5efe9f7
+Author: Carl Worth <cworth@cworth.org>
+Date: Mon Mar 22 15:23:04 2010 -0700
+
+ Update version to 2.10.903
+
+ For today's snapshot.
+
+commit 11142cffe4bc81e1ce465ea725fcaef024130082
+Author: Carl Worth <cworth@cworth.org>
+Date: Mon Mar 22 15:22:28 2010 -0700
+
+ NEWS: Add notes for 2.10.903
+
+ For today's snapshot.
+
+commit f206816154fd44e61b0bdeaab1aa4c5359c3b70a
+Author: Carl Worth <cworth@cworth.org>
+Date: Mon Mar 22 14:14:46 2010 -0700
+
+ man: Update list of available 'sclaing mode' property values.
+
+ Include the names from the current kernel driver along with accurate
+ descriptions of each. Indicate how to use the values with:
+
+ xrandr --output output --set property value
+
+ and point the user to "xrandr --prop" for an accurate list of
+ currently available values.
+
+ Closes bug:
+
+ xf86-video-intel manpage needs update for KMS xrandr properties
+ http://bugs.freedesktop.org/show_bug.cgi?id=25606
+
+commit d1dfab6b1649214177435629d8e85239dbe44d89
+Author: Matthias Hopf <mhopf@suse.de>
+Date: Wed Mar 17 15:13:51 2010 +0100
+
+ Clear drmmode_output->mode_output in drmmode_output_destroy().
+
+commit 10cd04a84bcb6313903fc23b2d7791658ebc6b8e
+Author: Li Peng <peng.li@linux.intel.com>
+Date: Sat Mar 20 00:21:48 2010 +0800
+
+ Initialize flip_count before using it
+
+ Otherwise it would be a random value and drmmode_page_flip_handler()
+ won't have a chance to call I830DRI2FlipEventHandler() and indicate
+ a full page flip is complete.
+
+ Signed-off-by: Li Peng <peng.li@intel.com>
+
+commit 3d4b3f257fbbb69c6f236d9803abe54a90d7d434
+Author: Dave Airlie <airlied@redhat.com>
+Date: Thu Mar 18 12:48:39 2010 +1000
+
+ intel: free bus id in error path after printing it out.
+
+ the error message prints out a freed string, spotted during
+ code reappropriation to radeon driver.
+
+ Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 31d5f84bb4416ef92abd97264d52cdab7a184687
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed Mar 17 09:11:05 2010 +0000
+
+ i915: Correct preamble for emit_composite
+
+ Fixes:
+ http://bugs.freedesktop.org/show_bug.cgi?id=27123
+
+ Fatal server error:
+ i915_emit_composite_setup: ADVANCE_BATCH: under-used allocation 100/104
+
+ Introduced with commit d6b7f96fde1add92fd11f5a75869ae6fc688bf77.
+
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit d6b7f96fde1add92fd11f5a75869ae6fc688bf77
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sat Mar 6 15:49:04 2010 +0000
+
+ Fill alpha on xrgb images.
+
+ Do not try to fixup the alpha in the ff/shaders as this has the
+ side-effect of overriding the alpha value of the border color, causing
+ images to be padded with black rather than transparent. This can
+ generate large and obnoxious visual artefacts.
+
+ Fixes:
+
+ Bug 17933 - x8r8g8b8 doesn't sample alpha=0 outside surface bounds
+ http://bugs.freedesktop.org/show_bug.cgi?id=17933
+
+ and many related cairo test suite failures.
+
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 910fd171a00227025abc8bcc286a740f5bae895b
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri Mar 5 14:32:13 2010 +0000
+
+ i830: Remove coord-adjust for nearest centre-sampling.
+
+ Fixes a number of cairo test suite failures.
+
+ Also affects:
+ Bug 16917 - Blur on y-axis also when only x-axis is scaled bilinear
+ http://bugs.freedesktop.org/show_bug.cgi?id=16917
+
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
commit 753914acc31947df8e9f2fa3b9c39de745098709
Author: Carl Worth <cworth@cworth.org>
Date: Mon Mar 15 17:32:57 2010 -0700
diff --git a/debian/changelog b/debian/changelog
index 5085fa3..a9bc5e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.10.903-1) UNRELEASED; urgency=low
+
+ * New upstream release candidate.
+
+ -- Brice Goglin <bgoglin@debian.org> Tue, 23 Mar 2010 07:38:21 +0100
+
xserver-xorg-video-intel (2:2.10.902-1) experimental; urgency=low
[ Julien Cristau ]
commit 9c037f61a490c96f9095f7ff3fecbf41f5efe9f7
Author: Carl Worth <cworth@cworth.org>
Date: Mon Mar 22 15:23:04 2010 -0700
Update version to 2.10.903
For today's snapshot.
diff --git a/configure.ac b/configure.ac
index 3877064..108e283 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-intel],
- 2.10.902,
+ 2.10.903,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-intel)
commit 11142cffe4bc81e1ce465ea725fcaef024130082
Author: Carl Worth <cworth@cworth.org>
Date: Mon Mar 22 15:22:28 2010 -0700
NEWS: Add notes for 2.10.903
For today's snapshot.
diff --git a/NEWS b/NEWS
index ee18bd2..8fdf442 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,33 @@
+Snapshot 2.10.903 (2010-03-22)
+==============================
+Some notable bug fixes
+----------------------
+* Fix unpredictable results in page-flipping code due to access of an
+ uninitialized variable.
+
+* Two fixes that address a number of long-outstanding failures in the
+ cairo test suite:
+
+ Remove coord-adjust for nearest centre-sampling.
+
+ Fill alpha on xrgb images. Closes:
+
+ Bug 17933 - x8r8g8b8 doesn't sample alpha=0 outside surface bounds
+ http://bugs.freedesktop.org/show_bug.cgi?id=17933
+
+* Fix a regression introduced in 2.10.902:
+
+ Fatal server error:
+ i915_emit_composite_setup: ADVANCE_BATCH:
+ under-used allocation 100/104
+
+ Bug 21723 [i915 bisected] rendering makes X crash
+ http://bugs.freedesktop.org/show_bug.cgi?id=27123
+
+Other minor fixes (avoid trying to print an error message with a freed
+string, set a variable to NULL after freeing), and documentation
+updates are also included.
+
Snapshot 2.10.902 (2010-03-15)
==============================
Some significant bug fixes
commit f206816154fd44e61b0bdeaab1aa4c5359c3b70a
Author: Carl Worth <cworth@cworth.org>
Date: Mon Mar 22 14:14:46 2010 -0700
man: Update list of available 'sclaing mode' property values.
Include the names from the current kernel driver along with accurate
descriptions of each. Indicate how to use the values with:
xrandr --output output --set property value
and point the user to "xrandr --prop" for an accurate list of
currently available values.
Closes bug:
xf86-video-intel manpage needs update for KMS xrandr properties
http://bugs.freedesktop.org/show_bug.cgi?id=25606
diff --git a/man/intel.man b/man/intel.man
index ef8d372..c2447be 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -183,10 +183,20 @@ Default: Disabled.
On 830M and better chipsets, the driver supports runtime configuration of
detected outputs. You can use the
.B xrandr
-tool to control outputs on the command line. Each output listed below may have
-one or more properties associated with it (like a binary EDID block if one is
-found). Some outputs have unique properties which are described below. See the "MULTIHEAD CONFIGURATIONS" section below for additional information.
+tool to control outputs on the command line as follows:
+.RS
+.B xrandr \-\-output
+.I output
+.B \-\-set
+.I property value
+.RE
+
+Note that you may need to quote property and value arguments that contain spaces.
+Each output listed below may have one or more properties associated
+with it (like a binary EDID block if one is found). Some outputs have
+unique properties which are described below. See the "MULTIHEAD
+CONFIGURATIONS" section below for additional information.
.SS "VGA"
VGA output port (typically exposed via an HD15 connector).
@@ -203,22 +213,26 @@ By adjusting the BACKLIGHT property, the brightness on the LVDS output can be ad
.B scaling mode
- control LCD panel scaling mode
.TP 2
-By default, the driver will attempt to upscale resolutions smaller than the LCD's native size while preserving the aspect ratio. Other modes are available however:
+When the currently selected display mode differs from the native panel resolution, various scaling options are available. These include
.RS
.PP
-.B center
+.B Center
.TP 4
-Simply center the image on-screen, without scaling.
+Simply center the image on-screen without scaling. This is the only scaling mode that guarantees a one-to-one correspondence between native and displayed pixels, but some portions of the panel may be unused (so-called "letterboxing").
.PP
-.B full_aspect
+.B Full aspect
.TP 4
-The default mode. Try to upscale the image to the screen size, while preserving aspect ratio. May result in letterboxing or pillar-boxing with some resolutions.
+Scale the image as much as possible while preserving aspect ratio. Pixels may not be displayed one-to-one (there may be some blurriness). Some portions of the panel may be unused if the aspect ratio of the selected mode does not match that of the panel.
.PP
-.B full
+.B Full
.TP 4
-Upscale the image to the native screen size without regard to aspect ratio. In this mode, the full screen image may appear distorted in some resolutions.
+Scale the image to the panel size without regard to aspect ratio. This is the only mode which guarantees that every pixel of the panel will be used. But the displayed image may be distorted by stretching either horizontally or vertically, and pixels may not be displayed one-to-one (there may be some blurriness).
.RE
+The precise names of these options may differ depending on the kernel
+video driver, (but the functionality should be similar). See the output of
+.B xrandr \-\-prop
+for a list of currently available scaling modes.
.SS "TV"
Integrated TV output. Available properties include:
commit d1dfab6b1649214177435629d8e85239dbe44d89
Author: Matthias Hopf <mhopf@suse.de>
Date: Wed Mar 17 15:13:51 2010 +0100
Clear drmmode_output->mode_output in drmmode_output_destroy().
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 0172a2e..1348e08 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -817,6 +817,7 @@ drmmode_output_destroy(xf86OutputPtr output)
}
xfree(drmmode_output->props);
drmModeFreeConnector(drmmode_output->mode_output);
+ drmmode_output->mode_output = NULL;
if (drmmode_output->private_data) {
xfree(drmmode_output->private_data);
drmmode_output->private_data = NULL;
commit 10cd04a84bcb6313903fc23b2d7791658ebc6b8e
Author: Li Peng <peng.li@linux.intel.com>
Date: Sat Mar 20 00:21:48 2010 +0800
Initialize flip_count before using it
Otherwise it would be a random value and drmmode_page_flip_handler()
won't have a chance to call I830DRI2FlipEventHandler() and indicate
a full page flip is complete.
Signed-off-by: Li Peng <peng.li@intel.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ae200ca..0172a2e 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1464,6 +1464,7 @@ Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Kernel page flipping support detected, enabling\n");
intel->use_pageflipping = TRUE;
+ drmmode->flip_count = 0;
drmmode->event_context.version = DRM_EVENT_CONTEXT_VERSION;
drmmode->event_context.vblank_handler = drmmode_vblank_handler;
drmmode->event_context.page_flip_handler =
commit 46cea29b03aaed697d9a53ed04ab365db121ebb4
Author: Brice Goglin <bgoglin@debian.org>
Date: Sun Mar 21 10:25:40 2010 +0100
Prepare changelog for upload
diff --git a/debian/changelog b/debian/changelog
index e77141f..8e04679 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-video-intel (2:2.9.1-3) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.9.1-3) unstable; urgency=low
[ Julien Cristau ]
* Rename the build directory to not include DEB_BUILD_GNU_TYPE for no
@@ -11,7 +11,7 @@ xserver-xorg-video-intel (2:2.9.1-3) UNRELEASED; urgency=low
[ Brice Goglin ]
* Bump Standards-Version to 3.8.4, no changes.
- -- Julien Cristau <jcristau@debian.org> Sat, 16 Jan 2010 16:47:17 +0000
+ -- Brice Goglin <bgoglin@debian.org> Sun, 21 Mar 2010 10:25:27 +0100
xserver-xorg-video-intel (2:2.9.1-2) unstable; urgency=low
commit 355d3a86a8c3fc8adaea9fec5ae8ebb5d660a706
Author: Brice Goglin <bgoglin@debian.org>
Date: Sun Mar 21 10:25:25 2010 +0100
Bump Standards-Version to 3.8.4
diff --git a/debian/changelog b/debian/changelog
index 473b1d7..e77141f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
xserver-xorg-video-intel (2:2.9.1-3) UNRELEASED; urgency=low
+ [ Julien Cristau ]
* Rename the build directory to not include DEB_BUILD_GNU_TYPE for no
good reason. Thanks, Colin Watson!
* Remove myself from Uploaders
@@ -7,6 +8,9 @@ xserver-xorg-video-intel (2:2.9.1-3) UNRELEASED; urgency=low
* Backport KMS video overlay from upstream 2.10 (closes: #565328).
* Bump libdrm-dev build-dep for the above.
+ [ Brice Goglin ]
+ * Bump Standards-Version to 3.8.4, no changes.
+
-- Julien Cristau <jcristau@debian.org> Sat, 16 Jan 2010 16:47:17 +0000
xserver-xorg-video-intel (2:2.9.1-2) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 40cc39e..52bd4e5 100644
--- a/debian/control
+++ b/debian/control
@@ -31,7 +31,7 @@ Build-Depends:
automake,
libtool,
xutils-dev
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-intel
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-intel.git
commit 3d4b3f257fbbb69c6f236d9803abe54a90d7d434
Author: Dave Airlie <airlied@redhat.com>
Date: Thu Mar 18 12:48:39 2010 +1000
intel: free bus id in error path after printing it out.
the error message prints out a freed string, spotted during
code reappropriation to radeon driver.
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 53d8663..22e8472 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -649,10 +649,10 @@ static Bool i830_open_drm_master(ScrnInfoPtr scrn)
intel->drmSubFD = drmOpen("i915", busid);
if (intel->drmSubFD == -1) {
- xfree(busid);
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"[drm] Failed to open DRM device for %s: %s\n",
busid, strerror(errno));
+ xfree(busid);
return FALSE;
}
commit cf2d7aa99f30737dbc15c385fbf6aa43d4f2b5b8
Author: Julien Cristau <jcristau@debian.org>
Date: Wed Mar 17 20:10:15 2010 +0100
Bump libdrm-dev build-dep for the kms video overlay changes
diff --git a/debian/changelog b/debian/changelog
index a793d60..473b1d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ xserver-xorg-video-intel (2:2.9.1-3) UNRELEASED; urgency=low
* Remove myself from Uploaders
* Add a NEWS.Debian entry about KMS.
* Backport KMS video overlay from upstream 2.10 (closes: #565328).
+ * Bump libdrm-dev build-dep for the above.
-- Julien Cristau <jcristau@debian.org> Sat, 16 Jan 2010 16:47:17 +0000
diff --git a/debian/control b/debian/control
index e1f558e..40cc39e 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ Build-Depends:
x11proto-xext-dev,
x11proto-video-dev,
libx11-dev,
- libdrm-dev (>= 2.4.11),
+ libdrm-dev (>= 2.4.18-3),
x11proto-xf86dri-dev,
x11proto-gl-dev,
libgl1-mesa-dev | libgl-dev,
commit 2ae5615f76f255e34154953c1dabafc77b14eea4
Author: Julien Cristau <jcristau@debian.org>
Date: Wed Mar 17 20:00:35 2010 +0100
Xv: enable drmmode overlay
Essentially the same as commit bd81734465912d79d6320a6fb021ce43d258b906
but that one doesn't cherry-pick cleanly.
diff --git a/src/i830_video.c b/src/i830_video.c
index a2c9a98..2084131 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -360,7 +360,6 @@ I830SetOneLineModeRatio(ScrnInfoPtr pScrn);
static Bool
drmmode_has_overlay(ScrnInfoPtr pScrn)
{
-#ifdef DRM_MODE_OVERLAY_LANDED
I830Ptr p830 = I830PTR(pScrn);
struct drm_i915_getparam gp;
int has_overlay = 0;
@@ -371,15 +370,11 @@ drmmode_has_overlay(ScrnInfoPtr pScrn)
&gp, sizeof(gp));
return has_overlay ? TRUE : FALSE;
-#else
- return FALSE;
-#endif
}
static void
drmmode_overlay_update_attrs(ScrnInfoPtr pScrn)
{
-#ifdef DRM_MODE_OVERLAY_LANDED
I830Ptr p830 = I830PTR(pScrn);
I830PortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
struct drm_intel_overlay_attrs attrs;
@@ -402,13 +397,11 @@ drmmode_overlay_update_attrs(ScrnInfoPtr pScrn)
if (ret != 0)
OVERLAY_DEBUG("overlay attrs ioctl failed: %i\n", ret);
-#endif
}
static void
drmmode_overlay_off(ScrnInfoPtr pScrn)
{
-#ifdef DRM_MODE_OVERLAY_LANDED
I830Ptr p830 = I830PTR(pScrn);
struct drm_intel_overlay_put_image request;
int ret;
@@ -420,7 +413,6 @@ drmmode_overlay_off(ScrnInfoPtr pScrn)
if (ret != 0)
OVERLAY_DEBUG("overlay switch-off ioctl failed: %i\n", ret);
-#endif
}
static Bool
@@ -429,7 +421,6 @@ drmmode_overlay_put_image(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
int dstPitch, int x1, int y1, int x2, int y2, BoxPtr dstBox,
short src_w, short src_h, short drw_w, short drw_h)
{
-#ifdef DRM_MODE_OVERLAY_LANDED
I830Ptr p830 = I830PTR(pScrn);
I830PortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
struct drm_intel_overlay_put_image request;
@@ -495,9 +486,6 @@ drmmode_overlay_put_image(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
return FALSE;
} else
return TRUE;
-#else
- return FALSE;
-#endif
}
static void
commit 1dceba2603969870ee87ea4b467e454fff6ab18f
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Oct 14 18:09:08 2009 +0200
Xv overlay: fix planar YUV copy for right rotated crtcs
While copying and rotating the buffer, array access was out of bounds when
rotated to the right (RR_Rotate_270). My buffer handling changes probably
made this bug much more likely to actually result in a SIGSEGV.
I've checked the logs and the bug exists since rotation has been supported,
i.e. this looks like a candidate for cherry-picking for all supported
releases.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
(manually cherry-picked from commit aaedeffe00d9414bb03723dbc30b4938a07ce5fa)
diff --git a/src/i830_video.c b/src/i830_video.c
index 5e98f27..a2c9a98 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1502,10 +1502,10 @@ I830CopyPackedData(I830PortPrivPtr pPriv,
for (j = 0; j < w; j+=2) {
/* Copy U */
dst[(((h - i)*2) - 3) + (j * dstPitch)] = src[(j*2) + 1 + (i * srcPitch)];
- dst[(((h - i)*2) - 3) + ((j - 1) * dstPitch)] = src[(j*2) + 1 + ((i+1) * srcPitch)];
+ dst[(((h - i)*2) - 3) + ((j + 1) * dstPitch)] = src[(j*2) + 1 + ((i+1) * srcPitch)];
/* Copy V */
dst[(((h - i)*2) - 1) + (j * dstPitch)] = src[(j*2) + 3 + (i * srcPitch)];
- dst[(((h - i)*2) - 1) + ((j - 1) * dstPitch)] = src[(j*2) + 3 + ((i+1) * srcPitch)];
+ dst[(((h - i)*2) - 1) + ((j + 1) * dstPitch)] = src[(j*2) + 3 + ((i+1) * srcPitch)];
}
}
break;
commit 31d5f84bb4416ef92abd97264d52cdab7a184687
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Mar 17 09:11:05 2010 +0000
i915: Correct preamble for emit_composite
Fixes:
http://bugs.freedesktop.org/show_bug.cgi?id=27123
Fatal server error:
i915_emit_composite_setup: ADVANCE_BATCH: under-used allocation 100/104
Introduced with commit d6b7f96fde1add92fd11f5a75869ae6fc688bf77.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/src/i915_render.c b/src/i915_render.c
index c4aa9a4..819b963 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -504,7 +504,7 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
tex_count += ! is_solid_src;
tex_count += mask && ! is_solid_mask;
- t = 16;
+ t = 15;
if (tex_count)
t += 6 * tex_count + 4;
if (is_solid_src)
commit d6b7f96fde1add92fd11f5a75869ae6fc688bf77
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Mar 6 15:49:04 2010 +0000
Fill alpha on xrgb images.
Do not try to fixup the alpha in the ff/shaders as this has the
side-effect of overriding the alpha value of the border color, causing
images to be padded with black rather than transparent. This can
generate large and obnoxious visual artefacts.
Fixes:
Bug 17933 - x8r8g8b8 doesn't sample alpha=0 outside surface bounds
http://bugs.freedesktop.org/show_bug.cgi?id=17933
and many related cairo test suite failures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/src/i830_render.c b/src/i830_render.c
index 0d6a803..71296d2 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -491,43 +491,23 @@ i830_prepare_composite(int op, PicturePtr source_picture,
* is a8, in which case src.G is what's written, and the other
* channels are ignored.
*/
- if (PICT_FORMAT_A(source_picture->format) != 0) {
- ablend |= TB0A_ARG1_SEL_TEXEL0;
- cblend |=
- TB0C_ARG1_SEL_TEXEL0 |
- TB0C_ARG1_REPLICATE_ALPHA;
- } else {
- ablend |= TB0A_ARG1_SEL_ONE;
- cblend |= TB0C_ARG1_SEL_ONE;
- }
+ ablend |= TB0A_ARG1_SEL_TEXEL0;
+ cblend |= TB0C_ARG1_SEL_TEXEL0 | TB0C_ARG1_REPLICATE_ALPHA;
} else {
- if (PICT_FORMAT_A(source_picture->format) != 0) {
- ablend |= TB0A_ARG1_SEL_TEXEL0;
- } else {
- ablend |= TB0A_ARG1_SEL_ONE;
- }
if (PICT_FORMAT_RGB(source_picture->format) != 0)
cblend |= TB0C_ARG1_SEL_TEXEL0;
else
cblend |= TB0C_ARG1_SEL_ONE | TB0C_ARG1_INVERT; /* 0.0 */
+ ablend |= TB0A_ARG1_SEL_TEXEL0;
}
if (mask) {
- if (dest_picture->format != PICT_a8 &&
- (mask_picture->componentAlpha &&
- PICT_FORMAT_RGB(mask_picture->format))) {
- cblend |= TB0C_ARG2_SEL_TEXEL1;
- } else {
- if (PICT_FORMAT_A(mask_picture->format) != 0)
- cblend |= TB0C_ARG2_SEL_TEXEL1 |
- TB0C_ARG2_REPLICATE_ALPHA;
- else
- cblend |= TB0C_ARG2_SEL_ONE;
- }
- if (PICT_FORMAT_A(mask_picture->format) != 0)
- ablend |= TB0A_ARG2_SEL_TEXEL1;
- else
- ablend |= TB0A_ARG2_SEL_ONE;
+ cblend |= TB0C_ARG2_SEL_TEXEL1;
+ if (dest_picture->format == PICT_a8 ||
+ ! mask_picture->componentAlpha ||
+ ! PICT_FORMAT_RGB(mask_picture->format))
+ cblend |= TB0C_ARG2_REPLICATE_ALPHA;
+ ablend |= TB0A_ARG2_SEL_TEXEL1;
} else {
cblend |= TB0C_ARG2_SEL_ONE;
ablend |= TB0A_ARG2_SEL_ONE;
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 9904311..fec5378 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -237,6 +237,8 @@ i830_uxa_prepare_solid(PixmapPtr pixmap, int alu, Pixel planemask, Pixel fg)
case 32:
/* RGB8888 */
intel->BR[13] |= ((1 << 24) | (1 << 25));
+ if (pixmap->drawable.depth == 24)
+ fg |= 0xff000000;
break;
}
intel->BR[16] = fg;
@@ -710,6 +712,33 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
GCPtr gc;
Bool ret;
+ if (pixmap->drawable.depth == 24) {
+ /* fill alpha channel */
+ pixman_image_t *src_image, *dst_image;
+
+ src_image = pixman_image_create_bits (PIXMAN_x8r8g8b8,
+ w, h,
+ (uint32_t *) src, src_pitch);
+
+ dst_image = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ w, h,
+ (uint32_t *) src, src_pitch);
+
+ if (src_image && dst_image)
+ pixman_image_composite (PictOpSrc,
+ src_image, NULL, dst_image,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ w, h);
+
+ if (src_image)
+ pixman_image_unref (src_image);
+
+ if (dst_image)
+ pixman_image_unref (dst_image);
+ }
+
if (x == 0 && y == 0 &&
w == pixmap->drawable.width &&
h == pixmap->drawable.height)
diff --git a/src/i915_render.c b/src/i915_render.c
index 37af72b..c4aa9a4 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -385,8 +385,9 @@ i915_prepare_composite(int op, PicturePtr source_picture,
source_picture->format,
PICT_a8r8g8b8,
&intel->render_source_solid))
- return FALSE;
- } else if (!intel_check_pitch_3d(source))
+ intel->render_source_is_solid = FALSE;
+ }
+ if (!intel->render_source_is_solid && !intel_check_pitch_3d(source))
return FALSE;
@@ -402,8 +403,9 @@ i915_prepare_composite(int op, PicturePtr source_picture,
mask_picture->format,
PICT_a8r8g8b8,
&intel->render_mask_solid))
- return FALSE;
- } else if (!intel_check_pitch_3d(mask))
+ intel->render_mask_is_solid = FALSE;
+ }
+ if (!intel->render_mask_is_solid && !intel_check_pitch_3d(mask))
return FALSE;
}
@@ -475,7 +477,6 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
int op = intel->i915_render_state.op;
- PicturePtr source_picture = intel->render_source_picture;
PicturePtr mask_picture = intel->render_mask_picture;
PicturePtr dest_picture = intel->render_dest_picture;
PixmapPtr mask = intel->render_mask;
@@ -589,7 +590,6 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
OUT_BATCH(0x00000000);
}
- OUT_BATCH(MI_NOOP);
ADVANCE_BATCH();
{
@@ -629,10 +629,6 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
i915_fs_texldp(FS_R0, FS_S0, FS_T0);
}
- /* If the texture lacks an alpha channel, force the alpha to 1. */
- if (PICT_FORMAT_A(source_picture->format) == 0)
- i915_fs_mov_masked(FS_R0, MASK_W, i915_fs_operand_one());
-
src_reg = FS_R0;
}
@@ -647,11 +643,6 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
} else {
i915_fs_texldp(FS_R1, FS_S0 + t, FS_T0 + t);
}
- /* If the texture lacks an alpha channel, force the alpha to 1.
- */
- if (PICT_FORMAT_A(mask_picture->format) == 0)
- i915_fs_mov_masked(FS_R1, MASK_W,
- i915_fs_operand_one());
mask_reg = FS_R1;
}
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index e70a845..ca46a2a 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -262,13 +262,15 @@ uxa_get_color_for_pixmap (PixmapPtr pixmap,
*pixel = uxa_get_pixmap_first_pixel(pixmap);
- if (!uxa_get_rgba_from_pixel(*pixel, &red, &green, &blue, &alpha,
- src_format))
+ if (src_format != dst_format) {
+ if (!uxa_get_rgba_from_pixel(*pixel, &red, &green, &blue, &alpha,
+ src_format))
return FALSE;
- if (!uxa_get_pixel_from_rgba(pixel, red, green, blue, alpha,
- dst_format))
+ if (!uxa_get_pixel_from_rgba(pixel, red, green, blue, alpha,
+ dst_format))
return FALSE;
+ }
return TRUE;
}
@@ -364,6 +366,10 @@ uxa_picture_for_pixman_format(ScreenPtr pScreen,
if (format == PIXMAN_a1)
format = PIXMAN_a8;
+ /* fill alpha if unset */
+ if (PIXMAN_FORMAT_A(format) == 0)
+ format = PIXMAN_a8r8g8b8;
+
pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height,
PIXMAN_FORMAT_DEPTH(format),
UXA_CREATE_PIXMAP_FOR_MAP);
@@ -384,64 +390,6 @@ uxa_picture_for_pixman_format(ScreenPtr pScreen,
return pPicture;
}
-/* In order to avoid fallbacks when using an a1 source/mask,
- * for example with non-antialiased trapezoids, we need to
- * expand the bitmap into an a8 Picture. We do so by using the generic
- * composition routines, which while may not be perfect is far faster
- * than causing a fallback.
- */
-static PicturePtr
-uxa_picture_from_a1_pixman_image(ScreenPtr pScreen, pixman_image_t * image)
-{
- PicturePtr pPicture;
- PicturePtr pSrc;
- PixmapPtr pPixmap;
- int width, height;
- int error;
-
- width = pixman_image_get_width(image);
- height = pixman_image_get_height(image);
-
- pPicture = uxa_picture_for_pixman_format (pScreen, PIXMAN_a1,
- width, height);
- if (!pPicture)
- return 0;
-
- pPixmap = GetScratchPixmapHeader(pScreen, width, height, 1, 1,
- pixman_image_get_stride(image),
- pixman_image_get_data(image));
- if (!pPixmap) {
- FreePicture(pPicture, 0);
- return 0;
- }
-
- pSrc = CreatePicture(0, &pPixmap->drawable,
- PictureMatchFormat(pScreen, 1, PICT_a1),
- 0, 0, serverClient, &error);
- if (!pSrc) {
- FreeScratchPixmapHeader(pPixmap);
- FreePicture(pPicture, 0);
- return 0;
- }
-
- ValidatePicture(pSrc);
-
- /* force the fallback path */
- if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
- fbComposite(PictOpSrc, pSrc, NULL, pPicture,
- 0, 0, 0, 0, 0, 0, width, height);
- uxa_finish_access(pPicture->pDrawable);
- } else {
- FreePicture(pPicture, 0);
- pPicture = 0;
- }
-
- FreePicture(pSrc, 0);
- FreeScratchPixmapHeader(pPixmap);
-
- return pPicture;
-}
-
static PicturePtr
uxa_picture_from_pixman_image(ScreenPtr pScreen,
pixman_image_t * image,
@@ -449,12 +397,8 @@ uxa_picture_from_pixman_image(ScreenPtr pScreen,
{
PicturePtr pPicture;
PixmapPtr pPixmap;
- GCPtr pGC;
int width, height;
- if (format == PICT_a1)
- return uxa_picture_from_a1_pixman_image(pScreen, image);
-
width = pixman_image_get_width(image);
height = pixman_image_get_height(image);
@@ -473,18 +417,45 @@ uxa_picture_from_pixman_image(ScreenPtr pScreen,
return 0;
}
- pGC = GetScratchGC(PIXMAN_FORMAT_DEPTH(format), pScreen);
- if (!pGC) {
+ if (((pPicture->pDrawable->depth << 24) | pPicture->format) == format) {
+ GCPtr pGC;
+
+ pGC = GetScratchGC(PIXMAN_FORMAT_DEPTH(format), pScreen);
+ if (!pGC) {
FreeScratchPixmapHeader(pPixmap);
FreePicture(pPicture, 0);
return 0;
- }
- ValidateGC(pPicture->pDrawable, pGC);
+ }
+ ValidateGC(pPicture->pDrawable, pGC);
- (*pGC->ops->CopyArea) (&pPixmap->drawable, pPicture->pDrawable,
- pGC, 0, 0, width, height, 0, 0);
+ (*pGC->ops->CopyArea) (&pPixmap->drawable, pPicture->pDrawable,
+ pGC, 0, 0, width, height, 0, 0);
- FreeScratchGC(pGC);
+ FreeScratchGC(pGC);
+ } else {
+ PicturePtr pSrc;
+ int error;
+
+ pSrc = CreatePicture(0, &pPixmap->drawable,
+ PictureMatchFormat(pScreen,
+ PIXMAN_FORMAT_DEPTH(format),
+ format),
+ 0, 0, serverClient, &error);
+ if (!pSrc) {
+ FreeScratchPixmapHeader(pPixmap);
+ FreePicture(pPicture, 0);
+ return 0;
+ }
+ ValidatePicture(pSrc);
+
+ if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
+ fbComposite(PictOpSrc, pSrc, NULL, pPicture,
+ 0, 0, 0, 0, 0, 0, width, height);
+ uxa_finish_access(pPicture->pDrawable);
+ }
+
+ FreePicture(pSrc, 0);
+ }
Reply to: