mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
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
This commit is contained in:
3
phonelibs/opencl/include/CL/cl_ext_qcom.h
Normal file
3
phonelibs/opencl/include/CL/cl_ext_qcom.h
Normal file
@@ -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();
|
||||
}
|
||||
|
||||
#if defined(QCOM) || defined(QCOM2)
|
||||
#include "CL/cl_ext_qcom.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
set_realtime_priority(51);
|
||||
#if defined(QCOM)
|
||||
@@ -331,7 +335,13 @@ int main(int argc, char *argv[]) {
|
||||
signal(SIGTERM, (sighandler_t)set_do_exit);
|
||||
|
||||
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));
|
||||
#endif
|
||||
|
||||
party(device_id, context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user