xf86-video-intel: 2 commits - src/sna/sna_display.c src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jul 22 03:36:10 PDT 2015
src/sna/sna_display.c | 8 ++++----
src/sna/sna_dri2.c | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
New commits:
commit a29e765ec0c1d73ee7ef2dad3aa148214ec04335
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jul 22 11:34:51 2015 +0100
sna: Fix the last character before a colon in the fake-edid paths
I chopped off one too many characters when creating the path in the
presence of a colon-delimited list.
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 e1264db..d141b4c 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4333,14 +4333,14 @@ static char *fake_edid_name(xf86OutputPtr output)
if (colon)
len = colon - str;
else
- len = strlen(str) + 1;
+ len = strlen(str);
- path = malloc(len);
+ path = malloc(len + 1);
if (path == NULL)
return NULL;
- memcpy(path, str, len - 1);
- path[len-1] = '\0';
+ memcpy(path, str, len);
+ path[len] = '\0';
return path;
}
commit 8d9e496670f48b4eec64dfe1bcedb49793cf3073
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jul 22 11:14:01 2015 +0100
sna/dri2: Take over the placeholder vblank
If we are doing synchronous but immediate swaps, we may notice that we
have a vblank placeholder from the last swap. If so, we can replace it
with the swap we need to perform on the next vblank.
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 13714fb..ba4bcf9 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2481,6 +2481,7 @@ static bool sna_dri2_blit_complete(struct sna *sna,
}
DBG(("%s: blit finished\n", __FUNCTION__));
+ info->bo = NULL;
return true;
}
@@ -2659,6 +2660,25 @@ sna_dri2_immediate_blit(struct sna *sna,
return;
}
+ /* Takeover the placeholder vblank */
+ if (chain->type == SWAP_ALIVE) {
+ assert(chain->draw == info->draw);
+ assert(chain->bo == NULL);
+ assert(chain->queued);
+
+ _sna_dri2_destroy_buffer(chain->sna, chain->draw, chain->front);
+ _sna_dri2_destroy_buffer(chain->sna, chain->draw, chain->back);
+
+ _list_del(&info->link);
+ info->link = chain->link;
+
+ *chain = *info;
+ chain->queued = true;
+
+ free(info);
+ return;
+ }
+
if (get_private(info->back)->copy.bo != get_private(info->back)->bo) {
DBG(("%s: adding active marker [%d] to handle=%d, removing [%d] from handle=%d\n",
__FUNCTION__,
More information about the xorg-commit
mailing list