xf86-video-intel: 2 commits - src/intel_display.c src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jul 4 02:15:02 PDT 2012
src/intel_display.c | 28 +++++++++++++---------------
src/sna/kgem.c | 5 ++---
2 files changed, 15 insertions(+), 18 deletions(-)
New commits:
commit 5026b6a147f411582af24ffd17c87a81da5eea0b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jul 4 09:39:59 2012 +0100
uxa: Install the drm_wakeup_handler for vblank events in !use_page_flipping
Even if page-flipping itself is disabled, we still want to allow the
client to schedule wakeups for some future vblank which requires
listening to the kernel vblank notifications.
Reported-by: Eric Anholt <eric at anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51699
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/intel_display.c b/src/intel_display.c
index 2e2a9b1..a974e34 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -1646,6 +1646,10 @@ Bool intel_mode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
xf86InitialConfiguration(scrn, TRUE);
+ mode->event_context.version = DRM_EVENT_CONTEXT_VERSION;
+ mode->event_context.vblank_handler = intel_vblank_handler;
+ mode->event_context.page_flip_handler = intel_page_flip_handler;
+
has_flipping = 0;
gp.param = I915_PARAM_HAS_PAGEFLIPPING;
gp.value = &has_flipping;
@@ -1655,10 +1659,6 @@ Bool intel_mode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Kernel page flipping support detected, enabling\n");
intel->use_pageflipping = TRUE;
-
- mode->event_context.version = DRM_EVENT_CONTEXT_VERSION;
- mode->event_context.vblank_handler = intel_vblank_handler;
- mode->event_context.page_flip_handler = intel_page_flip_handler;
}
intel->modes = mode;
@@ -1668,18 +1668,16 @@ Bool intel_mode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
void
intel_mode_init(struct intel_screen_private *intel)
{
- if (intel->use_pageflipping) {
- struct intel_mode *mode = intel->modes;
+ struct intel_mode *mode = intel->modes;
- /* We need to re-register the mode->fd for the synchronisation
- * feedback on every server generation, so perform the
- * registration within ScreenInit and not PreInit.
- */
- mode->flip_count = 0;
- AddGeneralSocket(mode->fd);
- RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
- drm_wakeup_handler, mode);
- }
+ /* We need to re-register the mode->fd for the synchronisation
+ * feedback on every server generation, so perform the
+ * registration within ScreenInit and not PreInit.
+ */
+ mode->flip_count = 0;
+ AddGeneralSocket(mode->fd);
+ RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
+ drm_wakeup_handler, mode);
}
void
commit 79309dd55f20098e12ead5427c811f237d5592fa
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jul 3 22:27:39 2012 +0100
sna: check for failure to change cache level on the bo
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index fceb5d2..944b8f2 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3052,10 +3052,9 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem,
if (bo == NULL)
return NULL;
- gem_set_cache_level(kgem->fd, bo->handle, I915_CACHE_LLC);
bo->reusable = false;
-
- if (kgem_bo_map__cpu(kgem, bo) == NULL) {
+ if (!gem_set_cache_level(kgem->fd, bo->handle, I915_CACHE_LLC) ||
+ kgem_bo_map__cpu(kgem, bo) == NULL) {
kgem_bo_destroy(kgem, bo);
return NULL;
}
More information about the xorg-commit
mailing list