Age | Commit message (Collapse) | Author | Files | Lines |
|
Since I have reworked the PAL/NTSC configuration handling
the comments about this is not necessary.
(these patches will likely be rebased on top of that rework)
Otherwise just clean out double comments and fix whitespace.
|
|
Unless the code is incomplete (need ACTIVE_DEVICES mask here also?)
the following if (A != B) A=B; can be replaced by A=B.
+ if (iDevInfo != psav->iDevInfo) {
+ psav->iDevInfo = iDevInfo;
+ }
Otherwise just fix up comments and line widths.
|
|
comment: Now that this function is so simple, and is only
used once, should we rather inline what is needed in the caller?
Or is there a possible future use for it?
|
|
|
|
|
|
|
|
|
|
|
|
For setting psav->CrtOnly:
Should we really ignore the CRT_ACTIVE bit here, or can we
simply check iDeviceList == CRT_ACTIVE instead?
And mask it with ACTIVE_DEVICES if DUO_ON should be ignored?
|
|
|
|
|
|
|
|
|
|
This patch contains several modifications to the handling of the list of
output devices and the control flags for the TV output format, which are
detailed in the following sections.
- new flags are defined to make reading and setting devices easier,
avoiding masking too much or too little
- at the moment of switching between text mode and graphics mode, the
output device settings are saved and updated accordingly which, for
example, means that a display corrupted in graphics mode can be restored
by switching back to text mode as we can assume that boot-up in text
mode works correctly.
- BUGFIX: previously a variable was counted up endlessly by one at each
mode switch. A boolean makes life easier and is what we want here by the
necessary logic.
- BUGFIX: previously the BIOS (hardware) settings for the TV output mode
were not recognised or used correctly which meant by setting "TvOn" you
had automatically set NTSC by force. To avoid this and allow the BIOS
setting to take effect, the configuration option "PAL" is ignored as it
even was not documented properly. Maybe this also reduces the need for
s3switch in many cases as most laptops allow the format to be set up in
the BIOS configuration correctly, but the savage driver not only
ignored, but overrode it and even fought against s3switch here.
If we need to override the TV format from the config, we would have to
define a new flag like "TvFormatOverride" or whatever you like.
- in general a more intelligent handling of VGA register writes related
to the output device set - these were quite unconditional before.
- the output device configuration is read in before video rendering is
started to allow applying the correct image scaling for the selected
device and resolution - previously there could be wrong assumptions
depending on the previous sequence of device settings before starting
the video rendering.
Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net>
|
|
Otherwise, calling it twice would trigger a VBE bug when using
xserver 1.12.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Instead maintain our own list of supported PCI IDs.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
Found with CFLAGS=-Wlogical-op
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
The mode pixel clock frequency is in kHz, not Hz.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
|
|
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>
|
|
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
|
|
Two warnings and an error.
|
|
These registers are cleared after suspend/resume, so set them
up again in EnterVT.
|
|
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.
|
|
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’
...
|
|
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.
|
|
Silence -Wall warnings.
The functions are just #if'ed out, to be left for inspiration.
|
|
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
|
|
sed -i 's/xalloc/malloc/g; s/xcalloc/calloc/g; s/xfree/free/g'
Also replace xrealloc with realloc.
|
|
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’
|
|
|
|
Fixes bug 31614.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|