Age | Commit message (Collapse) | Author |
|
|
|
When finding the per-connector backlight interface, we have to take a
copy of the interface name for later use, as in this case it is not
constant.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Modern kernels include a link from the sysfs connector directory to the
backlight interface on that connector. Try to find that link first as
this should allow us to enable backlight interfaces on connectors other
than the presumed solitary panel.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
More debug sanity checks that pageflips work.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We start off the system with the screens blanked, waiting the first
dixSaveScreen unblank, where we then apply the accumulated modesets.
This means we have to allow that even if Option DPMS off, and so we
restrict the Option to only enable DPMS (then once enabled they will not
turn off).
References: https://bugs.freedesktop.org/show_bug.cgi?id=98375
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The defacto standard is that the screensaver only blanks the screen but
keeps the outputs alive. We differ by actually disabling the CRTC when
the screen saver kicks in (to save power), however this circumvents
Option "DPMS".
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98375
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we were attempting to switch DPMS leave the state as is if the kernel
reports an error.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we detect a change in the output status, ignore the residual mode on
the CRTC. We use this CRTC mode during inheritance to provide
continuity and to make xrandr look neat we ensure that the mode is
included in the output list. However, following a hotplug event the
current mode may now be invalid and needs to be pruned.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the kernel can provide us with the exact connector that needs
reprobing following a hotplug event, use it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Output_check_status() should return a false if it detects
that the connector mode list has changed so that sna_mode_discover
can reprobe.
Fixes: eb01cc549d4d (sna: Refresh mode list if the kernel updates)
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
|
|
If the kernel changes its list of modes, make sure we update. (This is a
losing battle since X will add whatever modes it finds from the EDID
despite what the kernel is telling it.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Upon completion of the flip-event, check that the current scanout
matches our expectations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since trying to change tiling with an fb attached causes EBUSY, try
without.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As found by Adam Jackson, we can perform the masking of the planemask on
the user buffer and so avoid hitting the fallback paths, so long as we
have no 24bpp Pixmaps.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Avoid the unix socket + libxcb to maximise the throughput.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
At the kernel level, threads and processes are identical - they each get
a fair share of CPU time. From this we can surmise the cause of any
variation between threads and processes. If the threads are balanced
(each thread completing the same number of requests), but the processes
have unbalanced numbers, we know that X is not as fair.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Now X will set the scrn->screen backpointer before Init, update our
assertion to track.
Reported-by: Nick Sarnie <commendsarnex@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97855
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the middle of a composite op, we take the opportunity to note when a
fill clears the entire surface - and mark up the surface as clear. This
includes marking it as all damaged, to the surprise of the upper layer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We should be using the kernel's exec-id and not our own index.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Reported-by: Joseph Yasi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
commit c446a7ccc783e3ca00b4b15d017c6e3af66dc646
Author: Wayne Boyer <wayne.boyer@intel.com>
Date: Wed Nov 18 10:39:42 2015 -0800
Add Kabylake PCI IDs
missed adding the GT information, leaving bxt,kbl using only generic
acceleration.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When the client first receives the fd to the pixmap, the presumption is
that it is coherent. (Give or take concurrent rendering to the pixmap
which will be reported in later Damage events.) We queue all damage to
the GPU, but we also need to remember to finally flush the command queue
so that the rendering is ordered implicitly with the client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we only ensure the flush before damage is sent, we also need to flush
any CPU shadows before the reply to GetBuffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When we damage the CPU shadow of a DRI exported pixmap, we must remember
to add that pixmap of the list to be flushed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
After doing the copy, we need to be sure that it is submitted to
hardware before the reply is sent to the client.
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 1f6dfc9df678 ("sna: Only flush GPU bo for a damage event")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When filling out the set of buffers for the DRI2GetBuffers request,
ensure that any pending rendering to them is flushed to hardware.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Occasionally TearFree likes to flushing pending event to try and avoid a
stall or a reallocation of a buffer. When it does so, we must avoid
processing vblanks as they may cause an update to the frontbuffer
re-entering the TearFree handler. Instead of deferring the obvious
recursions until the next vblank, buffer the events temporarily whilst
we wait inside TearFree.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When the CRTC is transformed, we also want to apply that transformation
to the cursor image so that we can continue to use the HW cursor (but
have it appear relative to the output and not to the framebuffer).
However, we need to convert the CRTC transformation relative to the
cursor and convert it to a simple rotation/scaling/skew transformation
(we already verify it is an affine) by removing any translation.
Reported-by: Da Fox <da.fox.mail@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97236
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When the client calls DRI2GetBuffers it expects the buffer to be
coherent, that is all X rendering to it flushed to hardware for it to be
able to read back.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Tracking SHM flushes precludes some of the optimisations we can make in
future for tracking DRI flushes, so split the two paths.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Based on xf86-video-ati
commit 9a1afbf61fbb2827c86bd86d295fa0848980d60b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Mon Jul 11 12:22:09 2016 +0900
Use EventCallback to avoid flushing every time in the FlushCallback
reports seeing an improvement in reducing flushes at the expense of
checking every event for a DamageNotifyEvent. Since we also mix
rendering with SHM buffers, we have a more diverse set of conditions
under which to flush - but maybe we will see enough of a win for DRI to
merit. So far seeing improvement of ~20% for series of small operations
under the compositor without seeing any regressions, should benefit
composited desktop users. The biggest danger here is missed flushes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Rather than use per-function attributes, if we set the target for the
block using a pragma we can compile the SSE2 routines on 32bit ISA as
well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the kernel complains when trying to move the cursor, we disable the
hwcursor and switch to swcursor. However, if the kernel is still showing
the hwcursor we end up with multiple visible cursors. Attempt to disable
the hwcursor (that may or may not work) as we switch over.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Log the kernel messages when we fail to set a cursor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Now that we register a callback with an external stack and not the
screen, we have to remove it when the screen is destroyed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
The probe functions in intel_module.c call intel_open_device() before
calling intel_scrn_create(), but if the later fails because of e.g.
an allocation failure they were not cleaning up the resources
claimed by intel_open_device(), esp. leaking the fd is a problem
because this breaks the fallback to the modesetting driver.
This commit fixes this by adding a intel_close_device() cleanup
function and calling that when intel_scrn_create() fails.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
We only ever use xserver's AGP support from the i810 driver.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Add textured video support for gen2. The hardware can only deal with
packed YUV formats, so only those will be exposed.
Modelled after the gen3 textured video code.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Instead of passing sna_composite_op to gen2_emit_target(), pass all the
parameters (bo,width,height,format) directly. This makes it possible to
use gen2_emit_target() when we don't have an sna_composite_op.
This matches how gen3_emit_target() works.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We currently hack TearFree/DRI2/swcursor to avoid recursion from inside
the SwapBuffers to handle the swcursor. This has the issue of a trailing
cursor on the boundary of the DRI2 drawable, but prevents the explosion
from swapping TearFree buffers from within the TearFree handler (i.e.
recursion). This only has to apply to the damage processing before the
swap.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Don't allow DRI2 to hand back the current shadow buffer as a Drawable's
next back buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|