[Intel-gfx] [PATCH 07/12] Add intel_flush to abstract flushing pending acceleration operations
Keith Packard
keithp at keithp.com
Fri Jul 25 01:18:23 CEST 2014
intel_flush flushes any pending acceleration operations to the
hardware, just like intel_uxa_batch_submit does today except that it is
not uxa-specific.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
src/uxa/intel.h | 3 +++
src/uxa/intel_display.c | 11 +++--------
src/uxa/intel_driver.c | 14 +++++++++-----
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/uxa/intel.h b/src/uxa/intel.h
index ade8742..64f573b 100644
--- a/src/uxa/intel.h
+++ b/src/uxa/intel.h
@@ -535,4 +535,7 @@ intel_get_pixmap_bo(PixmapPtr pixmap);
void
intel_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo);
+void
+intel_flush(intel_screen_private *intel);
+
#endif /* _I830_H_ */
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index a4cbf00..add09b0 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -57,8 +57,6 @@
#include "fb.h"
#include "uxa.h"
-#include "intel_glamor.h"
-
#define KNOWN_MODE_FLAGS ((1<<14)-1)
struct intel_drm_queue {
@@ -437,8 +435,7 @@ intel_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
crtc->y = y;
crtc->rotation = rotation;
- intel_glamor_flush(intel);
- intel_batch_submit(crtc->scrn);
+ intel_flush(intel);
mode_to_kmode(crtc->scrn, &intel_crtc->kmode, mode);
ret = intel_crtc_apply(crtc);
@@ -1437,8 +1434,7 @@ intel_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (scrn->virtualX == width && scrn->virtualY == height)
return TRUE;
- intel_glamor_flush(intel);
- intel_batch_submit(scrn);
+ intel_flush(intel);
old_width = scrn->virtualX;
old_height = scrn->virtualY;
@@ -1552,8 +1548,7 @@ intel_do_pageflip(intel_screen_private *intel,
goto error_out;
drm_intel_bo_disable_reuse(new_front);
- intel_glamor_flush(intel);
- intel_batch_submit(scrn);
+ intel_flush(intel);
mode->pageflip_data = pageflip_data;
mode->pageflip_handler = pageflip_handler;
diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index d9f918b..a764b97 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -181,6 +181,12 @@ intel_get_pixmap_bo(PixmapPtr pixmap)
return intel_uxa_get_pixmap_bo(pixmap);
}
+void
+intel_flush(intel_screen_private *intel)
+{
+ intel_batch_submit(intel->scrn);
+}
+
static void PreInitCleanup(ScrnInfoPtr scrn)
{
if (!scrn || !scrn->driverPrivate)
@@ -647,7 +653,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
PixmapSyncDirtyHelper(dirty, &pixregion);
RegionUninit(&pixregion);
- intel_batch_submit(scrn);
+ intel_flush(intel);
if (!intel->has_prime_vmap_flush) {
drm_intel_bo *bo = intel_uxa_get_pixmap_bo(dirty->slave_dst->master_pixmap);
was_blocked = xf86BlockSIGIO();
@@ -732,10 +738,8 @@ intel_flush_callback(CallbackListPtr *list,
pointer user_data, pointer call_data)
{
ScrnInfoPtr scrn = user_data;
- if (scrn->vtSema) {
- intel_batch_submit(scrn);
- intel_glamor_flush(intel_get_screen_private(scrn));
- }
+ if (scrn->vtSema)
+ intel_flush(intel_get_screen_private(scrn));
}
#if HAVE_UDEV
--
2.0.1
More information about the Intel-gfx
mailing list