xf86-video-ati: Branch 'master' - 3 commits
Alex Deucher
agd5f at kemper.freedesktop.org
Sat Sep 22 11:18:38 PDT 2007
src/radeon_modes.c | 5 ----
src/radeon_output.c | 64 +++++++++++++++++++++++++++++-----------------------
src/radeon_probe.h | 9 +++++++
src/radeon_video.c | 3 +-
4 files changed, 47 insertions(+), 34 deletions(-)
New commits:
diff-tree 9109e62e3be7f96b41b534ab517fdf1baf458806 (from d2ce4a5003ce1291ea2327b2c00a0b24408fe26c)
Author: Michel Dänzer <daenzer at debian.org>
Date: Sat Sep 22 14:19:10 2007 -0400
RADEON: fix crash when Xv window is outside of either crtc
Should fix bug 12175
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 271f7fe..bbd743b 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -215,7 +215,8 @@ radeon_clip_video_helper(ScrnInfoPtr pSc
REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
crtc_region = &crtc_region_local;
REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
- }
+ } else
+ return FALSE;
*crtc_ret = crtc;
}
diff-tree d2ce4a5003ce1291ea2327b2c00a0b24408fe26c (from f95b9ab729376083bf0d12987ee260ec2aba721e)
Author: Alex Deucher <alex at botch2.(none)>
Date: Sat Sep 22 10:41:55 2007 -0400
RADEON: RMX updates
- add option to turn off RMX
- turn off RMX by default on DVI
- add infrastructure to support more RMX modes
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 8b7ae08..d2e2363 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -648,13 +648,17 @@ radeon_mode_valid(xf86OutputPtr output,
return MODE_CLOCK_RANGE;
}
- if (radeon_output->type != OUTPUT_LVDS)
- return MODE_OK;
-
- if (pMode->HDisplay > radeon_output->PanelXRes ||
- pMode->VDisplay > radeon_output->PanelYRes)
- return MODE_PANEL;
-
+ if (radeon_output->type == OUTPUT_LVDS) {
+ if (radeon_output->rmx_type == RMX_OFF) {
+ if (pMode->HDisplay != radeon_output->PanelXRes ||
+ pMode->VDisplay != radeon_output->PanelYRes)
+ return MODE_PANEL;
+ }
+ if (pMode->HDisplay > radeon_output->PanelXRes ||
+ pMode->VDisplay > radeon_output->PanelYRes)
+ return MODE_PANEL;
+ }
+
return MODE_OK;
}
@@ -664,7 +668,8 @@ radeon_mode_fixup(xf86OutputPtr output,
{
RADEONOutputPrivatePtr radeon_output = output->driver_private;
- if (radeon_output->MonType == MT_LCD || radeon_output->MonType == MT_DFP) {
+ if ((radeon_output->MonType == MT_LCD || radeon_output->MonType == MT_DFP)
+ && radeon_output->rmx_type != RMX_OFF) {
xf86CrtcPtr crtc = output->crtc;
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
@@ -1675,7 +1680,7 @@ radeon_create_resources(xf86OutputPtr ou
}
- /* RMX control - fullscreen, centered, keep ratio */
+ /* RMX control - fullscreen, centered, keep ratio, off */
/* actually more of a crtc property as only crtc1 has rmx */
if (radeon_output->type == OUTPUT_LVDS ||
radeon_output->type == OUTPUT_DVI) {
@@ -1688,7 +1693,10 @@ radeon_create_resources(xf86OutputPtr ou
"RRConfigureOutputProperty error, %d\n", err);
}
/* Set the current value of the property */
- s = "full";
+ if (radeon_output->type == OUTPUT_LVDS)
+ s = "full";
+ else
+ s = "off";
err = RRChangeOutputProperty(output->randr_output, rmx_atom,
XA_STRING, 8, PropModeReplace, strlen(s), (pointer)s,
FALSE, FALSE);
@@ -1869,24 +1877,24 @@ radeon_set_property(xf86OutputPtr output
radeon_output->load_detection = val;
} else if (property == rmx_atom) {
- xf86CrtcPtr crtc = output->crtc;
- RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
- if (radeon_crtc->crtc_id == 0) {
- const char *s;
- if (value->type != XA_STRING || value->format != 8)
- return FALSE;
- s = (char*)value->data;
- if (value->size == strlen("full") && !strncmp("full", s, strlen("full"))) {
- return TRUE;
- } else if (value->size == strlen("aspect") && !strncmp("aspect", s, strlen("aspect"))) {
- return TRUE;
- } else if (value->size == strlen("center") && !strncmp("center", s, strlen("center"))) {
- return TRUE;
- }
- return FALSE;
- } else {
- return FALSE;
- }
+ const char *s;
+ if (value->type != XA_STRING || value->format != 8)
+ return FALSE;
+ s = (char*)value->data;
+ if (value->size == strlen("full") && !strncmp("full", s, strlen("full"))) {
+ radeon_output->rmx_type = RMX_FULL;
+ return TRUE;
+ } else if (value->size == strlen("aspect") && !strncmp("aspect", s, strlen("aspect"))) {
+ radeon_output->rmx_type = RMX_ASPECT;
+ return TRUE;
+ } else if (value->size == strlen("center") && !strncmp("center", s, strlen("center"))) {
+ radeon_output->rmx_type = RMX_CENTER;
+ return TRUE;
+ } else if (value->size == strlen("off") && !strncmp("off", s, strlen("off"))) {
+ radeon_output->rmx_type = RMX_OFF;
+ return TRUE;
+ }
+ return FALSE;
} else if (property == tmds_pll_atom) {
const char *s;
if (value->type != XA_STRING || value->format != 8)
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index bc6f0b9..ec895e4 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -122,6 +122,14 @@ typedef enum
DVI_ANALOG
} RADEONDviType;
+typedef enum
+{
+ RMX_OFF,
+ RMX_FULL,
+ RMX_CENTER,
+ RMX_ASPECT
+} RADEONRMXType;
+
typedef struct {
CARD32 freq;
CARD32 value;
@@ -196,6 +204,7 @@ typedef struct _RADEONOutputPrivateRec {
int PanelPwrDly;
int DotClock;
RADEONTMDSPll tmds_pll[4];
+ RADEONRMXType rmx_type;
/* TV out */
TVStd default_tvStd;
TVStd tvStd;
diff-tree f95b9ab729376083bf0d12987ee260ec2aba721e (from 5a6f74103f0ec0d451d0e2573442efe5922848af)
Author: Alex Deucher <alex at botch2.(none)>
Date: Fri Sep 21 00:12:37 2007 -0400
RADEON: remove more old cruft
diff --git a/src/radeon_modes.c b/src/radeon_modes.c
index 687e388..9c12ecb 100644
--- a/src/radeon_modes.c
+++ b/src/radeon_modes.c
@@ -125,11 +125,6 @@ static DisplayModePtr RADEONFPNativeMode
new->next = NULL;
new->prev = NULL;
- pScrn->display->virtualX =
- pScrn->virtualX = MAX(pScrn->virtualX, radeon_output->PanelXRes);
- pScrn->display->virtualY =
- pScrn->virtualY = MAX(pScrn->virtualY, radeon_output->PanelYRes);
-
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"No valid mode specified, force to native mode\n");
}
More information about the xorg-commit
mailing list