diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-04 09:50:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-06 12:51:23 +0100 |
commit | 450592f989efd0d3bc9ef2de245fce0a180e91a2 (patch) | |
tree | 45c3fa3a9edff9cfd352d971de00e704a0b1081a /src/sna/sna_dri.c | |
parent | 29d035279b2fe98d5ba9cf01125faea34d36fb76 (diff) |
sna: Cache the framebuffer id
Also fixup a weakness of only tracking scanout with a single bit, as we
used to clear it forcibly after every flip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri.c')
-rw-r--r-- | src/sna/sna_dri.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index d5eefcbd..32602d56 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -336,7 +336,6 @@ static void _sna_dri_destroy_buffer(struct sna *sna, DRI2Buffer2Ptr buffer) } private->bo->flush = 0; - kgem_bo_clear_scanout(&sna->kgem, private->bo); /* paranoia */ kgem_bo_destroy(&sna->kgem, private->bo); free(buffer); @@ -392,7 +391,6 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo) sna_damage_destroy(&priv->cpu_damage); priv->undamaged = false; - kgem_bo_clear_scanout(&sna->kgem, priv->gpu_bo); /* paranoia */ kgem_bo_destroy(&sna->kgem, priv->gpu_bo); priv->gpu_bo = ref(bo); } @@ -860,18 +858,10 @@ sna_dri_add_frame_event(struct sna_dri_frame_event *info) static void sna_dri_frame_event_release_bo(struct kgem *kgem, struct kgem_bo *bo) { - kgem_bo_clear_scanout(kgem, bo); kgem_bo_destroy(kgem, bo); } static void -sna_dri_frame_event_finish(struct sna_dri_frame_event *info) -{ - sna_mode_delete_fb(info->sna, info->old_fb); - kgem_bo_clear_scanout(&info->sna->kgem, info->old_front.bo); -} - -static void sna_dri_frame_event_info_free(struct sna_dri_frame_event *info) { DBG(("%s: del[%p] (%p, %ld)\n", __FUNCTION__, @@ -1177,13 +1167,10 @@ static void sna_dri_flip_event(struct sna *sna, flip->event_data); } - sna_dri_frame_event_finish(flip); sna_dri_frame_event_info_free(flip); break; case DRI2_FLIP_THROTTLE: - sna_dri_frame_event_finish(flip); - assert(sna->dri.flip_pending[flip->pipe] == flip); sna->dri.flip_pending[flip->pipe] = NULL; @@ -1221,8 +1208,6 @@ static void sna_dri_flip_event(struct sna *sna, flip->front->name != flip->old_front.name)); assert(sna->dri.flip_pending[flip->pipe] == flip); - sna_dri_frame_event_finish(flip); - if (flip->front->name != flip->next_front.name) { DBG(("%s: async flip continuing\n", __FUNCTION__)); @@ -1801,7 +1786,6 @@ blit: } info->front->name = info->back->name; get_private(info->front)->bo = get_private(info->back)->bo; - __kgem_flush(&sna->kgem, get_private(info->back)->bo); } if (bo == NULL) { |