xf86-video-intel: Branch '2.7' - 4 commits - NEWS README RELEASING src/drmmode_display.c
Carl Worth
cworth at kemper.freedesktop.org
Fri Apr 17 11:04:05 PDT 2009
NEWS | 10 ++
README | 14 +---
RELEASING | 34 ++++++---
src/drmmode_display.c | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 207 insertions(+), 22 deletions(-)
New commits:
commit 296a986e5258e2fd13ec494071b7063bd639cd68
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date: Mon Mar 23 19:19:58 2009 +0800
KMS: hook up output properties for randr
This gets output properties from kernel, then hook them up
for randr. So we can control output properties through randr
like in UMS.
Signed-off-by: Zhenyu Wang <zhenyu.z.wang at intel.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index a276ff7..7b97a64 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
commit 300eddb8773344bf073f8f30a9c0a2c4bcdf983f
Author: Carl Worth <cworth at cworth.org>
Date: Wed Apr 15 18:18:14 2009 -0700
README: Fix typos in chipset list, and point to how_to_report_bug web page
Thanks to Gordon Jin for these suggestions.
(cherry picked from commit 73c3be1aa033e8c5c7ee777eb2fd43c19668fa86)
diff --git a/README b/README
index 8ac6e1f..96db084 100644
--- a/README
+++ b/README
@@ -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:
commit e1d336e9885fc4bb219dfc347570bb2ec637ff7d
Author: Carl Worth <cworth at cworth.org>
Date: Wed Apr 15 16:44:11 2009 -0700
RELEASING: Update instructions to reflect some minor process improvements
We've added a NEWS file now, so that needs to be updated for each release.
We're also now using tag names of just <version> rather than
xf86-video-intel-<version>.
(cherry picked from commit 3fd5a1ecd1d5140ae07ccc279298bcadd515e97f)
diff --git a/RELEASING b/RELEASING
index c4006c3..9376110 100644
--- a/RELEASING
+++ b/RELEASING
@@ -1,32 +1,40 @@
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
-
- $ git tag -m "Intel <ver> release" xf86-video-intel-<ver>
+5. Tag the release
-5. run the release script (this should push the tag)
+ $ git tag -m "Intel <ver> release" <ver>
- $ <path_to>/util/modular/release.sh driver xf86-video-intel-<last_ver> xf86-video-intel-<ver>
+6. Run the release script (this should push the tag)
-6. edit the generated release message as needed and send it out
+ $ <path_to>/util/modular/release.sh driver <last_ver> <ver>
- for major releases list added features and known limitations
+7. Edit the generated release message as needed and send it out
- for minor releases indicate which bugs were fixed and which
- are still present
+ At the very least, add the release notes from the NEWS file.
-7. throw a release party, you're done! :)
+8. Throw a release party, you're done! :)
commit 976ef05ad18d7d798649a0a198c4d88488677f87
Author: Carl Worth <cworth at cworth.org>
Date: Wed Apr 15 16:33:12 2009 -0700
NEWS: Add note about broken PAT code in some kernels
Hoping to cut off some false bug reports here.
(cherry picked from commit e1cace16a6130dcdd93965d2329a349d49200fa6)
diff --git a/NEWS b/NEWS
index c059c98..0d0cd8a 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,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
More information about the xorg-commit
mailing list