xf86-video-intel: 5 commits - src/sna/gen8_render.c src/sna/kgem.c src/sna/kgem.h src/uxa/intel_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jun 18 07:01:54 PDT 2014
src/sna/gen8_render.c | 14 +++++++-------
src/sna/kgem.c | 3 +++
src/sna/kgem.h | 11 +++++++----
src/uxa/intel_display.c | 18 +++++++++++++++---
4 files changed, 32 insertions(+), 14 deletions(-)
New commits:
commit 7119d394a673f40eb467d040c6febf3749924394
Author: Hans de Goede <hdegoede at redhat.com>
Date: Wed Jun 18 15:01:37 2014 +0200
uxa: Mark the output as off before making pipe changes
This is a partial "backport" of commit c6cd10f536, which makes the same
change for sna, to avoid users still using uxa ending up with a blackscreen
after plugging in an external monitor.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1032978
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1103806
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index e00b9c2..a745dc5 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -320,6 +320,14 @@ intel_crtc_apply(xf86CrtcPtr crtc)
xf86OutputPtr output = xf86_config->output[i];
struct intel_output *intel_output;
+ /* Make sure we mark the output as off (and save the backlight)
+ * before the kernel turns it off due to changing the pipe.
+ * This is necessary as the kernel may turn off the backlight
+ * and we lose track of the user settings.
+ */
+ if (output->crtc == NULL)
+ output->funcs->dpms(output, DPMSModeOff);
+
if (output->crtc != crtc)
continue;
commit 52af321a11b5672194bc0bad033b0866221bf4c7
Author: Hans de Goede <hdegoede at redhat.com>
Date: Wed Jun 18 15:01:36 2014 +0200
uxa: When the output is off, report the cached backlight value
This is a "backport" of commit b545e10c50cb to uxa, so that users who are
still using uxa, don't end up with a black screen after suspend / resume.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1032978
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1103806
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index b90061b..e00b9c2 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -1257,9 +1257,13 @@ intel_output_get_property(xf86OutputPtr output, Atom property)
if (!intel_output->backlight.iface)
return FALSE;
- val = intel_output_backlight_get(output);
- if (val < 0)
- return FALSE;
+ if (intel_output->dpms_mode == DPMSModeOn) {
+ val = intel_output_backlight_get(output);
+ if (val < 0)
+ return FALSE;
+ } else {
+ val = intel_output->backlight_active_level;
+ }
err = RRChangeOutputProperty(output->randr_output, property,
XA_INTEGER, 32, PropModeReplace, 1, &val,
commit 44b5912ffcf8dcf4b4b8d3518dd0b62a284f6ee4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 18 14:48:33 2014 +0100
sna/gen8: Fix cleanup after failing to convert channel
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index 26a3579..7fd37c1 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -2306,7 +2306,7 @@ gen8_render_composite(struct sna *sna,
return true;
if (!gen8_composite_channel_convert(&tmp->src))
- goto cleanup_dst;
+ goto cleanup_src;
break;
}
@@ -2353,7 +2353,7 @@ gen8_render_composite(struct sna *sna,
/* fall through to fixup */
case 1:
if (!gen8_composite_channel_convert(&tmp->mask))
- goto cleanup_src;
+ goto cleanup_mask;
break;
}
}
@@ -2588,7 +2588,7 @@ gen8_render_composite_spans(struct sna *sna,
/* fall through to fixup */
case 1:
if (!gen8_composite_channel_convert(&tmp->base.src))
- goto cleanup_dst;
+ goto cleanup_src;
break;
}
tmp->base.mask.bo = NULL;
commit 21b6e551528fdd939004cfb02a4f192e750a33a1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 18 14:44:09 2014 +0100
sna/gen8: Fix unaligned() to return true when not aligned
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index 1bde3ad..26a3579 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -223,7 +223,7 @@ static bool unaligned(struct kgem_bo *bo, int bpp)
/* Assume that all tiled proxies are constructed correctly. */
if (bo->tiling)
- return true;
+ return false;
DBG(("%s: checking alignment of a linear proxy, offset=%d, pitch=%d, bpp=%d: => (%d, %d)\n",
__FUNCTION__, bo->delta, bo->pitch, bpp,
@@ -234,13 +234,13 @@ static bool unaligned(struct kgem_bo *bo, int bpp)
*/
y = bo->delta / bo->pitch;
if (y & 3)
- return false;
+ return true;
x = 8 * (bo->delta - y * bo->pitch);
if (x & (4*bpp - 1))
- return false;
+ return true;
- return true;
+ return false;
}
static uint32_t gen8_get_blend(int op,
commit c5b063b8cc23cc43be458cb3b0d1b28652a24951
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 18 14:34:04 2014 +0100
sna: Assert that we do not try to mmap a proxy
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 1c9c1f3..2806553 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4379,6 +4379,8 @@ static void __kgem_bo_make_scanout(struct kgem *kgem,
container_of(kgem, struct sna, kgem)->scrn;
struct drm_mode_fb_cmd arg;
+ assert(bo->proxy == NULL);
+
if (!scrn->vtSema)
return;
@@ -5822,6 +5824,7 @@ void *kgem_bo_map__gtt(struct kgem *kgem, struct kgem_bo *bo)
DBG(("%s: handle=%d, offset=%ld, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
bo->handle, (long)bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
+ assert(bo->proxy == NULL);
assert(bo->exec == NULL);
assert(list_is_empty(&bo->list));
assert_tiling(kgem, bo);
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 8ba7a9e..5152a3b 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -688,8 +688,9 @@ static inline void kgem_bo_mark_dirty(struct kgem_bo *bo)
static inline bool kgem_bo_mapped(struct kgem *kgem, struct kgem_bo *bo)
{
- DBG(("%s: map=%p:%p, tiling=%d, domain=%d\n",
- __FUNCTION__, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain));
+ DBG(("%s: handle=%d, map=%p:%p, tiling=%d, domain=%d\n",
+ __FUNCTION__, bo->handle, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain));
+ assert(bo->proxy == NULL);
if (bo->tiling == I915_TILING_NONE && (bo->domain == DOMAIN_CPU || kgem->has_llc))
return bo->map__cpu != NULL;
@@ -699,12 +700,14 @@ static inline bool kgem_bo_mapped(struct kgem *kgem, struct kgem_bo *bo)
static inline bool kgem_bo_can_map(struct kgem *kgem, struct kgem_bo *bo)
{
- DBG(("%s: map=%p:%p, tiling=%d, domain=%d, offset=%ld\n",
- __FUNCTION__, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain, (long)bo->presumed_offset));
+ DBG(("%s: handle=%d, map=%p:%p, tiling=%d, domain=%d, offset=%ld\n",
+ __FUNCTION__, bo->handle, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain, (long)bo->presumed_offset));
if (!bo->tiling && (kgem->has_llc || bo->domain == DOMAIN_CPU))
return true;
+ assert(bo->proxy == NULL);
+
if (bo->map__gtt != NULL)
return true;
More information about the xorg-commit
mailing list