From: Jordan Crouse <jordan.crouse@amd.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: X patch
Date: Thu, 13 Mar 2008 15:31:25 -0600 [thread overview]
Message-ID: <20080313213125.GE6284@cosmic.amd.com> (raw)
[-- 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
next reply other threads:[~2008-03-13 21:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 21:31 Jordan Crouse [this message]
2008-03-13 21:45 ` X patch Jordan Crouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080313213125.GE6284@cosmic.amd.com \
--to=jordan.crouse@amd.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.