Set camerad CL priority to 4 (#2747)

* priority 2 get

* add to files_common

* cl_ext_qcom

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: cb238fd2ee
commatwo_master
George Hotz 4 years ago committed by GitHub
parent 33bc5e5f79
commit 2cedc8715e
  1. 3
      phonelibs/opencl/include/CL/cl_ext_qcom.h
  2. 10
      selfdrive/camerad/main.cc

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:11c26633f533f14f5ffac1cc227932e251d6ad86fcac4c7f4e217f046a6e35c5
size 9331

@ -319,6 +319,10 @@ void party(cl_device_id device_id, cl_context context) {
server_thread.join(); server_thread.join();
} }
#if defined(QCOM) || defined(QCOM2)
#include "CL/cl_ext_qcom.h"
#endif
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
set_realtime_priority(51); set_realtime_priority(51);
#if defined(QCOM) #if defined(QCOM)
@ -331,7 +335,13 @@ int main(int argc, char *argv[]) {
signal(SIGTERM, (sighandler_t)set_do_exit); signal(SIGTERM, (sighandler_t)set_do_exit);
cl_device_id device_id = cl_get_device_id(CL_DEVICE_TYPE_DEFAULT); cl_device_id device_id = cl_get_device_id(CL_DEVICE_TYPE_DEFAULT);
#if defined(QCOM) || defined(QCOM2)
const cl_context_properties props[] = {CL_CONTEXT_PRIORITY_HINT_QCOM, CL_PRIORITY_HINT_HIGH_QCOM, 0};
cl_context context = CL_CHECK_ERR(clCreateContext(props, 1, &device_id, NULL, NULL, &err));
#else
cl_context context = CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, NULL, NULL, &err)); cl_context context = CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, NULL, NULL, &err));
#endif
party(device_id, context); party(device_id, context);

Loading…
Cancel
Save