summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-10-01Add config.h include to src/lx_memory.cBrian A. Lloyd
The src/lx_memory.c file uses the xf86.h header file. This file must have HAVE_STRNDUP defined before calling it when the building platform has a strndup function. When using config.h, this file doesn't have that define and so fails to compile. The attached patch adds the conditional config.h to this file so it may compile on the affected platforms. The patch is trivial and may be included and used under whatever licensing desired. Closes: Free Desktop Bug #84541 Signed-off-by: Brian A. Lloyd <brian.lloyd@familyhonor.net>
2014-09-25Geode MSR support for OpenBSDMarc Balmer
This patch adds conditional support for the Geode MSR device on OpenBSD. Signed-off-by: Marc Balmer <mbalmer@netbsd.org> Signed-off-by: Matthieu Herrb <matthieu@openbsd.org>
2014-02-08No need to conditionalize the xf86Modes.h include.Martin-Éric Racine
2014-02-08Added conditional include to fix FTBFS on xserver 1.15 and up.Martin-Éric Racine
Thanks to Maarten Lankhorst for the fix.
2013-01-09Remove mibstore.hAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-11-24pre-release whitespace cleanup using ../modular/x-indent-all.shMartin-Éric Racine
2012-11-20lx_exa: Improvements to negative srcX/Y PictOpSrc/Over operationsMart Raudsepp
Adds handling of negative srcX or srcY coordinates, which is used by gtk3 GtkTrayIcon implementation via cairo for centering icons on top of the destination area. For now just handle the drawing within source pixmap bounds in these cases, as full handling of the out of bound zero-vector for PictOpSrc seems to require bigger refactoring, which is not suitable for the impending stable release. The approach implemented here should result in correct rendering for PictOpOver (as out of bounds with non-repeat mode ends up meaning transparency). For PictOpSrc no black borders are rendered where appropriate, but before this approach, no source pixmap would even be rendered at all, so it should be a net improvement for the upcoming release, while fixing the gtk3 icons in GNOME3 fallback. The completely out of bounds special case check didn't work correctly for negative srcX or srcY because exaScratch.srcWidth/Height are unsigned types, so the negative srcX or srcY got casted to unsigned, which resulted in a big number, so srcX >= 0 was always true (but GCC managed to not warn of the implicit signedness cast). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=51360
2012-10-23lx_exa: Implement solid pictures support as source with a maskMart Raudsepp
cairo-1.12 uses solid pictures instead of 1x1R pixmaps in glyph rendering paths, so accelerate it. In addition to acceleration, it avoids a bug in xserver-1.13.0 and earlier which causes visible misrendering for fallback path, making cairo-1.12 a viable and desired choice on GeodeLX systems. Quick benchmarking suggests a 4-12% win in cairo-traces.
2012-10-23lx_exa: Remove unused srcPixmap member from exaScratchMart Raudsepp
Became redundant with commit 32a927b8e6
2012-10-02Clarified the copyright and license of src/geode_msr.c src/geode_blend.hMartin-Éric Racine
Debian's 'licensecheck' tool showed these two files to have unspecified copyright and license. Git log clarifies that these had been created by Jordan Crouse when he was still at AMD, so their stock copyright notice was copied as-is from other files in src/
2012-09-18lx_exa: Downgrade src/dst format warnings to fallbacks to not spam the logMart Raudsepp
We don't support 10bit wide color channels, BGRA and other types, which mainly cause these fallbacks. The ErrorF's were unwarranted, these are just fallbacks as any other, so don't output these warnings without GEODE_TRACE_FALL.
2012-09-18lx_exa: Fix crash with solid fills on PictOpAdd operationsMart Raudsepp
lx_check_composite has many special checks for PictOpAdd to return successfully early, but these were done even earlier than the check for solid fills. This resulted in lx_prepare_composite assuming the source pixmap exists, which is not the case with solid fills. Move the solid fill fallback checks before the others, so we are guaranteed to always have a source pixmap in PrepareComposite and Composite and don't crash trying to access a NULL pointer. Also move up the mask check to do less checks in the PictOpAdd logic.
2012-08-29NEWS: add information about releases since 2.11.9Martin-Éric Racine
...and flip the location of the recent src/Makefile.am addition.
2012-08-09src/Makefile.am: added missing compat-api.h to geode_drv_la_SOURCESMartin-Éric Racine
2012-07-26Initial stab at converting geode to new X1.13 APIMaarten Lankhorst
Preparing to compile geode on X 1.13 All compiler errors are gone as far as I can tell, but I lack the hardware to verify it works as well.
2012-07-26Allow building on Xservers without XAAMaarten Lankhorst
2012-07-25lx_exa: Fix EXA minor version checksMart Raudsepp
The old version of just checking for EXA_MINOR_VERSION >= 2 would stop working if ever EXA gets a new major version, as minor would be reset to 0, and start unexpectedly working again when minor gets bumped gradually up to 2 again. Other drivers also assume that a new major would still have the vfunc we use.
2012-07-25Fix an unused variable warning in geode_driver.cMart Raudsepp
geode_driver.c:372:9: warning: variable 'cpu_detected' set but not used [-Wunused-but-set-variable] Was used only in a DEBUGMSG, which has since been made not do anything ever, so just kill it completely, as the debug message wasn't useful anyway.
2012-07-11Whitespace cleanup using ../modular/x-indent.shMartin-Éric Racine
2012-04-03geode: fix compile on x86-64 in tinderbox.Dave Airlie
geode_ddc.c: In function 'GeodeI2CInit': geode_ddc.c:158: error: cast to pointer from integer of different size Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-02z4l.c: drop unnecessary #include linux/types.hMartin-Éric Racine
On hybrid platforms, such as Debian GNU/KFreeBSD, that support V4L2 and yet without providing the full complement of Linux headers, ZTV fails to compile because of this missing header. Given how removing this header does not adversely affect compiling, plus it might improve portability, we went ahead and removed it. Nonetheless, as observed by Gaetan Nadon, z4l.c includes code that explicitly disables the module on any OS other than Linux: LoaderGetOS(&osname, NULL, NULL, NULL); if (osname == NULL || strcmp(osname, "linux") != 0) { if (errmaj) *errmaj = LDR_BADOS; if (errmin) *errmin = 0; return NULL; } Still, in the interest of OS neutrality, we decided to leave recent autoconf magic in place and to let OS vendors figure out how to get the module loaded on non-Linux OS themselves. Patches are welcome. Signed-off-by: Martin-Éric Racine <martin-eric.racine@iki.fi>
2011-12-25Fix lx_display.c:360:9: warning: ISO C90 forbids mixed declarations and codeMartin-Éric Racine
2011-12-19Fix for new vgaHW ABIAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-12-12DCONDPMSSet: handle error return code on "write" to avoid a warningGaetan Nadon
The author of the write() system call has deemed important for the caller to check the return code. If not, the compiler issues a warning. The patch handles a bad return code from write() just in the same way as the code does for the open() calls. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Remove unrequired large file descriptor partial supportGaetan Nadon
The LFS "transitional extension" API is deprecated and is not available on FreeBSD. Large file support (64 bit) is not required on the geode 32 bit only architecture. There are some hints that the LFS transional extension API were not used correclty. The variable holding the value is held in an unsigned long rather than in off_t. The msr open call did not use the O_LARGEFILE flag and did not check for EOVERFLOW. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Move back ztv with geode driverGaetan Nadon
Now we have a clean separation between CPP flags and C Flags Only the C Flags apply to both geode and ztv driver, however it is not worth doing a per target compilation. Should some flags become mutually exclusive and if we want to have both target in the same makefile, add the incompatible flag on the appropriate target, example: geode_drv_la_CFLAGS = $(AM_CFLAGS) -newCFlag and/or geode_drv_la_CPPFLAGS = $(AM_CPPFLAGS) -newCPPFlag Note that both AM_CFLAGS and AM_CPPFLAGS are picked-up by both geode and ztv driver target. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Separate compiler from pre-processor optionsGaetan Nadon
Clean-up what goes in AM_CFLAGS and AM_CPPFLAGS Use more descriptive names such that comments are not needed. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Detect 32bit support on 64bit OS and compile with -m32 if foundGaetan Nadon
For gcc compiler only at the moment. The configuration reports if support is found or not, e.g.: checking if gcc supports the -m32 Intel/AMD option... yes The configuration C test relies on #include unistd.h which includes features.h which includes gnu/stubs.h which includes gnu/stubs-32.h which is missing on 64 bit system without the 32 bit library support. Tested on x86_64 AMD64 CPU with/without libc6-dev-i386 which provides 32 bit support. Remains to be tested on Geode and FreeBSD 32/64 bit. The configuration does not attempt to decide if building should proceed or be aborted. If no 32 bit support then the build will die in the assembly code as it always did before. The variable M32_CFLAGS provides the flag for the makefiles. The variable names and organization is subject to change. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21geode source: streamline whitespace and sort alphabeticallyGaetan Nadon
No functional changes. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Remove -I linux_v26 as the directory does not existGaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Remove duplicate warning variable and werror optionGaetan Nadon
Use already existing: --enable-strict-compilation Enable all warnings from compiler and make them errors (default: disabled) which, byt the way was broken as it was not implemented in geode. Use already existing CWARNINGFLAGS variable, so there is no need to define GCC_WARNINGS. Both come from util-macros version 1.4 or later. http://cgit.freedesktop.org/xorg/util/macros/tree/xorg-macros.m4.in ?id=03b04a6b5d61aafbd2705f7d29e58e0c92553a4a If you configure with a later version of util-macros you may see new warnings appear as additional flags have been added over the years. You get better support for platforms/compiler differences. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Remove unrequired .s assembly files automake supportGaetan Nadon
Only the suffixes .s, .S, and .sx are recognized by automake as being files containing assembly code. http://www.gnu.org/software/automake/manual/automake.html#Assembly-Support Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Remove unused LINUX_2_6 macro from geode driver makefileGaetan Nadon
It is used in ztv but not geode driver. In the wake of more platforms other than linux, might as well remove any source of confusion. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Remove no longer used AMD_V4L2_VIDEO from makefilesGaetan Nadon
This macro has been removed every where from source code. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-21Move ztv driver to it's own directoryGaetan Nadon
The convention is to have the video driver (geode) in the src subdir and any other targets (utils, apps, other drivers) in their own directory. It makes it much simpler to right a correct makefile and to set conditional compile. This highlighted a few things to fix. For now, the directory includes have not been copied as they are required. The AM_CCASFLAGS is not required either as there is no assembler. Other than that, the gcc command issued has no differences. Other unrequired defines could be removed later. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-11-14Revert "Only enable z4l.c on Linux" until we have a consensus.Martin-Éric Racine
2011-11-13Revised BSD check in geode_msr.cMartin-Éric Racine
2011-11-13Move the z4l.c test to src/Makefile.am where it should be.Martin-Éric Racine
2011-11-13Added two #ifdef to enable building on FreeBSD.Martin-Éric Racine
2011-03-13Add optional composite operation fallback tracingPriit Laes
Changing GEODE_TRACE_FALL to 1 allows to easily find the unaccelerated code paths in a given use case while working on driver performance. Signed-off-by: Priit Laes <plaes@plaes.org> Signed-off-by: Mart Raudsepp <leio@gentoo.org>
2011-03-12Fix parameter ordering for calloc/xnfcalloc callsMart Raudsepp
First argument is the number of elements and second the size of one element, not vice-versa. Signed-off-by: Mart Raudsepp <leio@gentoo.org>
2011-02-07Stop including "linux/videodev.h" in z4l.cMartin-Éric Racine
V4L1 support was dropped as of Linux kernel 2.6.38
2011-02-07Fix packed overlay offscreen allocationsDaniel Drake
Commit 5e72a00ad2 caused packed video data to corrupt glyphs and other parts of the screen, but it turns out that the commit actually at fault was d681a844e, incorrectly changing the size of the allocated destination memory from the number of bytes needed to the number of lines needed. While fixing this, I noticed that LXAllocateSurface is probably making the same mistake, and that the height is probably not calculated correctly for some corner cases when calling LXCopyFromSys in the packed video path (but I'm not sure about either). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33004
2010-12-15Restoring compatibility down to X server 1.4Priit Laes
Signed-off-by: Priit Laes <plaes@plaes.org>
2010-12-12Improve handling of gamma correction in video vs graphicsDaniel Drake
The LX is a bit odd in that the palette can be used for gamma correction of graphics data, or video data, but not both at the same time. Right now, during X startup, X sets gamma correction (but without any actual correction) causing the Geode driver to start using the palette for graphics gamma correction. (this is just momentary) Later on during startup, vg_set_custom_mode() switches to using the palette for video gamma correction, and this is the end result. If you later use xrandr to change the gamma, the palette starts being used for graphics again. If you VT switch, vg_set_custom_mode (momentarily) starts using the palette for video, but then X jumps in with a gamma callback causing it to be used for graphics again. End result: no user visible bug, but this is inconsistent. As there is no exposed mechanism for changing video gamma I suggest we just drop that bit from vg_set_custom_mode(). Then the inconsistency goes away. Downside: this now becomes dependent on X setting gamma during startup. I don't know when this was introduced but I think it is recent. Aditionally, I think I found a (harmless) bug in df_set_video_palette_entry, it doesn't do what the comments say.
2010-12-12Fix compilation under xorg >1.9.99Priit Laes
Signed-off-by: Priit Laes <plaes@plaes.org>
2010-11-19LX Panel: lower the 1024x600 refresh rate down to 60Hz.Martin-Éric Racine
NOTE: the eCafe EC-800's panel doesn't support a higher refresh rate.
2010-11-19Print the panel mode BIOS usesFrank Huang
Signed-off-by: Frank Huang<frankr.huang@amd.com>
2010-10-28Revert "Simplify the mode_valid function"Martin-Éric Racine
This reverts commit fab58e111b6655602b4f739260a01247ff478f35.
2010-10-28Simplify the mode_valid functionHuang, FrankR
Signed-off-by: Frank Huang<frankr.huang@amd.com>