Commit Graph

5138 Commits

Author SHA1 Message Date
Chris Wilson f37dae734e sna: Just use the CRTC id from the array
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 14:20:54 +01:00
Chris Wilson b1f24a0eae sna: Make sna_crtc_apply() valgrind clean
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 14:17:15 +01:00
Chris Wilson 0ebfcdbb80 sna: Make AddFB valgrind clean
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 14:10:04 +01:00
Chris Wilson 32ca3c7b65 sna: Make sna_crtc_is_bound() valgrind clean
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 14:02:11 +01:00
Chris Wilson 7973f6751c sna: Add a little bit more verbosity to cursor routines for valgrind
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 14:00:55 +01:00
Chris Wilson 19c463e52d sna: Only wait if there is a suitable active buffer
There is not point repeating the search after retiring if we know that
there is no outstanding suitable active buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:54:35 +01:00
Chris Wilson 5b99c7cd34 uxa/dri: Enable vblank scheduling even with pageflipping disabled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 810357ad65 uxa/dri: Fix ordering of setting vs using swap members
Trivial readibility fix, as the actual ordering is serialised through
there being only a single thread.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 2b56a188ef Mark another couple of options as being UXA only.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson b025f1a604 sna/dri: Tweak vblank_mode=n swapbuffers to account for throttle delay
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 45148a714f sna/dri: Enable handling for Option "SwapBuffersWait"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson c709f2447d sna/dri: Requeue vblank throttling until the vsync'ed copy completes
If the GPU is busy, then we may not actually schedule our copy for
several vblanks, resulting in us falsely reporting that the work
completed too early and allowing the client to continue scheduling more
work and racing ahead of the queued copies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 7e73fa02ed sna: Add some debugging to show count of outstanding requests during retire
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 62b557065e sna: Use magic upload buffers for video textures
So that we may benefit from the caching of buffers and the automatic
selection  of the preferred upload method.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 35291d2db8 sna: Search the inactive bo cache for a mappable upload buffer
See if we have a bo that we can cheaply map to an inplace upload, rather
than rely on an existing GTT map.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28 12:48:25 +01:00
Chris Wilson 36d53ff52b sna: Validate all CRTCs after updating one
Updating one CRTC may cause the kernel to turn off another, so be
paranoid and run the check in a loop after applying the CRTC set.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-27 17:02:06 +01:00
Johannes Obermayr 7fdd8bd6d2 glamor: Fix misspelled xf86GetOptValString and OPTION_ACCEL_METHOD introduced by commit e456291.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-27 11:54:00 +01:00
Chris Wilson 8ea4ba081d sna: Fix typo for debug compilation
s/ctrc/crtc/

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-26 21:48:16 +01:00
Chris Wilson 317bf05196 sna: Perform the selftest after probing
We do no want to slow down the detection phase by performing our
self-tests, so only running those before initialising the driver.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-25 14:34:16 +01:00
Chris Wilson a5fe863e3f sna: Check the bus type before declaring probe success
This should never fail, but still better to fail during detection rather
than pretend it works.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-25 14:28:56 +01:00
Chris Wilson 4094826aee sna: Trust the crtc-is-bound determination after modeset and hotplug
As these should be the only time that they change and we now have the
checks in place, we can drop the workaround of doing the check just
before emitting the wait.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-25 10:06:57 +01:00
Chris Wilson 8a9a585341 Only create a single instance of the intel_options array
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-25 10:06:57 +01:00
Chris Wilson e456291350 Allow runtime switching of AccelMethod between uxa/sna and even glamor
Section "Device"
  Option "AccelMethod" "uxa/glamor/sna"
EndSection

The appropriate backend must also be enabled at compile time for the
runtime option to be available (i.e. --enable-uxa (default) --enable-sna
--enable-glamor)

Demanded-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50290
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-24 19:01:22 +01:00
Eugeni Dodonov df6ab02c36 Unify options handling between UXA and SNA
Unifies available options for both UXA and SNA drivers, and
moves them into a common header file, intel_opts.h.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-05-24 18:47:41 +01:00
Chris Wilson ae2be7e25b sna/trapezoids: Correct rounding for downsampling onto sample grid
Reported-by: S. Christian Collins <s_chriscollins@hotmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49446
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-24 16:33:27 +01:00
Chris Wilson 0ab226e27e sna: Query CRTC states following a hotplug event
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-24 12:51:46 +01:00
Chris Wilson 3f3bde4f0c uxa: Only consider an output valid if the kernel reports it attached
Reported-by: Kyle Hill <kyle.hill@tacomafia.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50078
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-24 12:03:14 +01:00
Chris Wilson 11db66fedf sna: Add some more DBG tracepoints around modesetting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-24 11:18:18 +01:00
Chris Wilson fb9da4cb9e sna: Only mark an unattached output as inactive
So that a latter attempt to set the DesiredMode may succeed and we do
not modify the configuration without notifying clients.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23 13:53:37 +01:00
Chris Wilson 5ae032e22b sna: Suppress modesetting errors on return from VT switch
If we presume that userspace will set the correct mode shortly
afterwards, we can ignore the failure of the automatic restore.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23 13:27:07 +01:00
Chris Wilson 34882a979d sna: Keep checking retirement for flushing list
Even after all outstanding requests have been completed we may still
have buffers on the flushing list that need to become idle.
Once such consequence would be to prevent the vblank flush from going
idle, causing spurious wakeups every vrefresh when otherwise idle.

References: https://bugs.freedesktop.org/show_bug.cgi?id=50078
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23 11:10:53 +01:00
Dave Airlie 54fde5bf05 intel: convert sna/uxa to using new glyph picture accessors.
The compat-api.h takes care of old/new servers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23 11:02:20 +01:00
Dave Airlie 43a34186d1 intel: convert to new screen conversion APIs
The compat header takes care of the old server vs new server.

this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23 11:02:20 +01:00
Dave Airlie 9aabc04d76 intel: add compat header file for conversion fns
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23 11:00:29 +01:00
Dave Airlie c9ce6ae8a6 legacy/i810: rename pScreen->screen
For consistency before moving to new APIs.

This just changes the files where the API changes will touch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23 08:37:43 +01:00
Dave Airlie 70ee0f84f5 legacy/i810: rename pScrn->scrn
This is need to make the compat api stuff easier to implement.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23 08:31:52 +01:00
Chris Wilson 3410db008c sna/dri: Avoid confusion of attempting to exchange pixmaps for DPMS-off flips
Not only do we confuse ourselves, but we end up confusing the damage
tracking on the root window whenever we update the Screen Pixmap. So for
the time being, don't.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-22 16:24:21 +01:00
Chris Wilson 28c4fb0b70 sna: Swallow disconnection event upon mode restoration
So that we can VT switch back to X even though the output configuration
has now changed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-22 09:49:53 +01:00
Chris Wilson b17c44c8d2 sna: Remove incorrect assertion for mode restoration
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-22 09:43:51 +01:00
Chris Wilson 49b7742999 sna: Force config restoration after VT switch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-22 09:42:01 +01:00
Chris Wilson 952e3dcba3 sna: Only override active on DPMSModeOff
Along the enable path we then only want to change the value if we
actually call sna_crtc_apply.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-21 19:49:55 +01:00
Chris Wilson afdaf18459 sna: Add a log message for the change of CRTC mode
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-21 14:32:39 +01:00
Chris Wilson 9fb18462ec sna: Confirm that the modeset takes
If we attempt to change to a mode with a disabled connector the kernel
will silently switch off that connector (and crtc) and report that the
modeswitch is successful.

Reported-by: Kyle Hill <kyle.hill@tacomafia.net>
References: https://bugs.freedesktop.org/show_bug.cgi?id=50078
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-21 14:12:23 +01:00
Chris Wilson cd3b488544 sna/gen7: Trim a dead assignment
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-20 14:28:06 +01:00
Chris Wilson cf79cd3e27 sna: Emit a new batch if we need to clip after PolyText without space
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-19 12:44:11 +01:00
Chris Wilson f91dcc44dc sna: Give the proxy a unique name
So that if we cache the current destination bo (for example, gen3) then
a new proxy (or even just a new batchbuffer) will indeed cause the
destination buffer to be updated.

Reported-and-tested-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48636
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-18 21:08:24 +01:00
Chris Wilson ee073d613b sna/traps: Fix processing of full-steps
A missing factor of Y-height caused the computation of coverage for the
spans to be completely wrong. This affects the vertical segments of
rounded rectangles, for instance.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-18 15:39:32 +01:00
Chris Wilson 8ba800c639 sna: Don't consider uploading inplace if the dst bo is unmappable
Handle (and take advantage of) the fallback at the high level rather
than masquerading an inplace write.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-18 15:36:38 +01:00
Chris Wilson dad24721a1 Revert "sna: Always try to operate inplace if we an LLC gpu bo"
This reverts commit 10b4a9bb5f as it
causes a regression for pixel data uploads to active buffers.
2012-05-18 15:36:38 +01:00
Chris Wilson 681c6e7241 sna: Track flushing status of live bo
Currently we only move a bo with an outstanding kernel flush onto the
flushing list if it is no longer in use. This leaves us potentially
stalling on a flush if we try then to write to the object believing it
to be retired and idle.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-18 15:36:38 +01:00