summaryrefslogtreecommitdiff
path: root/hw/kdrive/fbdev/fbdev.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-01xfbdev: RemoveAdam Jackson1-892/+0
With the shadow framebuffer overallocation bug fixed (ref below), Xorg + fbdev has tens to hundreds of kilobytes more baseline memory usage than Xfbdev. That's not nothing, but it's little enough that we should focus our efforts on the server that actually gets development attention. https://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev/commit/?id=2c5eba8 Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-06kdrive: Delete unused TOUCHSCREEN define.Jamey Sharp1-6/+0
There's nothing in configure to enable this, and KdTsPhyScreen isn't defined anywhere. [ajax: Rebase, also clean up Xfbdev] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jamey Sharp <jamey@minilop.net>
2015-04-21Convert hw/kdrive to new *allocarray functionsAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-04-18Xfbdev: Wire up Amiga afb4 and afb8 supportGeert Uytterhoeven1-1/+29
Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Keith Packard <keithp@keithp.com>
2013-04-18Xfbdev: Wire up Atari iplan2p4 and iplan2p8 supportGeert Uytterhoeven1-1/+18
Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18Xfbdev: Force shadowfb for frame buffers with non-packed pixelsGeert Uytterhoeven1-1/+2
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18Xfbdev: Reject unsupported frame buffer typesGeert Uytterhoeven1-25/+50
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18Xfbdev: Treat 1 bpp pseudocolor as monochromeGeert Uytterhoeven1-4/+6
miCreateDefColormap() only preallocates black and white pixels if depth > 1. Hence override the visual, so fbdevCreateColormap() takes care of it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18Xfbdev: Add support for monochrome visualsGeert Uytterhoeven1-0/+24
Monochrome supports StaticGray, with hardcoded black and white pixels. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18Xfbdev: Handle unset fix.line_lengthGeert Uytterhoeven1-0/+4
Older frame buffer devices may not fill in fix.line_length, in which case it must be calculated by the application. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-04-18Xfbdev: Make char *fbdevDevicePath constGeert Uytterhoeven1-1/+1
This fixes: hw/kdrive/fbdev/fbdev.c: In function 'fbdevInitialize': hw/kdrive/fbdev/fbdev.c:41:25: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-02kdrive/fbdev: revive randr new screen size logicGeert Uytterhoeven1-1/+9
hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig': hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable] hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-02Revert "kdrive: fix "set but not used" warnings"Peter Hutterer1-0/+10
Partial revert of commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997, better fix coming up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-06kdrive: fix "set but not used" warningsPeter Hutterer1-10/+0
kinput.c: In function 'KdEnqueueKeyboardEvent': kinput.c:1845:16: warning: variable 'ctrl' set but not used kinput.c:1844:17: warning: variable 'keyc' set but not used kinput.c: In function 'KdEnqueuePointerEvent': kinput.c:1887:12: warning: variable 'ms' set but not used kxv.c: In function 'KdXVDisable': kxv.c:1181:19: warning: variable 'ScreenPriv' set but not used mouse.c: In function 'ps2SkipInit': mouse.c:444:9: warning: variable 'skipping' set but not used mouse.c: In function 'ps2Init': mouse.c:473:10: warning: variable 'waiting' set but not used mouse.c:472:9: warning: variable 'skipping' set but not used fbdev.c: In function 'fbdevRandRSetConfig': fbdev.c:468:19: warning: variable 'newheight' set but not used fbdev.c:468:9: warning: variable 'newwidth' set but not used Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Robert Morell <rmorell@nvidia.com>
2012-03-21Introduce a consistent coding styleKeith Packard1-413/+376
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-30Fix UTF-8 encodingMatěj Cepl1-1/+1
Report to find out all non-UTF-8 files created by cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then /bin/true else echo $FILE fi done >>report Signed-off-by: Matěj Cepl <mcepl@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> [Daniel: git am failed for me, so I redid it. The method listed in the commit message also failed, so I just used file/grep/iconv. The results are the same though.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-7/+7
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-01-06kdrive: Make internal functions staticMikhail Gusarov1-10/+10
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06kdrive: Remove unused 'k' variableMikhail Gusarov1-3/+2
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06kdrive: Extract common part of fbdevPutColors and fbdevEnableMikhail Gusarov1-16/+25
Put framebuffer colormap updating code in separate function for brevity. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06kdrive: Remove unused overlay fb supportMikhail Gusarov1-42/+42
Xfbdev, Xephyr and Xfake all use only one framebuffer, so simplify implementation by removing overlay support. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06kdrive: Move Xephyr-specific fields out of KdScreenInfoMikhail Gusarov1-4/+0
memory_base, memory_size, off_screen_base fields in KdScreenInfo are used only by fake EXA in Xephyr. Move them into Xephyr, cleanup Xfake and Xfbdev. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-01Remove trailing whitespaceMikhail Gusarov1-39/+39
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-08Remove some null statements.James Cloos1-1/+1
Remove several doubled statement-terminal semicolons. Reported by Fernando Carrijo.
2008-10-06xalloc+memset(0) -> xcallocAdam Jackson1-2/+1
2008-07-17Dead code removalDaniel Stone1-5/+1
Remove a whole bunch of code that was never built, be it entire files or just dead ifdefs.
2008-07-17KDrive: Delete rafts of unused codeDaniel Stone1-2/+0
Most of this stuff was gone with the last real hardware drivers that used it. Au revoir.
2008-04-22Reuse the existing framebuffer mode in kdrive/fbdevRoss Burton1-9/+17
When starting up kdrive/fbdev, if the current framebuffer mode is sensible use that unless told otherwise. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2007-11-05KDrive: Remove usage of allocaDaniel Stone1-2/+2
Replace with heap allocations.
2007-06-29Death to RCS tags.Adam Jackson1-3/+0
2006-09-07Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Daniel Stone1-5/+13
input-hotplug
2006-08-31Fix previous commit breaking other kdrives pulling in fbdev.aMatthew Allum1-0/+2
2006-08-31Add framebuffer device command line switch for XfbdevMatthew Allum1-5/+11
2006-07-21new KDrive input world orderDaniel Stone1-3/+3
Convert KDrive to GPE/GKE interface. Add first-class drivers and enumerate every device separately through Xi, instead of lamely attempting to aggregate them. Add XKB support to the Linux keyboard driver. Add 'thumb button' support to the tslib driver. Rejig InitInput, so each DDX has to add a list of drivers it supports. Support NewInputDeviceRequest, et al.
2006-02-16Make more extensions optional in build (for kdrive). Fix kdrive build forKeith Packard1-5/+5
actual hardware. Fix kdrive pointer signed/unsigned types. Add kdrive-required YX rotation functions. Replace rgb text file loading with static rgb color table.
2005-12-27Build fixes: XSERVER_LIBS -> KDRIVE_LIBS, config.h -> kdrive-config.hAdam Jackson1-1/+1
2004-11-28Re-read "fix" structure from kernel after mode selection, in case linePhil Blundell1-0/+5
pitch has changed.
2004-09-14Only set screen parameters if resolution has changed from current values.Phil Blundell1-2/+6
Patch from scoony@noos.fr.
2004-07-26Eliminate bogus rate check in fbdevModeSupported. Hmm. Potentially bogusKeith Packard1-5/+1
rate selection necessary for Mac fbdev Don't know about fb changes to pixmaps, so can't track dirt. Add Mac specific 1280x854 mode. Warn when requested mode isn't found. Add ability to soft-boot video cards. Add region expand request. FIXME: need test cases
2004-07-20Select optimizedPhil Blundell1-1/+32
16bpp shadow copy functions if screen is 16bpp. Select -YX versions for 90 and 270 rotations if architecture is ARM.
2004-06-28Separate out off-screen allocation from Init. Fix Enable to updateKeith Packard1-2/+3
off-screen addresses. Wrap RandR to update off-screen addresses. Set off_screen_base and memory_size fields correctly.
2004-05-28Hey, I like devfs.Daniel Stone1-1/+2
Try /dev/fb/0 if /dev/fb0 fails.
2004-05-06Use current resolution by default, change rate to 75 to matchKeith Packard1-3/+10
fbdevModeSupported cut-off (?). Glenn McGrath <glennm@hydrix.com>
2003-12-01Add support for setting the video mode.dri-0-1-branchpointAnders Carlsson1-3/+79
2003-12-01Call KdShadowUnset before fbdevSetShadow.Phil Blundell1-0/+2
2003-12-01- Add fbdev mode-setting backend to Xati. It and vesa are compiled in whenEric Anholt1-1/+1
available, with fbdev being used by default. - Use depth 16 by default when vesa backend is used. - Add MMIO defines for PowerPC (should be in a common location). Many thanks for Michel Daenzer for much of this code.
2003-11-17Clear window when Manual Subwindows redirect is destroyedKeith Packard1-2/+2
Fix Tile/Stipple origin with non-zero pixmap window origins Use computed depth for TrueColor visuals as fbdev doesn't have one.
2003-11-07Ok, Composite extension is semi-working; when no-one asks for redirection,Keith Packard1-1/+6
the server seems to act as before. With RedirectSubwindows (root, automatic), the server looks just like a regular X server. Now to go rewrite the (currently lame) compositing manager to get some real action on the screen. Some of the fixes here are to make valgrind quiet with various ioctls used by kdrive/linux. Also fixed a bug where fbdev initialization was out of order in fbdev.c and smi.c
2003-11-02merge xfixes_2_branch back to HEADKeith Packard1-220/+91
2003-10-14-Wall fixesKeith Packard1-19/+2