summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-27savage_video.c: Check current output configuration before doing expansionoutput-tormodHans-Juergen Mauser3-0/+16
When playing video, the driver should check the output config which could have been modified due to Fn+Output key or s3switch. If TV or CRT is on, the LCD expansion must be avoided, otherwise, video image on TV is cropped due to false expansion. Use new SavageUpdateDevices() function. Tormod comment: We should also mask with ACTIVE_DEVICES here also for detecting CrtOnly, no? Tormod comment: Do we need to run these BIOS calls for every video frame? Would it be enough to update this on mode changes? Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Fix return mask in SavageGetDevice()Hans-Juergen Mauser1-1/+1
Do not strip away the "duoview" 0x80 flag returned on some models. Also replace 0x0f with the less magic ACTIVE_DEVICES Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Set DuoView flag depending on active outputsHans-Juergen Mauser3-0/+57
The DuoView flag only needs to be set if TV and another output is active. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Only rewrite TV settings if neededHans-Juergen Mauser1-6/+10
The BIOS tends to reset itself to defaults if something happens which it doesn't like. Currently it looks as if this reason mainly was the writing of TV mode when the TV output was already active, and with this patch I have not experienced it again. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27SavageSetPanelEnabled() only write active devices if neededHans-Juergen Mauser1-9/+37
If the LCD is off, DPMS for the LCD is blocked. Otherwise, the display would get corrupted on external (esp. TV) screen and the LCD got into an undesired state of turning white. This was especially annoying as e.g. the VLC player makes calls to DPMS before playing a video! I think this was well-meant, but was destructive in case of our savage driver. Now the driver is protected. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Save output device settings when changing to text modeHans-Juergen Mauser1-2/+15
When switching to text mode, the driver updates its config and restores the initial setting as intended. The old behavior would reset the active output device register at every mode change, so that for instance the (usually sane) text mode configuration from boot would be lost. Also check if active outputs really needs changing by comparing the active device bits only. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Update configuration flags on mode changesHans-Juergen Mauser2-6/+32
Only enforce the user-supplied settings on the first mode change (from text to initial graphics mode). On subsequent mode changes, update the configuration flags to be consistent with the actual status before changing mode, so that "live" changes in output configuration can be preserved across mode changes. If we are changing from what seems to be original (text) mode the settings have probably not been changed so we do not use the actual state read from the hardware but the remembered state from after last change. Tormod comment: Does the above last part make any sense? On each mode switch, the driver should read in its current output configuration and update its list and flags. Up to now, a resolution switch after changing output by hot-key or s3switch caused the outputs to be changed back to their previous state. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Add SavageGetTV() function to detect active TV formatHans-Juergen Mauser2-0/+14
Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Change CrtOnly detection to ignore CRT statusHans-Juergen Mauser1-1/+2
The flag is now set if no other output device is active, ignoring the original status of the CRT output. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: split out from an big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Unmagify active device bitsHans-Juergen Mauser1-2/+2
Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-27Change CrtOnly and TvOn option handlingHans-Juergen Mauser1-3/+3
The "CrtOnly" option predates TV support, and was meant for turning off the LCD screen. "TvOn" would turn off all other outputs, possibly overriding the "CrtOnly" option. Change them to do what they say: TvOn simply turns on the TV output. CrtOnly turns off all outputs except CRT, possibly overriding TvOn. The TvOn option is left undocumented. Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: patch split out from a big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-26Replace useless counter by bFirstRun flagHans-Juergen Mauser1-2/+4
Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: split out from an big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-05-20Whitespace fixesHans-Juergen Mauser2-2/+4
Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> [Tormod: split out from an big diff] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-03-24Refactor BIOS modes retrieval to call VBEGetVBEInfo only onceTormod Volden2-11/+15
Otherwise, calling it twice would trigger a VBE bug when using xserver 1.12. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-03-23xf86-video-savage 2.3.4xf86-video-savage-2.3.4Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-23Add savage_pciids.h to src/Makefile.am to fix distcheckAlan Coopersmith1-0/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-01-17Untangle XF86DRI from the driver-specific DRI definePeter Hutterer7-36/+40
XF86DRI is defined by xorg-server.h, so --disable-dri in the driver itself does exactly nothing other than not fill in the CFLAGS and thus stop the driver from compiling. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-01-03Merge almost identical code in SAVAGEInitVisualConfigsAndrew Turner1-115/+51
https://bugs.freedesktop.org/show_bug.cgi?id=9961 Signed-off-by: Andrew Turner <andrew@fubar.geek.nz> [Tormod: Rename table to SAVAGEVisuals] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-01-03Avoid leading underscores in #include guardsTormod Volden9-35/+33
In a user header file, the macro name should not begin with `_' http://gcc.gnu.org/onlinedocs/cpp/Once_002dOnly-Headers.html Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2012-01-03Do not use the deprecated xf86PciInfo.h from xserverTormod Volden6-8/+56
Instead maintain our own list of supported PCI IDs. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2011-12-19Fix for new vgahw ABIAdam Jackson1-0/+1
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-12-19Fall back to shadowfb if XAA is unavailableAdam Jackson1-4/+4
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-12-19Don't include xf86Priv.hAdam Jackson1-1/+0
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-08Bump version to 2.3.3xf86-video-savage-2.3.3Tormod Volden1-1/+1
2011-09-23savage: Warn if broken drm maps are detectedTormod Volden1-0/+5
Linux kernel 2.6.30 - 2.6.39 had broken drm maps which would result in assorted problems. Leave a message in the log if it looks like the framebuffer map and the aperture map are mixed up. https://bugs.freedesktop.org/show_bug.cgi?id=32511 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2011-09-23savage: Avoid unnecessary float calculation in video displayTormod Volden1-12/+11
There is no reason to do the division using floats as long as the result is an integer and there is no risk of intermediate overflow. This is in the code for "Old" chipsets. Integer division was already used in the parallel code for "New" chipsets. Also fixed up the whitespace in both blocks. Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2011-09-23savage: Fix Xv scaling on non-native resolutionsHans-Juergen Mauser1-0/+8
If I set the resolution to 800x600 for example (to be able to use the TV output in full screen mode), I only can see 800/1024 = 0,78 of the real video width, no matter if the video is displayed in a small player window or enlarged to full screen. On the right of the video display, the remaining width is filled with a black (or sometimes blue) bar. The problem was mainly that only the drawing starting point was modified by the scaling factor, but not the size-defining end of the drawing rectangle. https://bugs.launchpad.net/bugs/670790 Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> Reviewed-by: Tormod Volden <debian.tormod@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
2011-04-21savage: Fix &/&& typo in "magical" register setupTormod Volden1-2/+2
Found with CFLAGS=-Wlogical-op Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-21savage: Make SAVAGESelectBuffer() private (static)Tormod Volden2-15/+1
Also clean out some unused prototypes from savage_driver.h Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-21savage: Factor out a SAVAGESetAgpMode and call it on resumeTormod Volden1-24/+33
This should fix resume with AGP. After all these years... https://bugzilla.kernel.org/show_bug.cgi?id=4607 Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-21savage: New SAVAGEDRIResume functionTormod Volden3-9/+16
Move DRI stuff from savage_driver.c to savage_dri.c Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-21savage: Fix logic in waitHSyncTormod Volden1-2/+2
Bit-masking the result of a boolean negation seems pointless, so I guess this is what was intended: Only look at bit 0 of the inStatus result. Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-03-31Fix wrong frequency unit in trace outputTormod Volden1-1/+1
The mode pixel clock frequency is in kHz, not Hz. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2011-02-21Use proper casts on framebuffer addressesTormod Volden2-2/+2
Correction to df8059025cafadaeea7672842d31134ed8c9c5df. Casting addresses to int is a 32bitism. If we want to use this intermediate cast to silence compiler warnings, we should use uintptr_t instead to not introduce potential bit truncation. Thanks to Mark Kettenis for spotting this. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2011-01-25savage: Fix initialization typo in SAVAGEDRIMoveBuffersTormod Volden1-1/+1
This was warned about when building with -O2, and seems to be a copy-and-paste glitch. savage_dri.c: In function ‘SAVAGEDRIMoveBuffers’: savage_dri.c:1445: warning: ‘pptNew2’ may be used uninitialized in this function
2011-01-25savage: Fix building with TRACEON definedTormod Volden1-3/+3
Two warnings and an error.
2011-01-25savage: Setup tiled surface registers in SavageEnterVTTormod Volden2-0/+2
These registers are cleared after suspend/resume, so set them up again in EnterVT.
2011-01-25savage: Factor out a SAVAGEDRISetupTiledSurfaceRegs functionTormod Volden1-42/+44
The tiled surface registers were only setup in SAVAGEDRIScreenInit, however, after suspend/resume these registers must be set up again. So factor it out in a new function so it can be reused.
2011-01-25savage: Cast all handles before printing themTormod Volden1-16/+17
Removes the last bunch of -Wall build warnings. savage_dri.c:490: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 5 has type ‘drm_handle_t’ ...
2011-01-25savage: Fix ambiguity in SavageLoadPaletteSavage4Tormod Volden1-1/+1
It looks like "!" was meant for logic negation and the parentheses were wrong. I don't have a Savage 4 so I can't check if this fixes or breaks anything.
2011-01-25savage: Drop unused variables and functionsTormod Volden4-6/+5
Silence -Wall warnings. The functions are just #if'ed out, to be left for inspiration.
2011-01-25savage: More (intermediate) casts to silence warningsTormod Volden2-2/+2
savage_dga.c: In function ‘Savage_OpenFramebuffer’: savage_dga.c:393: warning: cast to pointer from integer of different size savage_dri.c: In function ‘SAVAGEDRIScreenInit’: savage_dri.c:924: warning: cast to pointer from integer of different size
2011-01-25savage: Replace deprecated x(c)alloc/xfree with m/calloc/freeTormod Volden6-72/+72
sed -i 's/xalloc/malloc/g; s/xcalloc/calloc/g; s/xfree/free/g' Also replace xrealloc with realloc.
2011-01-25savage: Add casts to silence build warningsTormod Volden2-3/+3
savage_exa.c: In function ‘SavageUploadToScreen’: savage_exa.c:545: warning: passing argument 1 of ‘memcpy’ discards qualifiers from pointer target type /usr/include/bits/string3.h:49: note: expected ‘void * restrict’ but argument is of type ‘volatile CARD32 *’ savage_video.c: In function ‘SavagePutImage’: savage_video.c:2007: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘drmSize’ savage_video.c:2007: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘int’
2010-12-05savage 2.3.2xf86-video-savage-2.3.2Dave Airlie1-1/+1
2010-11-25savage: fix use of privates without initialisationKeith Packard1-0/+1
Fixes bug 31614. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-06Purge cvs tags.Jesse Adkins1-1/+0
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-22config: add comments for main statementsGaetan Nadon1-6/+7
2010-07-21config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILESGaetan Nadon1-4/+5
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-21config: replace deprecated AC_HELP_STRING with AS_HELP_STRINGGaetan Nadon1-2/+2
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>