* X patch
@ 2008-03-13 21:31 Jordan Crouse
2008-03-13 21:45 ` Jordan Crouse
0 siblings, 1 reply; 2+ messages in thread
From: Jordan Crouse @ 2008-03-13 21:31 UTC (permalink / raw)
To: linux-fbdev-devel
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
This should do the right thing for the panel - you'll still have a virtual
desktop if your specified size != the size of the panel, but it won't be
all funky anymore.
J
[-- Attachment #2: gxpanel.patch --]
[-- Type: text/x-diff, Size: 2168 bytes --]
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index 3c66d05..635482b 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -807,6 +807,7 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
{
GeodeRec *pGeode = GEODEPTR(pScrni);
int flags = 0;
+ int custom = 0;
pScrni->vtSema = TRUE;
@@ -817,14 +818,17 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
if (pMode->Flags & V_NVSYNC)
flags |= 2;
- /* XXX Question - why even use set_display_mode at all - shouldn't the
- * mode timings be the same that we advertise? */
+ /* Check to see if we should use custom or built-in timings */
- /* Only use the panel mode for built in modes */
+ if (pMode->Panel)
+ custom = (pMode->type & M_T_USERDEF);
+ else
+ custom = !(pMode->type & (M_T_BUILTIN | M_T_DEFAULT));
- if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)
- && pGeode->Panel) {
+ /* If we're not doing a custom mode, then just set the fixed timings,
+ * otherwise, do the whole shooting match */
+ if (!custom) {
GFX(set_fixed_timings(pGeode->PanelX, pGeode->PanelY,
pMode->CrtcHDisplay, pMode->CrtcVDisplay,
pScrni->bitsPerPixel));
@@ -1430,11 +1434,16 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
ScrnInfoPtr pScrni = xf86Screens[scrnIndex];
GeodeRec *pGeode = GEODEPTR(pScrni);
int p, ret;
+ int custom = 0;
- /* Use the durango lookup for builtin or default modes only */
+ if (pGeode->Panel)
+ custom = (pMode->type & M_T_USERDEF);
+ else
+ custom = (pMode->type & (M_T_BUILTIN | M_T_DEFAULT));
- if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) {
+ /* Use the durango lookup for !custom modes */
+ if (!custom) {
if (pGeode->Panel) {
if (pMode->CrtcHDisplay > pGeode->PanelX ||
pMode->CrtcVDisplay > pGeode->PanelY ||
@@ -1450,9 +1459,8 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
pMode->CrtcVDisplay,
pScrni->bitsPerPixel,
GeodeGetRefreshRate(pMode));
- if (ret < 0) {
+ if (ret < 0)
return MODE_BAD;
- }
}
if (pMode->Flags & V_INTERLACE)
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #4: Type: text/plain, Size: 182 bytes --]
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: X patch
2008-03-13 21:31 X patch Jordan Crouse
@ 2008-03-13 21:45 ` Jordan Crouse
0 siblings, 0 replies; 2+ messages in thread
From: Jordan Crouse @ 2008-03-13 21:45 UTC (permalink / raw)
To: linux-fbdev-devel
On 13/03/08 15:31 -0600, Jordan Crouse wrote:
> This should do the right thing for the panel - you'll still have a virtual
> desktop if your specified size != the size of the panel, but it won't be
> all funky anymore.
Sorry for that - that was the wrong address on the To line. Ignore me :)
Jordan
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-13 21:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13 21:31 X patch Jordan Crouse
2008-03-13 21:45 ` Jordan Crouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).