summaryrefslogtreecommitdiff
path: root/src/uxa
AgeCommit message (Collapse)Author
2024-05-07uxa: Switch to using crtc index instead of pipeVille Syrjälä
Start using the kms crtc index rather than the pipe almost everywhere. The two numbers could in theory be different if the hardware has some pipes fused off. Though I think such non-contiguous fusing won't actually happen on the hardware generations the driver fully supports. The places where using the kms crtc index is the correct choice have to do with the vblank ioctl crtc selection. The only place where we must stick to the hardware pipe indexing is the MI_SCANLINE_WAIT stuff as there we have to construct CS packets to be consumed by the hardware itself. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2020-11-16More ABI changes for ABI_VIDEODRV_VERSION 25.2Chris Wilson
Descending down into the naming changes, onto the next struct in the chain. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-16Track ABI changes for ABI_VIDEODRV_VERSION 25.2Chris Wilson
Several structs had fields renamed, and so we must update our usage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-09-19uxa: Get rid of -Wno-shift-negative-valueVille Syrjälä
The minimum CS URB entry size is 1. Let's use that instead of 0 so that we don't end up left shifting a -1. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-09-19uxa: Use named initializersVille Syrjälä
Silence the compiler warning about missing initializers by using named initializers. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-09-19sna: Annotate more fall throughsVille Syrjälä
Sprinkle fall through comments where needed. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-01-21sna/uxa: Fix colormap handling at screen depth 30. (v2)Mario Kleiner
The various clut handling functions like a setup consistent with the x-screen color depth. Otherwise we observe improper sampling in the gamma tables at depth 30. Therefore replace hard-coded bitsPerRGB = 8 by actual bits per channel scrn->rgbBits. Also use this for call to xf86HandleColormaps(). Tested for uxa and sna at depths 8, 16, 24 and 30 on IvyBridge, and tested at depth 24 and 30 that xgamma and gamma table animations work, and with measurement equipment to make sure identity gamma ramps actually are identity mappings at the output. v2: Also deal with X-Server 1.19 and earlier, which as of v1.19.6 lack a fix to color palette handling and can not deal with depths/bpc > 24/8 bpc. On < 1.20 we skip xf86HandleColormaps() setup at > 8 bpc. This disables color palette handling on such servers at > 8 bpc, but still keeps RandR gamma table handling intact. Tested on 1.19.6 and 1.20.0 to do the right thing. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-05-31Rename current yuv->rgb shader sources to exa_wm_yuv_rgb_bt601Ville Syrjälä
Our current yuv->rgb shaders follow the BT.601 conversion formula. Rename the shader sources to indicate that fact. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-06meson: Add meson build systemVille Syrjälä
Allow building the driver with meson. Could probably use plenty of cleanups, but at least it gives me a working driver. And I think I managed to make it build everything that autotools builds. Quite a few compiler warnings were suppressed as well. Might want to look at those at some point. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-07-20Update to ABI 22 and NotifyFdChris Wilson
ABI 22 brings in a new BlockHandler/WakeupHandler interface (SetNotifyFd) and throws out the current interface (albeit without delivering any improvements). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-14uxa: Don't bother with xf86GARTCloseScreenAdam Jackson
We only ever use xserver's AGP support from the i810 driver. Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-07-02DRI3 is not supported by mesa/i915Chris Wilson
Since mesa requires __DRI2_FLUSH version 4 for its DRI3 support and mesa/i915 only provides version 3, libGL fails to load (not even falling back to DRI2). Workaround this by not enabling DRI3. References: https://bugs.freedesktop.org/show_bug.cgi?id=96783 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-22uxa: Enable Y-tiling BLT supportChris Wilson
Mesa wants to pass Y-tiled framebuffers onto scanout. Admittedly, this isn't quite that but it does prevent them being jumbled up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-24uxa: Restore old bo on failureLyude
When we fail to do a modeset, we need to make sure that we restore the previous bo in the event that it's changed. Otherwise we'll crash the X server the next time we do a pageflip. This fixes an issue with panning crashing the X server if a user tries to set a large panning resolution such as 5200x3200, and the GPU doesn't have enough memory to handle the bo due to being in UXA mode. Signed-off-by: Lyude <cpaul@redhat.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-15display: prevent a NULL pointer dereference in intel_set_scanout_pixmapMartin Peres
Caught by Klockwork. v2: - be less verbose on failure Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
2015-11-19Re-enable acceleration!Chris Wilson
Double negatives are most confusing before coffee. In removing the double negation from the xorg.conf, I inverted the option in the code but didn't invert the test. As a result, acceleration was now disabled unless you explicitly asked for NoAccel. Reported-by: Jan Steffens Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-19Rename Option "NoAccel" to "Accel"Chris Wilson
Totally cribbed from xf86-video-amdgpu/-radeon: commit 560b7fe6dc66405762020f00e9a05918a36f3a17 Author: Michel Dänzer <michel.daenzer@amd.com> Date: Wed Nov 11 17:31:34 2015 +0900 Rename Option "NoAccel" to "Accel" Renaming the option removes the need for a double negation when forcing acceleration on and is backwards compatible as the option parser automagically handles the 'No' prefix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-02uxa: Add missing const to string to stop compiler warningRobert Ancell
2015-06-17backlight: Factor known names into preferred interfacesChris Wilson
Since the /sys/device/backlight never turned up we face an issue with disambiguating the backlight on multi-GPU devices. Both intel_backlight and nv_backlight are presented are raw interfaces, and on modern systems the ACPI interface is defunct, so we need a way to distinguish them. So, we fallback to our priority table of known interfaces and rank them accordingly, first by class (platform, native, raw) and then by priority. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-09Fix typos found with codespell v1.7Sedat Dilek
To get codespell v1.7 check [2]. [1] https://github.com/lucasdemarchi/codespell [2] https://github.com/lucasdemarchi/codespell/releases Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
2015-05-04Remove the driver option to delete connectors on unpluggingChris Wilson
With a MST topology change, we can find outputs may disappear. We offered a choice as to whether to simply disable them or completely remove them from the listing of available outputs. However, clients never expected that their operation on any output could trigger a BadID XError (or that there is anyway to prevent race conditions). As such an option was made to disable by default, but allow testing complete removal. Now the RandR protocol has been clarified such that XID assigned to outputs are now permanent, as such the option breaks the spec, so drop it. See randrproto commit 895ee5264524c7c239ee4ef5e39c4e295323fb51 Author: Dave Airlie <airlied@redhat.com> Date: Wed Apr 22 10:58:18 2015 +1000 randrproto: clarify output XID lifetimes. This just makes a note that randr won't make outputs disappear dynamically. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Dave Airlie <airlied@redhat.com>
2015-04-24uxa: Fix compilation for boolChris Wilson
../../../src/uxa/intel_driver.c: At top level: ../../../src/uxa/intel_driver.c:769:1: error: unknown type name 'bool' Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-09uxa: Do not register hotplug without RandROlivier Fourdan
When using Xinerama, RandR is automatically disabled, and calling RR routines will trigger an assert() because the RR keys/resources are not set, leading to an Xserver abort. Hotplug makes little sense without RandR, so no need to install a udev monitor if RandR is not available, as done in sna. v3: Rebase onto backwards compatible rrPrivKey detection [ickle] Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31Add TILE property support (for MST tiled monitors)Chris Wilson
Based on the patch for modesetting (and lots of work) by Dave Airlie Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-03Convert from RRSetChanged() to RROutputChanged()Chris Wilson
RRSetChanged() is much more recent than RROutputChanged(), and RROutptChanged() allows for more finer grained updates. Switch to RROutputChanged for compilation with xorg-server-1.14 and older. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-25uxa: udev integration depends on fstat and sys/stat.hChris Wilson
src/uxa/intel_driver.c: In function 'I830HandleUEvents': src/uxa/intel_driver.c:738:14: error: storage size of 's' isn't known src/uxa/intel_driver.c:746:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-18uxa/dri: Drop dependency on stdboolChris Wilson
Copying the bool is_level() without including stdbool.h causes it to not compile on some machines. Just convert back to the old faithful Bool. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-13uxa: Remove the filtering of bogus Present MSC valuesChris Wilson
If the intention was to filter the return values from the kernel, the filtering would have been applied to the kernel values and not to the incoming values from Present. This filtering introduces crazy integer promotion and truncation bugs all because Present feeds garbage into its vblank requests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-07uxa/present: Fix flip_count for aborting on failed flip requestChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-06uxa/present: Do flip returns 0 on failureChris Wilson
Oops, inverted error handling lead to use-after-free and calamity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-05uxa/present: Do not allow the unflip to failChris Wilson
As we cannot propagate the failure for unflipping back to the caller, we must ensure that the CRTCs are correctly reset if the attempt to flip back to normality fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-04Allow runtime selection between DRI levelsChris Wilson
Rather than imposing a maximum DRI level at compile time by compiling out unwanted protocol handlers, default to limiting it at runtime so that we can switch between any level. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-02uxa/dri2: Recreate the triple buffer across a mode changeChris Wilson
If the mode changes whilst we have a pending flip, we may reinstall the previous scanout buffer as our next back buffer despite it no longer matching. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-31Unify Option "DRI" parsingChris Wilson
Allow Option "DRI" "[23]" to also work with UXA. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-31uxa/dri2: Reimplement triple buffer supportChris Wilson
Since xorg-server-1.12.0, Xorg has supported adjusting the client swap limits allowing us the implemention of triple buffered flipping with accurate event timestamps. Given that the current implemention has an issue tracking the right GEM name across composite unredirection, it is an approximate juncture to tackle both bugs. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=742911#c1 Testcase: dri2-race + gnome-shell Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-30uxa: Fix error handling for failed pageflipsChris Wilson
Lots of issues found when trying dri2-race, mostly resulting from queueing too many flips at one - which itself is buggy. However, we crashed whilst trying to recover from the kernel reporting the error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-30uxa/dri2: Make vblank/flip handlers staticChris Wilson
These are no longer called directly from outside intel_dri.c and so we can make them static. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-30uxa/dri2: Reset swap_info->type after a failed flip submissionChris Wilson
As we set the type prior to attempting to queue a flip, we need to then reset the type if that attempt fails and we need to fall back to a vblank handler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-26uxa: fix XVMC = no buildPatrick Welche
Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
2015-01-19Set the vdpau driver to va_glAdel Gadllah
This at least works when the wrapper is installed, there is no i9xx vdpau driver. This should for example improve flash which only supports vdpau. The expectation is that most software will use vaapi in preference for -intel, for example kodi which supports both vdpau and vaapi video acceleration methods. [A quick discussion with Peter Frühberger clarified that kodi should indeed continue to work fine and will not be confused if we expose an actual vdpau driver.]
2014-12-09uxa/dri: Remove defunct intel->back_pixmapChris Wilson
This was only required for glamor support. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-09uxa/dri: Fix triple buffer swappingChris Wilson
Fixes regression from commit 0aa2edbd29c8dd26a5f3748e3875c445ea358a6d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Nov 5 11:56:20 2014 +0000 Remove defunct glamor support where the wrong branch of pixmap exchange upon SwapBuffers was kept when removing the glamor paths. Reported-by: Rui Matos Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-06Remove defunct glamor supportChris Wilson
It never was a stable or complete replacement, and now it is incorporated in Xorg itself! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-08intel: Store pointer to struct intel_deviceChris Wilson
Beware the barbarians at the gate, who invade and steal your ScrnInfoPtr and its Entity from underneath you. In some configurations, we lose access to the struct intel_device stored on the Entity after initialisation, causing havoc. Workaround this by storing the intel_device that we open in our driverPrivate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-24uxa/video: only call intel_xvmc_adaptor_init when xvmc is enabledtobias.jakobi1@uni-bielefeld.de
Build regression from commit 616dea2c67847101fd43b5d89b556b3702c7f0bb Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 24 10:27:55 2014 -0700 Rename uxa-specific functions and structs Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2014-09-18uxa/glamor: Silence compiler warningsChris Wilson
Mark the stub intel_glamor_fd_from_pixmap() as inline to silence the compiler warnings about unused function definitions. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-16uxa: Fix conversion of Segments into RectanglesChris Wilson
The trick is to make sure we consider the CapLast setting in the direction the line is being drawn and adjust the inked pixels accordingly. Testcase: DrawSegments/hv0 Reported-by: Russell King Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-15uxa: Stub out intel_sync_init|fini when not compiled inChris Wilson
In order to fix the build without DRI3, we need to stub out the functions not compiled in, such as intel_sync_fini(). Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-13glamor: Do version check for fd <-> pixmap functionsKeith Packard
glamor_pixmap_from_fd and glamor_fd_from_pixmap were added before version 1.15.99.902, so check for that version before trying to use them. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Fabio Pedretti <fabio.ped@libero.it>
2014-09-12Use intel_uxa.h in all uxa-specific filesKeith Packard
Instead of always including intel_uxa.h from intel.h, and including uxa.h from some files directly, use intel_uxa.h directly from .c files that have UXA-specific code in them. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>