summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-13hw/xwin: Add xwinclip test clientJon TURNEY3-0/+178
Add xwinclip test client, which includes stubs for winDebug(), ErrorF() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Changes in error logging to make libwinclipboard more useful as a ↵Jon TURNEY1-26/+25
library Consistently use ErrorF() rather than winErrorFVerb() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Look up atoms in winClipboardProc()Jon TURNEY4-52/+52
Look up all atoms of interest in clipboard code in winClipboardProc() and pass them down. This avoids the need to check serverGeneration to notice when we need to invalidate cached atom values. Also consistently use cached atom values everywhere, rather than sometimes just doing XInternAtom() again. Remove WIN_LOCAL_PROPERTY as unused now, as we only refer to CYGX_CUT_BUFFER once and do that directly. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Add fUseUnicode as parameter to winClipboardProc()Jon TURNEY3-17/+3
Add fUseUnicode as parameter to winClipboardProc() Access g_fUseUnicode global when calling it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Separate libwinclipboard interface and internal header filesJon TURNEY8-144/+166
Rename the libwinclipboard internal header from winclipboard.h to internal.h Put libwinclipboard's public interface into winclipboard.h This lets winclipboardinit.c partake of that public interface, and all X server headers without clashes winInitClipboard() prototype belongs in a server header v2: Remove duplicate declaration of winClipboardWindowDestroy() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Return a shutdown flag from winClipboardProc() if we should stop tryingJon TURNEY3-8/+15
Return a shutdown flag from winClipboardProc(), and use it in winClipboardThreadProc() to determine if we should stop. Currently this is set if the clipboard messaging window received a WM_QUIT. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Move clipboard integration code down to a subdirectoryJon TURNEY9-12/+28
Move clipboard integration code down to a subdirectory and build as a convenience library Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Make g_hwndClipboard staticJon TURNEY4-25/+23
Move winFixClipboardChain() into winclipboardthread.c Add winCLipboardWindowDestroy() function to access it for WM_DESTROY Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Add remaining clipboard globals to winglobals.hJon TURNEY2-7/+3
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Hoist use of winSetAuthorization() and winGetDisplayName() up one levelJon TURNEY3-20/+23
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Eliminate g_pClipboardDisplay and g_iClipboardWindow globalsJon TURNEY4-30/+23
Eliminate the g_pClipboardDisplay and g_iClipboardWindow globals used to make those values available to the clipboard wndproc, by passing them in via the WM_CREATE message instead. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Move winClipboardCreateMessagingWindow() to winclipboardthread.cJon TURNEY3-53/+55
Move winClipboardCreateMessagingWindow() from winclipboardinit.c to winclipboardthread.c, the only place that uses it, and make it static. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify ↵Jon TURNEY10-242/+197
event instead Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper, the completely equivalent client-side mechanism. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Remove g_fClipboardLaunched, it's value is identical to ↵Jon TURNEY2-6/+1
g_fClipboardStarted Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Hoist setting of g_fClipboardStarted flag up one levelJon TURNEY2-7/+5
Hoist the setting of g_fClipboardStarted flag up one level. Also move up the clearing of the g_fClipboardLaunched at the end of clipboard function. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: winProcEstablishConnection doesn't need to check if clipboard startedJon TURNEY1-8/+0
winProcEstablishConnection doesn't need to check if clipboard has already been started. It should be clear that we start the thread only once when the wrapper tells us to, as the wrapper unhooks itself thereafter. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Hoist clipboard thread restart up one levelJon TURNEY4-39/+43
Hoist clipboard thread restart up one level. Note that currently g_fClipboardLaunched is set the first time in the winProcEstablishConnection wrapper, and subsequent times when the clipboard thread restarts itself. Try to clarify this and just set g_fClipboardLaunched before starting the thread. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Push winClipboardShutdown() into winclipboardinit.cJon TURNEY4-40/+34
Push winClipboardShutdown() into winclipboardinit.c This lets us make g_ptClipboardProc static Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13hw/xwin: Remove left-over pthread_exit() in clipboard codeJon TURNEY1-4/+5
Commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 removed all but one of the pthread_exit() calls which used to call winClipboardThreadExit() Fix the final remaining one to exit via done label on IOError instead. Also fix a comment and report pre-flush failure to log, but do not exit Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-11xwayland: Snap damage reports to the bounding boxAdam Jackson1-9/+4
Instead of sending every little rect. Lets x11perf run to completion, makes 'while true; do gtkperf -a; done' take longer to crash. This is effectively a resend of the same logic against the old xfree86+xwayland branch: http://lists.x.org/archives/xorg-devel/2013-October/038453.html Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-11xwayland: Implement throttling for surfaces based on the frame eventJasper St. Pierre2-5/+31
This implements simple throttling that keeps us to one attach per frame. There isn't really an active performance benefit, since the buffers will be redrawn only once per frame anyway, but it does cut down on the chatty network traffic. Since the Wayland sockets might fill up as well, the cut down on the volume of data we send out also provides us with a big stability benefit. Namely, mutter is a lot more stable running gtkperf, a fairly intensive X11 application, after this change. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-09-11xwayland-input: Fix a crasher for a race with the Wayland compositorJasper St. Pierre1-0/+9
If something quickly maps and unmaps a window, then we'll immediately create and destroy the Wayland surface that cooresponds to that window. If our mouse pointer is over the window when the surface is created, we'll receive a enter on the window. Since resource creation and destruction is not synchronous, that means that the compositor will queue up an event for a resource that's eventually destroyed. On the client-side, when we receive this message, we note that the resource isn't allocated, and get a NULL surface in our enter handler. We immediately try to dereference this, and then crash. This was caused by running gtkperf while moving the window a lot. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-09-11glamor: Make glyph mask cache per-screenMichel Dänzer2-36/+37
It references a pixmap, which is a per-screen resource. Fixes broken text rendering in xfwm4-tweak-settings in Zaphod mode. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11glamor: Track glyph caching information per screenMichel Dänzer1-10/+13
This is necessary because the glyph caches are per screen. Fixes broken menu text in gnome-terminal in Zaphod mode. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11glamor: Move 'glyph caches realized' check to glamor_realize_glyph_cachesMichel Dänzer2-10/+7
And rename the boolean to reflect what it's about. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11glamor: Call glamor_glyphs_init from glamor_create_screen_resourcesMichel Dänzer1-1/+5
The comment above glamor_glyphs_init was already saying so. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11Merge remote-tracking branch 'jturney/master'Keith Packard13-39/+160
2014-09-11Make list tests actually test listsAlan Coopersmith1-12/+12
Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11glx: Disable indirect GLX contexts by default.Eric Anholt1-1/+1
Almost every situation of someone running indirect GLX is a mistake that results in X Server crashes. Indirect GLX is the cause of regular security vulnerabilities, and rarely provides any capability to the user. Just disable it unless someone wants to enable it for their special use case (using +iglx on the command line). Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmapKeith Packard3-3/+7
Present didn't provide the 'kind' argument to the present_complete_notify hook that GLX uses to construct GLX_BufferSwapComplete events, so GLX was reporting events for PresentCompleteKindMSC notifications, which resulted in duplicate GLX_BufferSwapComplete events and crashes in clutter. See the gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=733282 Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-09-11os/log: adjust gcc version conditions for #pragmaThomas Petazzoni1-2/+2
In commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 ("gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored"), some compile time conditionals were added around the #pragma usage. Those conditionals ensure that the #pragma are not used on gcc <= 4.2. However, the usage of #pragma diagnostic inside functions was only added in gcc 4.6, and a build failure is therefore experienced with gcc 4.5: log.c: In function 'LogInit': log.c:199:9: error: #pragma GCC diagnostic not allowed inside functions log.c:201:9: warning: format not a string literal, argument types not checked log.c:212:9: error: #pragma GCC diagnostic not allowed inside functions log.c:214:17: warning: format not a string literal, argument types not checked $ ./host/usr/bin/powerpc-linux-gnu-gcc -v [...] gcc version 4.5.2 (Sourcery G++ Lite 2011.03-38) This patch therefore adjusts the compile time conditionals to make sure the #pragma is not used on gcc <= 4.5, and only used on gcc >= 4.6. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11pixmap: fix reverse optimus support with multiple headsDave Airlie3-4/+21
For doing reverese optimus to multiple outputs on a secondary GPU the GPU can store the blits into a large screen pixmap, unfortunately this means we need a destination offset into the dirty code, so add a new API that just adds this interface. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11glx: Fix 'y ' value in swrastGetDrawableInfo()Maks Naumov1-1/+1
Signed-off-by: Maks Naumov <maksqwe1@ukr.net> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-29hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffersJon TURNEY1-7/+0
The piglit test glx_make_current triggers this assertion, by making the context current on a different drawable before issuing a glXSwapBuffers() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin/glx: Downgrade "forcing window to exist" message to debugJon TURNEY1-1/+1
It happens whenever a GLX client uses GL on a window before it's been mapped, so don't log it like an error. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin/glx: Fix a couple of typo bugs in indirect.cJon TURNEY1-6/+3
fbConfigToPixelFormatIndex()'s drawableTypeOverride parameter is a drawable type bitmask, not a drawable type enum value WGL_SWAP_COPY_ARB is a value of the WGL_SWAP_METHOD_ARB attribute for wglChoosePixelFormatARB(), not an attribute itself also remove duplicate error reporting for wglChoosePixelFormat() and fix a comment Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin/glx: Update .gitignoreJon TURNEY1-1/+4
Update to align with rewrite of wrapper generation script in commit 583a1146233f16d861706926706e5feec3baffba Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin/glx: Don't override the server supported GL extensions string.Jon TURNEY1-3/+0
Don't override the server supported GL extensions string. The string reported to the client is the intersection of client, server and GL implementation extensions. Overriding the server supported GL extensions string like this causes extensions which are supported by the client and implementation, but not by the server, to be erroneously reported, so don't change it. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin: Add an idempotency guard to glwindows.hJon TURNEY1-0/+5
Add an idempotency guard to glwindows.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL()Jon TURNEY1-0/+4
Seen during shutdown when using '-fullscreen' and '-depth 8' Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin: Improve choice of display name used by internal clientsJon TURNEY7-9/+111
Choose the display name used to connect to internal clients and exported into environment of processes started from the traymenu so that it uses a transport we know is working This should mean the server can start correctly with -multiwindow and/or -clipboard and any two of -nolisten inet6, -nolisten inet and -nolisten unix (the server will correctly refuse to start if all 3 are used, as it must be listening on at least one socket) v2: Place prototype for winGetDisplayName() in windisplay.h, and include it where needed. v3: Include xwin-config.h, so that _XSERVER64 is defined, just in case anything relies on that. v4: Replace grovelling around in the server's list of listeners with new Xtrans TransIsListening() interface, added in Xtrans 1.3.3 See also [1] [1] https://sourceware.org/bugzilla/show_bug.cgi?id=10725 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin: Makefile.am cleanupJon TURNEY1-7/+24
- Rename XWIN_GLX_LINK_FLAGS -> XWIN_GLX_SYS_LIBS for consistency - Rename MULTIWINDOW_LIBS -> MULTIWINDOW_SYS_LIBS for consistency - Don't link with XWin with $(MAIN_LIB), it provides it's own main() - Put one library per line for more intelligible diffs when one is added Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29hw/xwin/glx: When generating shims, limit the considered features to GL ↵Jon TURNEY1-5/+8
version <=1.2 This fixes a problem when using Khronos registry data since the change of 2013-08-16 removed glBlend(Color|Equation) from GL1.2 and added them to GL_ARB_imaging. If shim generation considers all features, no shims are generated for glBlend(Color|Equation) as they are first emitted for GL 1.4 (which we ignore as shims are only generated for GL version <=1.2), then emission for GL_ARB_imaging is skipped as they have already been emitted. Also improve feature name matching so it is exact, not on an initial substring, so 'GL_ARB_texture_compression_bptc' and 'GL_ARB_texture_compression_rgtc' aren't matched by 'GL_ARB_texture_compression'. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-26Merge branch 'modesetting-import' into masterEric Anholt8-0/+3246
This reintroduces a "hardware" driver to the xfree86 directory. Unlike the drivers that xorg used to include in the source tree, that needed independent release schedules to get hardware support out the door, the modesetting driver shouldn't change much as new hardware gets released. A lot of what this driver needs to do is just keep up with server ABI changes. This import was done by taking xf86-video-modesetting-0.9.0, and running this script with 'git-filter-branch -f --tree-filter ~/bin/modesetting-filter': mkdir -p hw/xfree86/drivers/modesetting rm -f README autogen.sh configure.ac Makefile.am .gitignore rm -f man/Makefile.am mv man/modesetting.man hw/xfree86/drivers/modesetting/ mv COPYING hw/xfree86/drivers/modesetting/ mv src/* hw/xfree86/drivers/modesetting/
2014-08-21ephyr: set screen size & origin from host X server output's CRTC geometryLaércio de Sousa6-8/+175
If a given output is passed via new -output option, Xephyr will query host X server for its info. If the following conditions are met: a. RandR extension is enabled in host X server; b. supported RandR version in host X server is 1.2 or newer; c. the given output name is valid; d. the given output is connected; then Xephyr will get output's CRTC geometry and use it to set its own screen size and origin. It's just like starting Xephyr in fullscreen mode, but restricted to the given output's CRTC geometry (fake "Zaphod mode"). This is the main feature needed for Xephyr-based single-card multiseat setups where we don't have separate screens to start Xephyr in fullscreen mode safely. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21ephyr: enable screen window placement following kdrive -screen option ↵Laércio de Sousa5-6/+27
extended syntax With this patch, one can launch Xephyr with option "-screen WxH+X+Y" to place its window origin at (X,Y). This patch relies on a previous one that extends kdrive -screen option syntax to parse +X+Y substring as expected. If +X+Y is not passed in -screen argument string, let the WM place the window for us, as before. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21kdrive: add support to +X+Y syntax in -screen option parsingLaércio de Sousa2-4/+21
This patch enhances current -screen option parsing for kdrive-based applications. It can parse strings like <WIDTH>x<HEIGHT>+<XOFFSET>+<YOFFSET>, storing X and Y offsets in KdScreenInfo instances. For negative values, this patch supports +-X+-Y (not -X-Y) syntax. It will allow e.g. proper Xephyr window placement for multiseat purposes. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21fb: Fix invalid bpp for 24bit depth windowTakashi Iwai1-1/+1
We have a hack in fb layer for a 24bpp screen to use 32bpp images, and fbCreateWindow() replaces its drawable.bitsPerPixel field appropriately. But, the problem is that it always replaces when 32bpp is passed. If the depth is 32, this results in bpp < depth, which is actually invalid. Meanwhile, fbCreatePixmap() has a more check and it creates with 24bpp only when the passed depth <= 24 for avoiding such a problem. This oneliner patch just adds the similar check in fbCreateWindow(). This (hopefully) fixes the long-standing broken graphics mess of cirrus KMS with 24bpp. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-21xfree86: Allow non-PCI devices as primaryThierry Reding1-4/+3
On platforms that don't support PCI or have no GPU attached to the PCI bus, there can still be a primary device on a non-PCI bus. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Tested-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21xfree86: Fallback to first platform device as primaryThierry Reding3-0/+19
When neither of the various bus implementations was able to find a primary bus and device, fallback to using the platform bus as primary bus and the first platform device as primary device. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Tested-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>