xf86-video-ati: Branch 'master'
Henry Zhao
henryz at kemper.freedesktop.org
Sun Apr 1 08:11:04 EEST 2007
src/radeon_modes.c | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
New commits:
diff-tree 9b1e97284ce185d358ca756a235d2cee346fa53f (from 9c2dcd19be8fc2cc29e637d1e9748e66196e3900)
Author: Henry Zhao <henryz at localhost.localdomain>
Date: Sat Mar 31 23:01:52 2007 -0800
10205: Radeon driver's own mode validation code does not work properly
diff --git a/src/radeon_modes.c b/src/radeon_modes.c
index 09b8aaf..535d047 100644
--- a/src/radeon_modes.c
+++ b/src/radeon_modes.c
@@ -86,10 +86,16 @@ static void RADEONSortModes(DisplayModeP
p = *last;
while (p) {
- if ((((*new)->HDisplay < p->HDisplay) &&
+ if (((*new)->HDisplay < p->HDisplay) ||
+ (((*new)->HDisplay == p->HDisplay) &&
((*new)->VDisplay < p->VDisplay)) ||
(((*new)->HDisplay == p->HDisplay) &&
((*new)->VDisplay == p->VDisplay) &&
+ ((*new)->type < p->type) &&
+ !(((*new)->type == M_T_USERDEF) || (!(*new)->type))) ||
+ (((*new)->HDisplay == p->HDisplay) &&
+ ((*new)->VDisplay == p->VDisplay) &&
+ ((*new)->type == p->type) &&
((*new)->Clock < p->Clock))) {
if (p->next) p->next->prev = *new;
@@ -181,9 +187,8 @@ static DisplayModePtr RADEONDDCModes(Scr
#ifdef M_T_PREFERRED
if (PREFERRED_TIMING_MODE(ddc->features.msc))
new->type = M_T_PREFERRED;
- else
#endif
- new->type = M_T_DEFAULT;
+ new->type |= M_T_DRIVER;
if (d_timings->sync == 3) {
switch (d_timings->misc) {
@@ -207,8 +212,10 @@ static DisplayModePtr RADEONDDCModes(Scr
for (j = 0; j < 8; j++) {
if (ddc->timings2[j].hsize == 0 || ddc->timings2[j].vsize == 0)
continue;
- for (p = pScrn->monitor->Modes; p && p->next; p = p->next->next) {
+ for (p = pScrn->monitor->Modes; p && p->next; p = p->next) {
/* Ignore all double scan modes */
+ if (p->Flags & V_DBLSCAN)
+ continue;
if ((ddc->timings2[j].hsize == p->HDisplay) &&
(ddc->timings2[j].vsize == p->VDisplay)) {
float refresh =
@@ -221,7 +228,8 @@ static DisplayModePtr RADEONDDCModes(Scr
new->name = xnfalloc(strlen(p->name) + 1);
strcpy(new->name, p->name);
new->status = MODE_OK;
- new->type = M_T_DEFAULT;
+ if ((new->type != M_T_USERDEF) && (new->type))
+ new->type = M_T_DEFAULT;
count++;
@@ -240,7 +248,10 @@ static DisplayModePtr RADEONDDCModes(Scr
tmp = (ddc->timings1.t1 << 8) | ddc->timings1.t2;
for (j = 0; j < 16; j++) {
if (tmp & (1 << j)) {
- for (p = pScrn->monitor->Modes; p && p->next; p = p->next->next) {
+ for (p = pScrn->monitor->Modes; p && p->next; p = p->next) {
+ /* Ignore all double scan modes */
+ if (p->Flags & V_DBLSCAN)
+ continue;
if ((est_timings[j].hsize == p->HDisplay) &&
(est_timings[j].vsize == p->VDisplay)) {
float refresh =
@@ -253,7 +264,8 @@ static DisplayModePtr RADEONDDCModes(Scr
new->name = xnfalloc(strlen(p->name) + 1);
strcpy(new->name, p->name);
new->status = MODE_OK;
- new->type = M_T_DEFAULT;
+ if ((new->type != M_T_USERDEF) && (new->type))
+ new->type = M_T_DEFAULT;
count++;
More information about the xorg-commit
mailing list