xf86-video-intel: 2 commits - src/intel_options.c src/intel_options.h src/sna/sna_dri.c src/sna/sna_driver.c src/sna/sna.h
Chris Wilson
ickle at kemper.freedesktop.org
Sat Dec 15 01:33:33 PST 2012
src/intel_options.c | 2 +-
src/intel_options.h | 2 +-
src/sna/sna.h | 1 +
src/sna/sna_dri.c | 11 ++---------
src/sna/sna_driver.c | 2 ++
5 files changed, 7 insertions(+), 11 deletions(-)
New commits:
commit b0f8c823b6cafdfdd064c09d58174f946e290541
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Dec 15 09:28:04 2012 +0000
sna/dri: Fallback to a blit after a failed flip
...rather than force the exchange.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 522549a..fc84e94 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1798,15 +1798,8 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
sna_dri_page_flip(sna, info);
if (info->count == 0) {
- info->back->name = info->old_front.name;
- get_private(info->back)->bo = info->old_front.bo;
- info->old_front.bo = NULL;
-
- DRI2SwapComplete(info->client, draw, 0, 0, 0,
- DRI2_EXCHANGE_COMPLETE,
- info->event_complete,
- info->event_data);
sna_dri_frame_event_info_free(sna, draw, info);
+ return false;
} else if (info->type != DRI2_FLIP) {
get_private(info->back)->bo =
kgem_create_2d(&sna->kgem,
commit 2c71a8e08abce74b269687d3a6c1edd7f9d643d3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Dec 15 09:27:07 2012 +0000
sna/dri: Honour TripleBuffer Option
In case anyone ever wants to disable the default.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/intel_options.c b/src/intel_options.c
index 443e84d..f7ff595 100644
--- a/src/intel_options.c
+++ b/src/intel_options.c
@@ -14,6 +14,7 @@ const OptionInfoRec intel_options[] = {
{OPTION_TILING_2D, "Tiling", OPTV_BOOLEAN, {0}, 1},
{OPTION_TILING_FB, "LinearFramebuffer", OPTV_BOOLEAN, {0}, 0},
{OPTION_SWAPBUFFERS_WAIT, "SwapbuffersWait", OPTV_BOOLEAN, {0}, 1},
+ {OPTION_TRIPLE_BUFFER, "TripleBuffer", OPTV_BOOLEAN, {0}, 1},
{OPTION_PREFER_OVERLAY, "XvPreferOverlay", OPTV_BOOLEAN, {0}, 0},
{OPTION_HOTPLUG, "HotPlug", OPTV_BOOLEAN, {0}, 1},
{OPTION_RELAXED_FENCING,"RelaxedFencing", OPTV_BOOLEAN, {0}, 1},
@@ -33,7 +34,6 @@ const OptionInfoRec intel_options[] = {
{OPTION_DEBUG_FLUSH_CACHES, "DebugFlushCaches", OPTV_BOOLEAN, {0}, 0},
{OPTION_DEBUG_WAIT, "DebugWait", OPTV_BOOLEAN, {0}, 0},
{OPTION_BUFFER_CACHE, "BufferCache", OPTV_BOOLEAN, {0}, 1},
- {OPTION_TRIPLE_BUFFER, "TripleBuffer", OPTV_BOOLEAN, {0}, 1},
#endif
{-1, NULL, OPTV_NONE, {0}, 0}
};
diff --git a/src/intel_options.h b/src/intel_options.h
index 3b5262a..953fc9c 100644
--- a/src/intel_options.h
+++ b/src/intel_options.h
@@ -20,6 +20,7 @@ enum intel_options {
OPTION_TILING_2D,
OPTION_TILING_FB,
OPTION_SWAPBUFFERS_WAIT,
+ OPTION_TRIPLE_BUFFER,
OPTION_PREFER_OVERLAY,
OPTION_HOTPLUG,
OPTION_RELAXED_FENCING,
@@ -40,7 +41,6 @@ enum intel_options {
OPTION_DEBUG_FLUSH_CACHES,
OPTION_DEBUG_WAIT,
OPTION_BUFFER_CACHE,
- OPTION_TRIPLE_BUFFER,
#endif
NUM_OPTIONS,
};
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 9b93ed9..8861fd9 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -200,6 +200,7 @@ struct sna {
#define SNA_NO_FLIP 0x8
#define SNA_TEAR_FREE 0x10
#define SNA_FORCE_SHADOW 0x20
+#define SNA_TRIPLE_BUFFER 0x40
unsigned watch_flush;
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index c05e8b4..522549a 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1769,7 +1769,7 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
if (info == NULL)
return false;
- info->type = DRI2_FLIP_THROTTLE;
+ info->type = sna->flags & SNA_TRIPLE_BUFFER ? DRI2_FLIP_THROTTLE: DRI2_FLIP;
info->draw = draw;
info->client = client;
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index fc80cf3..22770c7 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -504,6 +504,8 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
sna->flags |= SNA_NO_DELAYED_FLUSH;
if (!xf86ReturnOptValBool(sna->Options, OPTION_SWAPBUFFERS_WAIT, TRUE))
sna->flags |= SNA_NO_WAIT;
+ if (xf86ReturnOptValBool(sna->Options, OPTION_TRIPLE_BUFFER, TRUE))
+ sna->flags |= SNA_TRIPLE_BUFFER;
if (has_pageflipping(sna)) {
if (xf86ReturnOptValBool(sna->Options, OPTION_TEAR_FREE, FALSE))
sna->flags |= SNA_TEAR_FREE;
More information about the xorg-commit
mailing list