xf86-video-intel: 2 commits - src/sna/sna_display.c src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Dec 11 02:51:42 PST 2015
src/sna/sna_display.c | 13 +++++++++++++
src/sna/sna_dri2.c | 12 +++++++-----
2 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 6c4ffba39acb114cbbbfa3359a8c1ba7dfcc7df6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Dec 10 16:19:21 2015 +0000
sna: Don't disable the native backlight around modesets
The kernel can handle the native 'intel_backlight' automagically around
modesets, so let it.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 67a626b..cc1c258 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -849,9 +849,22 @@ sna_output_backlight_set(struct sna_output *sna_output, int level)
return ret;
}
+static bool
+has_native_backlight(struct sna_output *sna_output)
+{
+ return sna_output->backlight.type == BL_RAW;
+}
+
static void
sna_output_backlight_off(struct sna_output *sna_output)
{
+ /* Trust the kernel to turn the native backlight off. However, we
+ * do explicitly turn the backlight back on (when we wake the output)
+ * just in case a third party turns it off!
+ */
+ if (has_native_backlight(sna_output))
+ return;
+
DBG(("%s(%s)\n", __FUNCTION__, sna_output->base->name));
backlight_off(&sna_output->backlight);
sna_output_backlight_set(sna_output, 0);
commit c4565979572b61cf7fc0b931333c032c88b259f1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Dec 2 10:06:46 2015 +0000
sna/dri2: Emit the outstanding signal when eliding a swap
When we do the exchange for the next swap, we should emit any pending
completion signal for the previous buffer.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index c093024..33cf3d9 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2791,6 +2791,7 @@ sna_dri2_flip_continue(struct sna_dri2_event *info)
info->sna->dri2.flip_pending == info);
info->sna->dri2.flip_pending = info;
info->queued = true;
+ info->signal = info->type == FLIP_THROTTLE;
return true;
}
@@ -3062,17 +3063,18 @@ sna_dri2_schedule_flip(ClientPtr client, DrawablePtr draw, xf86CrtcPtr crtc,
}
DBG(("%s: executing xchg of pending flip: flip_continue=%d, keepalive=%d, chain?=%d\n", __FUNCTION__, info->flip_continue, info->keepalive, current_msc < *target_msc));
sna_dri2_xchg(draw, front, back);
- info->flip_continue = FLIP_COMPLETE;
info->keepalive = KEEPALIVE;
- signal = info->signal;
- info->signal = true;
if (xorg_can_triple_buffer() &&
current_msc < *target_msc) {
DBG(("%s: chaining flip\n", __FUNCTION__));
- info->type = FLIP_THROTTLE;
+ info->flip_continue = FLIP_THROTTLE;
goto out;
- } else
+ } else {
+ info->flip_continue = FLIP_COMPLETE;
+ signal = info->signal;
+ info->signal = true;
goto new_back;
+ }
}
info = sna_dri2_add_event(sna, draw, client, crtc);
More information about the xorg-commit
mailing list