summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2012-12-16 16:02:59 +0100
committerMatthieu Herrb <matthieu.herrb@laas.fr>2012-12-16 16:02:59 +0100
commit352dd91679e11fdced0768111781a389b57dfd2a (patch)
treee15b84ddba55e1dfea9deafbcd51aac6245db270
parentcdd42aa432c6ee214ff37082872965da7e801023 (diff)
parenta96a4e28a079499b18b441f0b6c05c50dd86ead6 (diff)
Merge remote-tracking branch 'origin/master' into obsd
-rw-r--r--NEWS64
-rw-r--r--configure.ac2
-rw-r--r--src/cim/cim_df.c8
-rw-r--r--src/cim/cim_vg.c5
-rw-r--r--src/cim/cim_vip.c6
-rw-r--r--src/cim/cim_vop.c12
-rw-r--r--src/compat-api.h2
-rw-r--r--src/geode.h1
-rw-r--r--src/gx_accel.c2
-rw-r--r--src/gx_randr.c6
-rw-r--r--src/gx_rotate.c4
-rw-r--r--src/lx_exa.c70
-rw-r--r--src/lx_video.c1
13 files changed, 133 insertions, 50 deletions
diff --git a/NEWS b/NEWS
index fee3a0d..088f9f3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,51 @@
+Geode 2.11.14 (2012-11-25)
+==========================
+Better compatibility with xserver-1.13, cairo-1.12 and gtk3:
+
+ * Fix building on Xservers without XAA (Maarten Lankhorst)
+ xserver-1.13 dropped XAA acceleration method, as it does not accel
+ anything important used on modern desktops.
+ The geode driver now supports configuring whether to include XAA
+ support - by default it is automatically disabled with newest
+ xservers that do not support it, but can be explicitly disabled for
+ older xservers as well if desired (particularly for LX deployments).
+ XAA support remains in place for the time being for older xservers,
+ as the EXA support for GX2 GPUs is of unknown quality and speed.
+
+ * Fix building with new xserver-1.13 API (Maarten Lankhorst)
+ xserver-1.13 changed API, including moving various global symbols
+ behind function calls, to better support multiple switchable graphics
+ cards and hotplugged (USB) graphics cards. Work done to support both
+ pre-1.13 and 1.13+ APIs in other drivers is reused to bring the same
+ support to the Geode driver.
+
+ * Implement solid source pictures acceleration (Mart Raudsepp)
+ cairo-1.12 uses these extensively for text rendering, instead of 1x1
+ repeating images that cairo-1.10 used and we already accelerate.
+ Without acceleration, in addition to being slow, we'd hit a fallback
+ handling bug in EXA with xserver older than 1.13.1, which results in
+ very visible text corruption in many instances.
+
+ * Handle negative srcX and srcY parameters better in EXA Composite
+ operations, used via the RENDER extension (Mart Raudsepp)
+ Handling of source picture coordinates outside actual source pixmap
+ area is still subpar and ignoring spec in some corner cases, but
+ a more specific case is improved to provide correct results in more
+ situations. In particular this fixes GtkTrayIcon drawing via cairo as
+ used by gtk3, specifically as seen in GNOME3 fallback desktop.
+ Previously no icon was drawn at all if the icon needed centering to the
+ drawing area, which in the end is achieved via a negative srcX/srcY.
+ https://bugs.freedesktop.org/show_bug.cgi?id=51360
+
+ * Fix builds for exotic and/or non-target platforms (Dave Airlie)
+
+ * Clarify the copyright of older AMD commits (Martin-Éric Racine)
+
+VALIDATION PLATFORMS
+ * Debian (X server 1.7.7) on Artec DBE61 and Hercules EC-800.
+ * Debian (X server 1.12.14) on FIC ION603A.
+ * Fedora (X server 1.13) on OLPC XO-1.
+
Geode 2.11.13 (2011-12-26)
==========================
This release mainly features a complete overhaul of the building scripts plus
@@ -17,8 +65,8 @@ this driver. This can be used to profile the performance during development.
Fixes to keep this driver compilable on recent X servers are also included.
VALIDATION PLATFORMS
-* Debian/stable (X server 1.7.7) on Artec DBE61 and Hercules EC-800.
-* Ubuntu/Precise (X server 1.10.4) on FIC ION603A.
+* Debian (X server 1.7.7) on Artec DBE61 and Hercules EC-800.
+* Ubuntu (X server 1.10.4) on FIC ION603A.
Geode 2.11.12 (2011-02-13)
==========================
@@ -26,18 +74,18 @@ This release drops the "linux/videodev.h" include in z4l.c because
V4L1 support was dropped as of Linux kernel 2.6.38, and it fixes
packed overlay offscreen allocations.
-Geode 2.11.10 (2010-11-09)
-==========================
-This release migrates deprecated xalloc/xrealloc/xfree/xcalloc calls
-to malloc/realloc/free/calloc, fixes several DCON-specific issues,
-improves mode validation and adds support for one WXGA resolution.
-
Geode 2.11.11 (2010-12-27)
==========================
This release restores code compatibility down to X server 1.4, it fixes
compilation under 1.9.99 and newer, and it improves handling of gamma
correction in video vs graphics
+Geode 2.11.10 (2010-11-09)
+==========================
+This release migrates deprecated xalloc/xrealloc/xfree/xcalloc calls
+to malloc/realloc/free/calloc, fixes several DCON-specific issues,
+improves mode validation and adds support for one WXGA resolution.
+
Geode 2.11.9 (2010-08-23)
=========================
We are pleased to announce this maintenance release of xf86-video-geode.
diff --git a/configure.ac b/configure.ac
index 94740e7..4e9e83a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.59)
AC_INIT([xf86-video-geode],
- [2.11.13],
+ [2.11.14],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode],
[xf86-video-geode],
[http://www.x.org/wiki/GeodeDriver])
diff --git a/src/cim/cim_df.c b/src/cim/cim_df.c
index abf1745..d3c1149 100644
--- a/src/cim/cim_df.c
+++ b/src/cim/cim_df.c
@@ -153,8 +153,8 @@ df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd,
/* PARAMETER - VIDEO PITCH */
pitch =
- (video_source_odd->
- y_pitch >> 3) | ((video_source_odd->uv_pitch >> 3) << 16);
+ (video_source_odd->y_pitch >> 3) | ((video_source_odd->uv_pitch >> 3) <<
+ 16);
/* PARAMETER - VIDEO FORMAT */
@@ -1031,8 +1031,8 @@ df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * cursor_color_key)
key = READ_VID32(DF_CURSOR_COLOR_KEY) & DF_CURSOR_COLOR_KEY_ENABLE;
key =
- key | (cursor_color_key->
- key & 0xFFFFFF) | (cursor_color_key->select_color2 << 24);
+ key | (cursor_color_key->key & 0xFFFFFF) | (cursor_color_key->
+ select_color2 << 24);
WRITE_VID32(DF_CURSOR_COLOR_KEY, key);
WRITE_VID32(DF_CURSOR_COLOR_MASK, (cursor_color_key->mask & 0xFFFFFF));
diff --git a/src/cim/cim_vg.c b/src/cim/cim_vg.c
index bc429cb..784519d 100644
--- a/src/cim/cim_vg.c
+++ b/src/cim/cim_vg.c
@@ -897,9 +897,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp)
if ((mode_params->flags & VG_MODEFLAG_BANDWIDTHMASK) ==
VG_MODEFLAG_HIGH_BAND || ((mode_params->flags & VG_MODEFLAG_INTERLACED)
- && (mode_params->
- flags & VG_MODEFLAG_INT_MASK) ==
- VG_MODEFLAG_INT_FLICKER) ||
+ && (mode_params->flags & VG_MODEFLAG_INT_MASK)
+ == VG_MODEFLAG_INT_FLICKER) ||
(irq_ctl & DC3_IRQFILT_GFX_FILT_EN)) {
/* HIGH BANDWIDTH */
/* Set agressive watermarks and disallow forced low priority */
diff --git a/src/cim/cim_vip.c b/src/cim/cim_vip.c
index 9ecfad3..a88b65f 100644
--- a/src/cim/cim_vip.c
+++ b/src/cim/cim_vip.c
@@ -794,8 +794,7 @@ vip_set_priority_characteristics(VIPPRIORITYBUFFER * buffer)
VIP_MSR_MCR_SECOND_PRIORITY_SHIFT) &
VIP_MSR_MCR_SECOND_PRIORITY_MASK;
q_word.low |=
- (buffer->
- primary << VIP_MSR_MCR_PRIMARY_PRIORITY_SHIFT) &
+ (buffer->primary << VIP_MSR_MCR_PRIMARY_PRIORITY_SHIFT) &
VIP_MSR_MCR_PRIMARY_PRIORITY_MASK;
q_word.low |= (buffer->pid << VIP_MSR_MCR_PID_SHIFT) & VIP_MSR_MCR_PID_MASK;
@@ -922,8 +921,7 @@ vip_set_subwindow_enable(VIPSUBWINDOWBUFFER * buffer)
WRITE_VIP32(VIP_VERTICAL_START_STOP, ((buffer->stop <<
VIP_VSTART_VERTEND_SHIFT) &
VIP_VSTART_VERTEND_MASK) |
- ((buffer->
- start << VIP_VSTART_VERTSTART_SHIFT) &
+ ((buffer->start << VIP_VSTART_VERTSTART_SHIFT) &
VIP_VSTART_VERTSTART_MASK));
/* ENABLE IN THE CONTROL REGISTER */
diff --git a/src/cim/cim_vop.c b/src/cim/cim_vop.c
index fe73e98..5a85998 100644
--- a/src/cim/cim_vop.c
+++ b/src/cim/cim_vop.c
@@ -101,17 +101,13 @@ vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer)
WRITE_REG32(DC3_VBI_LN_ODD, ((buffer->odd_line_offset <<
DC3_VBI_ODD_LINE_SHIFT) &
- DC3_VBI_ODD_LINE_MASK) | (buffer->
- odd_line_capture_mask
- &
- DC3_VBI_ODD_ENABLE_MASK));
+ DC3_VBI_ODD_LINE_MASK) |
+ (buffer->odd_line_capture_mask & DC3_VBI_ODD_ENABLE_MASK));
WRITE_REG32(DC3_VBI_LN_EVEN, ((buffer->even_line_offset <<
DC3_VBI_EVEN_LINE_SHIFT) &
- DC3_VBI_EVEN_LINE_MASK) | (buffer->
- even_line_capture_mask
- &
- DC3_VBI_EVEN_ENABLE_MASK));
+ DC3_VBI_EVEN_LINE_MASK) |
+ (buffer->even_line_capture_mask & DC3_VBI_EVEN_ENABLE_MASK));
/* PROGRAM SOURCE OFFSETS
* Start with the even offsets. Note that we always enable 16-bit VBI,
diff --git a/src/compat-api.h b/src/compat-api.h
index e296829..f8b8416 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -77,7 +77,7 @@
#define VALID_MODE_ARGS_DECL int arg, DisplayModePtr pMode, Bool Verbose, int flags
-#else /*XF86_SCRN_INTERFACE)*/
+#else /*XF86_SCRN_INTERFACE) */
#define DDC_CALL(pScrni) (pScrni)
diff --git a/src/geode.h b/src/geode.h
index b733805..ac69368 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -395,6 +395,7 @@ int GeodeGetSizeFromFB(unsigned int *);
int
+
GeodeQueryImageAttributes(ScrnInfoPtr, int id, unsigned short *w,
unsigned short *h, int *pitches, int *offsets);
diff --git a/src/gx_accel.c b/src/gx_accel.c
index 764e0db..c3b3bc4 100644
--- a/src/gx_accel.c
+++ b/src/gx_accel.c
@@ -2082,7 +2082,7 @@ GXAccelInit(ScreenPtr pScrn)
#endif
return (XAAInit(pScrn, localRecPtr));
-#else /* XF86XAA */
+#else /* XF86XAA */
return FALSE;
#endif
}
diff --git a/src/gx_randr.c b/src/gx_randr.c
index 5b83094..c0ca3b9 100644
--- a/src/gx_randr.c
+++ b/src/gx_randr.c
@@ -181,7 +181,8 @@ GXRandRSetMode(ScreenPtr pScreen,
#endif
if (pRoot)
- (*pScrni->EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, FALSE));
+ (*pScrni->
+ EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, FALSE));
if (useVirtual) {
pScrni->virtualX = pRandr->virtualX;
@@ -236,7 +237,8 @@ GXRandRSetMode(ScreenPtr pScreen,
xf86SetViewport(pScreen, 0, 0);
if (pRoot)
- (*pScrni->EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, TRUE));
+ (*pScrni->
+ EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, TRUE));
return ret;
}
diff --git a/src/gx_rotate.c b/src/gx_rotate.c
index 3f7c911..6076a40 100644
--- a/src/gx_rotate.c
+++ b/src/gx_rotate.c
@@ -152,8 +152,8 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode)
pScrni->pScreen->rootDepth,
pScrni->bitsPerPixel,
PixmapBytePad(pScrni->displayWidth,
- pScrni->pScreen->
- rootDepth),
+ pScrni->
+ pScreen->rootDepth),
(pointer) (pGeode->FBBase +
pScrni->fbOffset));
diff --git a/src/lx_exa.c b/src/lx_exa.c
index 8f3cb68..60edd1b 100644
--- a/src/lx_exa.c
+++ b/src/lx_exa.c
@@ -549,7 +549,10 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
/* XXX - don't know if we can do any hwaccel on solid fills or gradient types in generic cases */
if (pMsk && pMsk->pSourcePict)
- GEODE_FALLBACK(("%s are not supported as a mask\n", pMsk->pSourcePict->type == SourcePictTypeSolidFill ? "Solid pictures" : "Gradients"));
+ GEODE_FALLBACK(("%s are not supported as a mask\n",
+ pMsk->pSourcePict->type ==
+ SourcePictTypeSolidFill ? "Solid pictures" :
+ "Gradients"));
if (pSrc->pSourcePict && pSrc->pSourcePict->type != SourcePictTypeSolidFill)
GEODE_FALLBACK(("Gradients are not supported as the source\n"));
@@ -612,7 +615,8 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
/* Direction 0 indicates src->dst, 1 indicates dst->src */
- if (((direction == 0) && (pSrc->pDrawable && pSrc->pDrawable->bitsPerPixel < 16)) ||
+ if (((direction == 0) &&
+ (pSrc->pDrawable && pSrc->pDrawable->bitsPerPixel < 16)) ||
((direction == 1) && (pDst->pDrawable->bitsPerPixel < 16))) {
ErrorF("Mask blending unsupported with <16bpp\n");
return FALSE;
@@ -621,17 +625,21 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
GEODE_FALLBACK(("Masks can be only done with a 8bpp or 4bpp depth\n"));
/* The pSrc should be 1x1 pixel if the pMsk is not zero */
- if (pSrc->pDrawable && (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1))
+ if (pSrc->pDrawable &&
+ (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1))
GEODE_FALLBACK(("pSrc should be 1x1 pixel if pMsk is not zero\n"));
/* FIXME: In lx_prepare_composite, there are no variables to record the
* one pixel source's width and height when the mask is not zero.
* That will lead to bigger region to render instead of one pixel in lx
* _do_composite, so we should fallback currently to avoid this */
/* Not an issue for solid pictures, because we'll treat it as 1x1R too */
- if (!pSrc->repeat && !(pSrc->pSourcePict && pSrc->pSourcePict->type == SourcePictTypeSolidFill)) {
+ if (!pSrc->repeat &&
+ !(pSrc->pSourcePict &&
+ pSrc->pSourcePict->type == SourcePictTypeSolidFill)) {
GEODE_FALLBACK(("FIXME: unzero mask might lead to bigger rendering region than 1x1 pixels\n"));
}
- } else {
+ }
+ else {
if (pSrc->pSourcePict)
GEODE_FALLBACK(("Solid source pictures without a mask are not supported\n"));
}
@@ -691,7 +699,8 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
/* Get the source color */
if (pSrc->pSourcePict) {
exaScratch.srcColor = pSrc->pSourcePict->solidFill.color;
- } else {
+ }
+ else {
/* If the op is PictOpOver(or PictOpOutReverse, PictOpInReverse,
* PictOpIn, PictOpOut, PictOpOverReverse), we should get the
* ARGB32 source format */
@@ -981,12 +990,9 @@ lx_composite_onepass_special(PixmapPtr pxDst, int width, int height, int opX,
opWidth = ((opX + width) - optempX) > exaScratch.srcWidth
? exaScratch.srcWidth : ((opX + width) - optempX);
opHeight = ((opY + height) - optempY) > (exaScratch.srcHeight -
- srcY) ? (exaScratch.
- srcHeight -
- srcY) : ((opY +
- height)
- -
- optempY);
+ srcY)
+ ? (exaScratch.srcHeight - srcY) : ((opY + height)
+ - optempY);
}
else {
srcOffset = GetSrcOffset(0, 0);
@@ -1303,8 +1309,8 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
if (exaScratch.type == COMP_TYPE_ONEPASS) {
/* This is the condition srcX or/and srcY is/are out of source
* region */
- if (((srcX >= 0 && srcY >= exaScratch.srcHeight)
- || (srcX >= exaScratch.srcWidth && srcY >= 0)) &&
+ if (((srcY >= 0 && srcY >= exaScratch.srcHeight)
+ || (srcX >= 0 && srcX >= exaScratch.srcWidth)) &&
(exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) {
if (exaScratch.repeat == 1) {
opWidth = width;
@@ -1345,8 +1351,29 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
opHeight = height;
}
else {
- /* Have not met this condition till now */
- return;
+ /* FIXME: We can't support negative srcX/Y for all corner cases in
+ * a sane way without a bit bigger refactoring. So as to avoid
+ * gross misrenderings (e.g missing tray icons) in current real-world
+ * applications, just shift destination appropriately for now and
+ * ignore out of bounds source pixmap zero-vector handling. This is
+ * actually correct for PictOpOver, but PictOpSrc out of bounds regions
+ * should be blacked out, but aren't - without this workaround however
+ * it'd be simply all black instead, which is probably worse till a full
+ * clean solution solves it for all cases. */
+ if (srcX < 0) {
+ opX -= srcX;
+ srcX = 0;
+ }
+
+ if (srcY < 0) {
+ opY -= srcY;
+ srcY = 0;
+ }
+
+ /* EXA has taken care of adjusting srcWidth if it gets cut on the right */
+ width = opWidth = exaScratch.srcWidth;
+ /* EXA has taken care of adjusting srcHeight if it gets cut on the bottom */
+ height = opHeight = exaScratch.srcHeight;
}
}
else {
@@ -1470,6 +1497,17 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
}
/* All black out of the source */
if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ONEPASS)) {
+ /* FIXME: We black out the source here, so that any further regions
+ * in the loop get handled as a source that's a zero-vector (as
+ * defined for out-of-bounds from source pixmap for RepeatModeNone),
+ * but this will likely interfere with cases where srcX and/or srcY
+ * is negative - as opposed to e.g width being larger than srcWidth,
+ * which is exercised in rendercheck (always rectangle in top-left
+ * corner).
+ * Additionally it forces the drawing into tiles of srcWidth/srcHeight
+ * for non-repeat modes too, where we don't really need to tile it like
+ * this and could draw the out of bound regions all at once (or at most
+ * in 4 operations without the big loop). */
lx_composite_all_black(srcOffset, exaScratch.srcWidth,
exaScratch.srcHeight);
}
diff --git a/src/lx_video.c b/src/lx_video.c
index 5dbe224..eb46cb5 100644
--- a/src/lx_video.c
+++ b/src/lx_video.c
@@ -70,6 +70,7 @@ static void LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit);
static void
+
LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height,
BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH);