diff options
author | Luo Xionghu <xionghu.luo@intel.com> | 2015-06-29 15:22:18 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-06-30 14:25:16 +0800 |
commit | 9496f744b51976bc6ba1a47d093454df69b739a9 (patch) | |
tree | 2425ab60274d4ecc661f7c63753faf6395540198 /src/intel/intel_driver.c | |
parent | e03643bd7247e11788bf257aa75bff49227e9806 (diff) |
use self test to determine enable/or disable atomics in L3 for HSW.
check the selftest kernel return value, if enqueue kernel failed,
set the flag to not enable atomics the L3 for HSW.
This reverts commit 83f8739b6fc4893fac60145326052ccb5cf653dc.
v2: don't use global variable to pass value from runtime to driver.
v3: add type SELF_TEST_OTHER_FAIL to differentiate from SELF_TEST_ATOMIC_FAIL;
seperate the ATOMIC_FAIL from SLM_FAIL, only SLM_FAIL can be control by
env OCL_IGNORE_SELF_TEST.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Yang, Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/intel/intel_driver.c')
-rw-r--r-- | src/intel/intel_driver.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c index 1bebd9a3..9c727774 100644 --- a/src/intel/intel_driver.c +++ b/src/intel/intel_driver.c @@ -448,6 +448,12 @@ intel_driver_get_ver(struct intel_driver *drv) return drv->gen_ver; } +static void +intel_driver_set_atomic_flag(intel_driver_t *drv, int atomic_flag) +{ + drv->atomic_test_result = atomic_flag; +} + static size_t drm_intel_bo_get_size(drm_intel_bo *bo) { return bo->size; } static void* drm_intel_bo_get_virtual(drm_intel_bo *bo) { return bo->virtual; } @@ -834,6 +840,7 @@ intel_setup_callbacks(void) cl_driver_new = (cl_driver_new_cb *) cl_intel_driver_new; cl_driver_delete = (cl_driver_delete_cb *) cl_intel_driver_delete; cl_driver_get_ver = (cl_driver_get_ver_cb *) intel_driver_get_ver; + cl_driver_set_atomic_flag = (cl_driver_set_atomic_flag_cb *) intel_driver_set_atomic_flag; cl_driver_get_bufmgr = (cl_driver_get_bufmgr_cb *) intel_driver_get_bufmgr; cl_driver_get_device_id = (cl_driver_get_device_id_cb *) intel_get_device_id; cl_driver_update_device_info = (cl_driver_update_device_info_cb *) intel_update_device_info; |