diff options
author | Brice Goglin <bgoglin@debian.org> | 2009-05-13 07:12:01 +0200 |
---|---|---|
committer | Brice Goglin <bgoglin@debian.org> | 2009-05-13 07:12:01 +0200 |
commit | 16793fcf39822f3148cb9fbd4a4fb0446a3f80ca (patch) | |
tree | dbbadaa32f213640596702f3cbe84905e28c6a4a | |
parent | 35ad3f37cf6b787bcd9e24bbb008fdb226cea2c4 (diff) | |
parent | ba7d739416796d4045952209a0a0090a78d3978d (diff) | |
download | xf86-video-intel-frc-16793fcf39822f3148cb9fbd4a4fb0446a3f80ca.tar.gz xf86-video-intel-frc-16793fcf39822f3148cb9fbd4a4fb0446a3f80ca.tar.bz2 |
Merge tag '2.7.1' into debian-unstable
-rw-r--r-- | NEWS | 47 | ||||
-rw-r--r-- | README | 14 | ||||
-rw-r--r-- | RELEASING | 43 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/drmmode_display.c | 171 | ||||
-rw-r--r-- | src/i830_batchbuffer.h | 2 | ||||
-rw-r--r-- | src/i830_video.c | 1 | ||||
-rw-r--r-- | src/i915_video.c | 18 | ||||
-rw-r--r-- | src/i965_video.c | 11 |
9 files changed, 280 insertions, 29 deletions
@@ -1,3 +1,40 @@ +Release 2.7.1 (2009-05-12) +-------------------------- +This is a maintenance release on the 2.7 branch. Compared to 2.7.0 it +consists only of a few carefully hand-picked fixes for bugs, +(including GPU crashers). We encourage all users of 2.7.0 to upgrade +to 2.7.1. + +Bug fixes since 2.7.0: + + * KMS: Hook up output properties for RANDR, (this allows output + properties to be controlled in the KMS case just as in the UMS + case). [Zhenyu Wang <zhenyu.z.wang@intel.com>] + + * Fix multiplication error when computing required batch space. + This could fix any number of cases where the driver did + inexplicable things (due to having computed the wrong + size). [Keith Packard <keithp@keithp.com>] + + * Hold reference to video binding table until all rects are + painted. This prevent general chaos in the buffer + manager. [Keith Packard <keithp@keithp.com>] + + * Split i915 textured video commands to fit into batch + buffers. Video and 3D setup commands share the same batch + buffer, so without this fix, various problems could occur when + video and 3D clients were both heavily active at the same + time. [Keith Packard <keithp@keithp.com>] + + * Fix crash with XV with large virtual display (> 2049). [Albert + Damen <albrt@gmx.net>] + + * Provide missing value to 3D_STATE_VERTEX_BUFFERS command. We + don't know that this was causing any problem, but the change + does bring the driver into conformance with what the + specification says the hardware requires here. [Keith Packard + <keithp@keithp.com>] + Release 2.7.0 (2009-04-15) -------------------------- Compared to the 2.6 series, 2.7.0 has a large number of bug fixes, but @@ -19,6 +56,16 @@ this release, which should give the best performance and robustness. When KMS is available, UXA is the default acceleration used by the driver, (EXA is the default otherwise). +Known issue: + + Some Linux kernel versions (such as 2.6.29) are known to have + broken PAT code that causes recent versions of this driver to + fail, (which can manifest as the X server simply not + starting). This can be verified by adding the "nopat" option + to the kernel command-line and seeing the failure go away. We + hope that newer kernels in the 2.6.29.x as well as 2.6.30 and + above will have working PAT code. + Some of the most notable bugs fixed in 2.7.0 include: [GM45 965GM] bad htotal causes panel startup failure @@ -9,11 +9,10 @@ the X Window System as implemented by X.org. It supports a variety of Intel graphics chipsets including: i810/i810e/i810-dc100,i815, - i830M,845G,852GM,855GM,865M, + i830M,845G,852GM,855GM,865G, 915G/GM,945G/GM/GME,946GZ - G/GM/GME965, - G/Q33,G/Q35,G41,G/Q43 - G/GM/Q45 + G/GM/GME/Q965, + G/Q33,G/Q35,G41,G/Q43,G/GM/Q45 Where to get more information about the driver ---------------------------------------------- @@ -39,12 +38,9 @@ xf86-video-intel: http://lists.freedesktop.org/mailman/listinfo/intel-gfx -To report bugs encountered with the driver: +To report bugs encountered with the driver, see: - http://bugs.freedesktop.org - - Product: xorg - Component: Driver/intel + http://intellinuxgraphics.org/how_to_report_bug.html To see bugs that are targeted to be fixed in the next release: @@ -1,32 +1,51 @@ The process for releasing a new tarball is as follows: -1. make sure you have the latest build requirements installed: +1. Make sure you have the latest build requirements installed: git://git.freedesktop.org/git/util/macros git://git.freedesktop.org/git/util/modular -2. update your module version (usually found in configure.ac) +2. Add relevant release notes to the NEWS files + + Skim the git log since the last release, and add notes in a + similar style to previous releases. + + For major releases list added features and known limitations. + + For minor releases indicate which bugs were fixed and which + are still present. + + +3. Update your module version (usually found in configure.ac) $ vi configure.ac # bump version $ git push origin # make sure you're on the release branch -3. verify your module builds +4. Verify your module builds $ make distcheck -4. tag the release +5. Tag the release + + $ git tag -m "Intel <ver> release" <ver> + +6. Run the release script (this should push the tag) + + $ <path_to>/util/modular/release.sh driver <last_ver> <ver> + +7. Edit and send the generated release message. - $ git tag -m "Intel <ver> release" xf86-video-intel-<ver> + At the very least, add the release notes from the NEWS file. -5. run the release script (this should push the tag) + The message is generated as xf86-video-inte-<version>.announce - $ <path_to>/util/modular/release.sh driver xf86-video-intel-<last_ver> xf86-video-intel-<ver> + For snapshots and release candidates, mail to: -6. edit the generated release message as needed and send it out + intel-gfx@lists.freedesktop.org - for major releases list added features and known limitations + For major releases also send to: - for minor releases indicate which bugs were fixed and which - are still present + xorg@lists.freedesktop.org + xorg-announce@lists.freedesktop.org -7. throw a release party, you're done! :) +8. Throw a release party, you're done! :) diff --git a/configure.ac b/configure.ac index 41ae79cd..c70d7a65 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-intel], - 2.7.0, + 2.7.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-video-intel) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index a276ff7c..7b97a646 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -35,6 +35,7 @@ #include "i830.h" #include "intel_bufmgr.h" #include "xf86drmMode.h" +#include "X11/Xatom.h" typedef struct { int fd; @@ -52,11 +53,20 @@ typedef struct { } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr; typedef struct { + drmModePropertyPtr mode_prop; + uint64_t value; + int num_atoms; /* if range prop, num_atoms == 1; if enum prop, num_atoms == num_enums + 1 */ + Atom *atoms; +} drmmode_prop_rec, *drmmode_prop_ptr; + +typedef struct { drmmode_ptr drmmode; int output_id; drmModeConnectorPtr mode_output; drmModeEncoderPtr mode_encoder; drmModePropertyBlobPtr edid_blob; + int num_props; + drmmode_prop_ptr props; } drmmode_output_private_rec, *drmmode_output_private_ptr; static void @@ -508,9 +518,15 @@ static void drmmode_output_destroy(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; + int i; if (drmmode_output->edid_blob) drmModeFreePropertyBlob(drmmode_output->edid_blob); + for (i = 0; i < drmmode_output->num_props; i++) { + drmModeFreeProperty(drmmode_output->props[i].mode_prop); + xfree(drmmode_output->props[i].atoms); + } + xfree(drmmode_output->props); drmModeFreeConnector(drmmode_output->mode_output); xfree(drmmode_output); output->driver_private = NULL; @@ -542,7 +558,162 @@ drmmode_output_dpms(xf86OutputPtr output, int mode) } } +static Bool +drmmode_property_ignore(drmModePropertyPtr prop) +{ + if (!prop) + return TRUE; + /* ignore blob prop */ + if (prop->flags & DRM_MODE_PROP_BLOB) + return TRUE; + /* ignore standard property */ + if (!strcmp(prop->name, "EDID") || + !strcmp(prop->name, "DPMS")) + return TRUE; + + return FALSE; +} + +static void +drmmode_output_create_resources(xf86OutputPtr output) +{ + drmmode_output_private_ptr drmmode_output = output->driver_private; + drmModeConnectorPtr mode_output = drmmode_output->mode_output; + drmmode_ptr drmmode = drmmode_output->drmmode; + drmModePropertyPtr drmmode_prop; + int i, j, err; + + drmmode_output->props = xcalloc(mode_output->count_props, sizeof(drmmode_prop_rec)); + if (!drmmode_output->props) + return; + + drmmode_output->num_props = 0; + for (i = 0, j = 0; i < mode_output->count_props; i++) { + drmmode_prop = drmModeGetProperty(drmmode->fd, mode_output->props[i]); + if (drmmode_property_ignore(drmmode_prop)) { + drmModeFreeProperty(drmmode_prop); + continue; + } + drmmode_output->props[j].mode_prop = drmmode_prop; + drmmode_output->props[j].value = mode_output->prop_values[i]; + drmmode_output->num_props++; + j++; + } + + for (i = 0; i < drmmode_output->num_props; i++) { + drmmode_prop_ptr p = &drmmode_output->props[i]; + drmmode_prop = p->mode_prop; + + if (drmmode_prop->flags & DRM_MODE_PROP_RANGE) { + INT32 range[2]; + + p->num_atoms = 1; + p->atoms = xcalloc(p->num_atoms, sizeof(Atom)); + if (!p->atoms) + continue; + p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE); + range[0] = drmmode_prop->values[0]; + range[1] = drmmode_prop->values[1]; + err = RRConfigureOutputProperty(output->randr_output, p->atoms[0], + FALSE, TRUE, + drmmode_prop->flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE, + 2, range); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRConfigureOutputProperty error, %d\n", err); + } + err = RRChangeOutputProperty(output->randr_output, p->atoms[0], + XA_INTEGER, 32, PropModeReplace, 1, &p->value, FALSE, TRUE); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRChangeOutputProperty error, %d\n", err); + } + } else if (drmmode_prop->flags & DRM_MODE_PROP_ENUM) { + p->num_atoms = drmmode_prop->count_enums + 1; + p->atoms = xcalloc(p->num_atoms, sizeof(Atom)); + if (!p->atoms) + continue; + p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE); + for (j = 1; j <= drmmode_prop->count_enums; j++) { + struct drm_mode_property_enum *e = &drmmode_prop->enums[j-1]; + p->atoms[j] = MakeAtom(e->name, strlen(e->name), TRUE); + } + err = RRConfigureOutputProperty(output->randr_output, p->atoms[0], + FALSE, FALSE, + drmmode_prop->flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE, + p->num_atoms - 1, (INT32 *)&p->atoms[1]); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRConfigureOutputProperty error, %d\n", err); + } + for (j = 0; j < drmmode_prop->count_enums; j++) + if (drmmode_prop->enums[j].value == p->value) + break; + /* there's always a matching value */ + err = RRChangeOutputProperty(output->randr_output, p->atoms[0], + XA_ATOM, 32, PropModeReplace, 1, &p->atoms[j+1], FALSE, TRUE); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRChangeOutputProperty error, %d\n", err); + } + } + } +} + +static Bool +drmmode_output_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + drmmode_output_private_ptr drmmode_output = output->driver_private; + drmmode_ptr drmmode = drmmode_output->drmmode; + int i; + + for (i = 0; i < drmmode_output->num_props; i++) { + drmmode_prop_ptr p = &drmmode_output->props[i]; + + if (p->atoms[0] != property) + continue; + + if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) { + uint32_t val; + + if (value->type != XA_INTEGER || value->format != 32 || + value->size != 1) + return FALSE; + val = *(uint32_t *)value->data; + + drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, + p->mode_prop->prop_id, (uint64_t)val); + return TRUE; + } else if (p->mode_prop->flags & DRM_MODE_PROP_ENUM) { + Atom atom; + const char *name; + int j; + + if (value->type != XA_ATOM || value->format != 32 || value->size != 1) + return FALSE; + memcpy(&atom, value->data, 4); + name = NameForAtom(atom); + + /* search for matching name string, then set its value down */ + for (j = 0; j < p->mode_prop->count_enums; j++) { + if (!strcmp(p->mode_prop->enums[j].name, name)) { + drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, + p->mode_prop->prop_id, p->mode_prop->enums[j].value); + return TRUE; + } + } + } + } + /* no property found? */ + return FALSE; +} + static const xf86OutputFuncsRec drmmode_output_funcs = { + .create_resources = drmmode_output_create_resources, +#ifdef RANDR_12_INTERFACE + .set_property = drmmode_output_set_property, +#endif .dpms = drmmode_output_dpms, #if 0 diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h index a72786e5..ec870847 100644 --- a/src/i830_batchbuffer.h +++ b/src/i830_batchbuffer.h @@ -56,7 +56,7 @@ intel_batch_start_atomic(ScrnInfoPtr pScrn, unsigned int sz) I830Ptr pI830 = I830PTR(pScrn); assert(!pI830->in_batch_atomic); - intel_batch_require_space(pScrn, pI830, sz); + intel_batch_require_space(pScrn, pI830, sz * 4); pI830->in_batch_atomic = TRUE; pI830->batch_atomic_limit = pI830->batch_used + sz * 4; diff --git a/src/i830_video.c b/src/i830_video.c index 4ed30478..a62d7a13 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2392,6 +2392,7 @@ I830PutImage(ScrnInfoPtr pScrn, return BadAlloc; if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) { drm_intel_bo_unreference(pPriv->buf); + pPriv->buf = NULL; xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to pin xv buffer\n"); return BadAlloc; diff --git a/src/i915_video.c b/src/i915_video.c index 93e0c86a..afa10551 100644 --- a/src/i915_video.c +++ b/src/i915_video.c @@ -50,7 +50,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, I830Ptr pI830 = I830PTR(pScrn); uint32_t format, ms3, s5; BoxPtr pbox = REGION_RECTS(dstRegion); - int nbox = REGION_NUM_RECTS(dstRegion); + int nbox_total = REGION_NUM_RECTS(dstRegion); + int nbox_this_time; int dxo, dyo, pix_xoff, pix_yoff; Bool planar; @@ -73,7 +74,17 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, return; } - intel_batch_start_atomic(pScrn, 200 + 20 * nbox); +#define BYTES_FOR_BOXES(n) ((200 + (n) * 20) * 4) +#define BOXES_IN_BYTES(s) ((((s)/4) - 200) / 20) +#define BATCH_BYTES(p) ((p)->batch_bo->size - 16) + + while (nbox_total) { + nbox_this_time = nbox_total; + if (BYTES_FOR_BOXES(nbox_this_time) > BATCH_BYTES(pI830)) + nbox_this_time = BOXES_IN_BYTES(BATCH_BYTES(pI830)); + nbox_total -= nbox_this_time; + + intel_batch_start_atomic(pScrn, 200 + 20 * nbox_this_time); IntelEmitInvarientState(pScrn); pI830->last_3d = LAST_3D_VIDEO; @@ -366,7 +377,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, dxo = dstRegion->extents.x1; dyo = dstRegion->extents.y1; - while (nbox--) + while (nbox_this_time--) { int box_x1 = pbox->x1; int box_y1 = pbox->y1; @@ -415,6 +426,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, } intel_batch_end_atomic(pScrn); + } i830MarkSync(pScrn); } diff --git a/src/i965_video.c b/src/i965_video.c index f6020d4e..7b52de71 100644 --- a/src/i965_video.c +++ b/src/i965_video.c @@ -795,7 +795,6 @@ i965_emit_video_setup(ScrnInfoPtr pScrn, drm_intel_bo *bind_bo, int n_src_surf) OUT_BATCH(0); /* sf */ /* Only the PS uses the binding table */ OUT_RELOC(bind_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); - drm_intel_bo_unreference(bind_bo); /* Blend constant color (magenta is fun) */ OUT_BATCH(BRW_3DSTATE_CONSTANT_COLOR | 3); @@ -1131,15 +1130,16 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, i965_emit_video_setup(pScrn, bind_bo, n_src_surf); - BEGIN_BATCH(10); + BEGIN_BATCH(12); /* Set up the pointer to our vertex buffer */ - OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 2); + OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 3); /* four 32-bit floats per vertex */ OUT_BATCH((0 << VB0_BUFFER_INDEX_SHIFT) | VB0_VERTEXDATA | ((4 * 4) << VB0_BUFFER_PITCH_SHIFT)); OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, 0); OUT_BATCH(3); /* four corners to our rectangle */ + OUT_BATCH(0); /* reserved */ OUT_BATCH(BRW_3DPRIMITIVE | BRW_3DPRIMITIVE_VERTEX_SEQUENTIAL | @@ -1151,6 +1151,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, OUT_BATCH(1); /* single instance */ OUT_BATCH(0); /* start instance location */ OUT_BATCH(0); /* index buffer offset, ignored */ + OUT_BATCH(MI_NOOP); ADVANCE_BATCH(); intel_batch_end_atomic(pScrn); @@ -1161,6 +1162,10 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, } i830MarkSync(pScrn); + + /* release reference once we're finished */ + drm_intel_bo_unreference(bind_bo); + #if WATCH_STATS i830_dump_error_state(pScrn); #endif |