Age | Commit message (Collapse) | Author |
|
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>
|
|
Descending down into the naming changes, onto the next struct in the
chain.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Several structs had fields renamed, and so we must update our usage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
Silence the compiler warning about missing initializers
by using named initializers.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Sprinkle fall through comments where needed.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
We only ever use xserver's AGP support from the i810 driver.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Caught by Klockwork.
v2:
- be less verbose on failure
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
../../../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>
|
|
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>
|
|
Based on the patch for modesetting (and lots of work) by Dave Airlie
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Oops, inverted error handling lead to use-after-free and calamity.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Allow Option "DRI" "[23]" to also work with UXA.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
|
|
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.]
|
|
This was only required for glamor support.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|