drm-engine/intel_batchbuffer.c
/* TODO: Push this whole function into manager.
 */
Push this whole function into manager.
Push this whole function into manager .
static int
do_flush_locked(struct _DrmDriver *driver)
{
    struct intel_batchbuffer *batch = &driver->batch;
    int ret = 0;
    ret = drm_intel_bo_subdata(batch->bo, 0, 4 * batch->used, batch->map);
#if 0
    if (!driver->intelScreen->no_hw) {
        if (ret == 0) {
            if (unlikely(INTEL_DEBUG & DEBUG_AUB) && driver->vtbl.annotate_aub)
                driver->vtbl.annotate_aub(driver);
            ret = drm_intel_bo_mrb_exec(batch->bo, 4 * batch->used, NULL, 0, 0,
                    I915_EXEC_RENDER);
        }
    }
#else
    if (ret == 0) {
        ret = drm_intel_bo_mrb_exec(batch->bo, 4 * batch->used, NULL, 0, 0,
                I915_EXEC_BLT);
    }
    else {
        _ERR_PRINTF("drm_intel_bo_subdata failed: %s\n", strerror(-ret));
    }
#endif
#if 0
    if (unlikely(INTEL_DEBUG & DEBUG_BATCH))
        do_batch_dump(driver);
#endif
    if (ret != 0) {
        _ERR_PRINTF("intel_do_flush_locked failed(%p): %s\n",
                batch->bo, strerror(-ret));
        assert(0);
    }
    i915_new_batch(driver);
    return ret;
}
static int do_flush_locked ( struct _DrmDriver * driver ) { struct intel_batchbuffer * batch = & driver -> batch ; int ret = 0 ; ret = drm_intel_bo_subdata ( batch -> bo , 0 , 4 * batch -> used , batch -> map ) ; #if 0 if ( ! driver -> intelScreen -> no_hw ) { if ( ret == 0 ) { if ( unlikely ( INTEL_DEBUG & DEBUG_AUB ) && driver -> vtbl . annotate_aub ) driver -> vtbl . annotate_aub ( driver ) ; ret = drm_intel_bo_mrb_exec ( batch -> bo , 4 * batch -> used , NULL , 0 , 0 , I915_EXEC_RENDER ) ; } } #else if ( ret == 0 ) { ret = drm_intel_bo_mrb_exec ( batch -> bo , 4 * batch -> used , NULL , 0 , 0 , I915_EXEC_BLT ) ; } else { _ERR_PRINTF ( " \n " , strerror ( - ret ) ) ; } #endif #if 0 if ( unlikely ( INTEL_DEBUG & DEBUG_BATCH ) ) do_batch_dump ( driver ) ; #endif if ( ret != 0 ) { _ERR_PRINTF ( " \n " , batch -> bo , strerror ( - ret ) ) ; assert ( 0 ) ; } i915_new_batch ( driver ) ; return ret ; }
TODO: Push this whole function into manager.
TODO : Push this whole function into manager .