xf86-video-intel: 3 commits - configure.ac src/sna/sna_display.c src/sna/sna_dri2.c tools/Makefile.am
Chris Wilson
ickle at kemper.freedesktop.org
Wed May 14 09:52:55 PDT 2014
configure.ac | 58 +++++++++++++++++++++++++++++++++++---------------
src/sna/sna_display.c | 8 ++++++
src/sna/sna_dri2.c | 55 ++++++++++++++++++-----------------------------
tools/Makefile.am | 4 +--
4 files changed, 72 insertions(+), 53 deletions(-)
New commits:
commit 0625185f4772f1c7f8e8d7f265432fd77cdd27fc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed May 14 12:40:18 2014 +0100
intel-virtual-output: Make it possible to disable building via configure
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/configure.ac b/configure.ac
index fa6439e..99d383a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,16 +196,23 @@ fi
PKG_CHECK_MODULES(X11, [x11 xrender xrandr xext xfixes pixman-1], [x11="yes"], [x11="no"])
AM_CONDITIONAL(HAVE_X11, test "x$x11" = "xyes")
-PKG_CHECK_MODULES(TOOL, [xinerama xrandr xdamage xfixes xcursor xtst xrender xext x11 pixman-1], [tools="yes"], [tools="no"])
-
-if test "x$tools" = "xyes"; then
- AC_CHECK_HEADER([sys/ipc.h], [], [tools=no])
- AC_CHECK_HEADER([sys/shm.h], [], [tools=no])
- AC_CHECK_HEADER([sys/timerfd.h], [], [tools=no])
+shm=yes
+AC_CHECK_HEADERS([sys/ipc.h sys/ipc.h], [], [shm="no"])
+AC_CHECK_HEADERS([X11/extensions/XShm.h], [], [shm="no"], [
+#include <X11/Xlibint.h>
+#include <X11/Xproto.h>
+])
+AC_CHECK_HEADERS([X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [], [
+#include <X11/Xlibint.h>
+#include <X11/Xproto.h>
+])
+if test "x$ac_cv_header_X11_extensions_shmproto_h" != "xyes" -a "x$ac_cv_header_X11_extensions_shmstr_h" != "xyes"; then
+ shm="no"
+fi
- if test "$ac_cv_header_sys_ipc_h" = "yes" -a "$ac_cv_header_sys_shm_h" = "yes"; then
- AC_MSG_CHECKING(whether shmctl IPC_RMID allows subsequent attaches)
- AC_TRY_RUN([
+if test "x$shm" = "xyes"; then
+ AC_MSG_CHECKING(whether shmctl IPC_RMID allows subsequent attaches)
+ AC_TRY_RUN([
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -230,18 +237,35 @@ if test "x$tools" = "xyes"; then
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no),
AC_MSG_RESULT(assuming no))
- fi
-
- AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [tools=no],
- [#include <X11/Xlibint.h>
- #include <X11/Xproto.h>])
fi
-if test "x$tools" = "xyes"; then
+AC_ARG_ENABLE(tools,
+ AS_HELP_STRING([--disable-tools],
+ [Enable building and installing the miscellaneous tools [default=auto]]),
+ [tools="$enableval"], [tools="auto"])
+if test "x$shm" != "xyes"; then
+ if test "x$tools" = "xyes"; then
+ AC_MSG_ERROR([Incomplete requirements for extra tools, X11 MIT-SHM extension required])
+ fi
+ tools="no"
+fi
+if test "x$tools" != "xno"; then
+ ivo_requires="xinerama xrandr xdamage xfixes xcursor xtst xrender xext x11 pixman-1"
+ PKG_CHECK_MODULES(IVO, [$ivo_requires], [ivo="yes"], [ivo="no"])
+ AC_CHECK_HEADER([sys/timerfd.h], [], [ivo="no"])
+ if test "x$ivo" = "xno"; then
+ if test "x$tools" = "xyes"; then
+ AC_MSG_ERROR([Incomplete requirements for intel-virtual-output, requires $ivo_requires])
+ fi
+ tools="no"
+ fi
+fi
+if test "x$tools" != "xno"; then
tools_msg="$tools_msg intel-virtual-output"
fi
-
-AM_CONDITIONAL(BUILD_TOOLS, test "x$tools" = "xyes")
+AC_MSG_CHECKING([whether to build additional tools])
+AC_MSG_RESULT([$tools])
+AM_CONDITIONAL(BUILD_TOOLS, test "x$tools" != "xno")
# Define a configure option for an alternate module directory
AC_ARG_WITH(xorg-module-dir,
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 876e1b0..b5de2c9 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -42,14 +42,14 @@ endif
intel_virtual_output_CFLAGS = \
@CWARNFLAGS@ \
- $(TOOL_CFLAGS) \
+ $(IVO_CFLAGS) \
@NOWARNFLAGS@ \
$(NULL)
intel_virtual_output_SOURCES = \
virtual.c \
$(NULL)
intel_virtual_output_LDADD = \
- $(TOOL_LIBS) \
+ $(IVO_LIBS) \
$(NULL)
xf86_video_intel_backlight_helper_SOURCES = \
commit c179003b10845b43a7a8958a99b1bf1c6617252c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed May 14 16:15:24 2014 +0100
sna/dri2: Ensure new immediate blits are queued behind outstanding swaps
OML_sync_control:
If there are multiple outstanding swaps for the same window, at most
one such swap can be satisfied per increment of MSC. The order of
satisfying outstanding swaps of a window must be the order they were
issued.
The only challenge is to keep both this behaviour and vblank_mode=0
benchmarking.
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 776a7fe..6c7f84a 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1542,20 +1542,19 @@ sna_dri2_immediate_blit(struct sna *sna,
__FUNCTION__, sync, sna_dri2_window_get_chain((WindowPtr)draw) != info,
event));
- if (sync) {
- if (sna_dri2_window_get_chain((WindowPtr)draw) == info) {
- DBG(("%s: no pending blit, starting chain\n",
- __FUNCTION__));
+ info->type = SWAP_THROTTLE;
+ if (sna_dri2_window_get_chain((WindowPtr)draw) == info) {
+ DBG(("%s: no pending blit, starting chain\n",
+ __FUNCTION__));
- info->bo = __sna_dri2_copy_region(sna, draw, NULL,
- info->back,
- info->front,
- true);
- if (event) {
+ info->bo = __sna_dri2_copy_region(sna, draw, NULL,
+ info->back,
+ info->front,
+ sync);
+ if (event) {
+ if (sync) {
drmVBlank vbl;
- info->type = SWAP_THROTTLE;
-
VG_CLEAR(vbl);
vbl.request.type =
DRM_VBLANK_RELATIVE |
@@ -1569,29 +1568,18 @@ sna_dri2_immediate_blit(struct sna *sna,
DRI2SwapLimit(draw, 2);
}
#endif
- if (!XORG_CAN_TRIPLE_BUFFER || !ret) {
- DBG(("%s: fake triple bufferring, unblocking client\n", __FUNCTION__));
- fake_swap_complete(sna, info->client, draw,
- DRI2_BLIT_COMPLETE,
- info->event_complete,
- info->event_data);
- }
}
- } else {
- DBG(("%s: pending blit, chained\n", __FUNCTION__));
- ret = true;
+ if (!XORG_CAN_TRIPLE_BUFFER || !ret) {
+ DBG(("%s: fake triple bufferring, unblocking client\n", __FUNCTION__));
+ fake_swap_complete(sna, info->client, draw,
+ DRI2_BLIT_COMPLETE,
+ info->event_complete,
+ info->event_data);
+ }
}
} else {
- DBG(("%s: immediate blit\n", __FUNCTION__));
- info->bo = __sna_dri2_copy_region(sna, draw, NULL,
- info->back, info->front, false);
- if (event) {
- DBG(("%s: unblocking client\n", __FUNCTION__));
- fake_swap_complete(sna, info->client, draw,
- DRI2_BLIT_COMPLETE,
- info->event_complete,
- info->event_data);
- }
+ DBG(("%s: pending blit, chained\n", __FUNCTION__));
+ ret = true;
}
DBG(("%s: continue? %d\n", __FUNCTION__, ret));
@@ -1990,7 +1978,7 @@ static bool immediate_swap(struct sna *sna,
if (target_msc)
*current_msc = get_current_msc(sna, pipe);
- DBG(("%s: current_msc=%ld, target_msc=%ld -- %\n",
+ DBG(("%s: current_msc=%ld, target_msc=%ld -- %s\n",
__FUNCTION__, (long)*current_msc, (long)target_msc,
(*current_msc >= target_msc - 1) ? "yes" : "no"));
return *current_msc >= target_msc - 1;
@@ -2218,7 +2206,6 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
drmVBlank vbl;
int pipe;
struct sna_dri2_frame_event *info = NULL;
- enum frame_event_type swap_type = SWAP;
CARD64 current_msc;
DBG(("%s: pixmap=%ld, back=%u (refs=%d/%d, flush=%d) , fron=%u (refs=%d/%d, flush=%d)\n",
@@ -2293,7 +2280,7 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
sna_dri2_reference_buffer(front);
sna_dri2_reference_buffer(back);
- info->type = swap_type;
+ info->type = SWAP;
if (immediate_swap(sna, *target_msc, divisor, pipe, ¤t_msc)) {
bool sync = current_msc < *target_msc;
commit 84d0790453089be5d1034037065df1ea37ad48fe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed May 14 11:37:51 2014 +0100
sna: After disabling the TearFree shadow, flush any pending flips
If we complete a flip after resizing and recreating the TearFree shadow,
we may process the flip completion events whilst the output is only
partially reconfigured.
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 5ac46f5..20b2f8e 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3240,6 +3240,14 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
scrn->virtualY = height;
scrn->displayWidth = width;
+ /* Flush pending shadow updates */
+ if (sna->mode.shadow_flip) {
+ DBG(("%s: waiting for %d outstanding TearFree flips\n",
+ __FUNCTION__, sna->mode.shadow_flip));
+ while (sna->mode.shadow_flip && sna_mode_wait_for_event(sna))
+ sna_mode_wakeup(sna);
+ }
+
/* Only update the CRTCs if we are in control */
if (!scrn->vtSema)
return TRUE;
More information about the xorg-commit
mailing list