From b22cadc04d569a6f3593fe32eaec3a3a0e21ef9b Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 11 Jun 2023 13:26:41 -0700 Subject: [PATCH] thneed: cleanup duplicate GPU config (#28487) Co-authored-by: Comma Device --- selfdrive/modeld/thneed/thneed_qcom2.cc | 26 ------------------------- 1 file changed, 26 deletions(-) diff --git a/selfdrive/modeld/thneed/thneed_qcom2.cc b/selfdrive/modeld/thneed/thneed_qcom2.cc index eda037178a..a3bfb8a8c2 100644 --- a/selfdrive/modeld/thneed/thneed_qcom2.cc +++ b/selfdrive/modeld/thneed/thneed_qcom2.cc @@ -238,24 +238,6 @@ void Thneed::execute(float **finputs, float *foutput, bool slow) { // ****** copy inputs copy_inputs(finputs, true); - // ****** set power constraint - int ret; - struct kgsl_device_constraint_pwrlevel pwrlevel; - pwrlevel.level = KGSL_CONSTRAINT_PWR_MAX; - - struct kgsl_device_constraint constraint; - constraint.type = KGSL_CONSTRAINT_PWRLEVEL; - constraint.context_id = context_id; - constraint.data = (void*)&pwrlevel; - constraint.size = sizeof(pwrlevel); - - struct kgsl_device_getproperty prop; - prop.type = KGSL_PROP_PWR_CONSTRAINT; - prop.value = (void*)&constraint; - prop.sizebytes = sizeof(constraint); - ret = ioctl(fd, IOCTL_KGSL_SETPROPERTY, &prop); - assert(ret == 0); - // ****** run commands int i = 0; for (auto &it : cmds) { @@ -268,14 +250,6 @@ void Thneed::execute(float **finputs, float *foutput, bool slow) { // ****** copy outputs copy_output(foutput); - // ****** unset power constraint - constraint.type = KGSL_CONSTRAINT_NONE; - constraint.data = NULL; - constraint.size = 0; - - ret = ioctl(fd, IOCTL_KGSL_SETPROPERTY, &prop); - assert(ret == 0); - if (debug >= 1) { te = nanos_since_boot(); printf("model exec in %lu us\n", (te-tb)/1000);