Bug 2552 - Stretching display to fill LCD panel should be optional
Summary: Stretching display to fill LCD panel should be optional
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 6.8.1
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-02-16 08:10 UTC by Raymond S Brand
Modified: 2007-02-22 14:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Raymond S Brand 2005-02-16 08:10:57 UTC
The default behavior of the Radeon driver (w/ 250 Lf; M9) is to use the
chipset's RMX facility to stretch the output to fill the LCD display. This
results in ugly/annoying smearing of fonts and other graphics when stretching
from 1280x1024 to 1400x1050.

The BIOS is set to not expand but the Radeon driver does it anyway.

The following patch (to the code from the Suse 9.2 update) turns off the
stretching if the ``NoStretch'' option is set to true.

Unfortunately the output is now in the upper lefthand corner instead of being
centered and I have no idea what needs to be modified to center the output.

I do not know if the registers are programmed correctly when this patch is used
but I do get a non stretched display on my laptop.

Also, it would be really nice if the stretching could be toggled (like windows
can) without restarting the xserver.


diff -wubr ORIG/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
BUILD/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
--- ORIG/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2005-02-13
18:10:11.000000000 -0500
+++ BUILD/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2005-02-16
06:54:02.531263544 -0500
@@ -164,7 +164,8 @@
     OPTION_SUBPIXEL_ORDER,
 #endif
     OPTION_SHOWCACHE,
-    OPTION_DYNAMIC_CLOCKS
+    OPTION_DYNAMIC_CLOCKS,
+    OPTION_NO_STRETCH
 } RADEONOpts;
 
 static const OptionInfoRec RADEONOptions[] = {
@@ -209,6 +210,7 @@
 #endif
     { OPTION_SHOWCACHE,      "ShowCache",        OPTV_BOOLEAN, {0}, FALSE },
     { OPTION_DYNAMIC_CLOCKS, "DynamicClocks",    OPTV_BOOLEAN, {0}, FALSE },
+    { OPTION_NO_STRETCH,     "NoStretch",        OPTV_BOOLEAN, {0}, FALSE },
     { -1,                    NULL,               OPTV_NONE,    {0}, FALSE }
 };
 
@@ -2881,8 +2883,11 @@
 		p->VSyncEnd   = p->VSyncStart + info->VSyncWidth;
 		p->Clock      = info->DotClock;
 
+		if (!xf86ReturnOptValBool(info->Options, OPTION_NO_STRETCH, FALSE))
+			{
 		p->Flags     |= RADEON_USE_RMX;
 	    }
+	    }
 
 	    maxVirtX = MAX(maxVirtX, p->HDisplay);
 	    maxVirtY = MAX(maxVirtY, p->VDisplay);
@@ -3099,7 +3104,11 @@
 	new->VSyncStart = info->PanelYRes + info->VOverPlus;
 	new->VSyncEnd   = new->VSyncStart + info->VSyncWidth;
 	new->Clock      = info->DotClock;
+
+	if (!xf86ReturnOptValBool(info->Options, OPTION_NO_STRETCH, FALSE))
+		{
 	new->Flags     |= RADEON_USE_RMX;
+		}
 
 	new->type      |= M_T_USERDEF;
 
@@ -3150,8 +3159,11 @@
 		new->VSyncStart = info->PanelYRes + info->VOverPlus;
 		new->VSyncEnd   = new->VSyncStart + info->VSyncWidth;
 		new->Clock      = info->DotClock;
-		new->Flags     |= RADEON_USE_RMX;
 
+		if (!xf86ReturnOptValBool(info->Options, OPTION_NO_STRETCH, FALSE))
+			{
+			new->Flags     |= RADEON_USE_RMX;
+			}
 		new->type      |= M_T_DEFAULT;
Comment 1 Raymond S Brand 2005-02-16 08:15:53 UTC
I can do some testing to facilitate a resolution to this problem.
Comment 2 Erik Andren 2006-05-10 06:34:42 UTC
Is this that is supposed/is to be merged into mainline?
Comment 3 Michel Dänzer 2006-05-10 17:04:00 UTC
Nack from me in the current form; the option name should be just "Stretch"
(ideally a little less ambiguous, actually), the config file parser handles the
"No" prefix transparently.
Comment 4 Timo Jyrinki 2007-02-22 14:27:02 UTC
Marking broken (status null/blank) bugs in xorg with no activity in a long time as fixed. Please reopen if you think it's necessary, but first do a search if a similar bug report is already filed and in a NEW/ASSIGNED state. These bugs do not currently show in most search results as they do not have any status.

Sorry for this janitorial spam, you know where to send hate mails to when your inbox gets full of bugs you're subscribed to.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.