Comment 12 for bug 1981087

Revision history for this message
koba (kobako) wrote :

@Chris, it's not easy to use one line of code but not too hard to implement.
Must clean up the existed table if the original policy is passive policy 2.
Then parse&install pp1 on thermald.
I thought it's better to follow the upstream code architecture.
~~~
#here's code sniplet of 82609c7
+void cthd_engine_adaptive::install_passive_default() {
+ if (passive_installed)
+ return;
+
+ thd_log_info("IETM_D0 processed\n");
+
+ for (unsigned int i = 0; i < zones.size(); ++i) {
+ cthd_zone *_zone = zones[i];
+ _zone->zone_reset(1);
+ _zone->trip_delete_all();
+
+ if (_zone->zone_active_status())
+ _zone->set_zone_inactive();
+ }
+
+ struct psvt *psvt = gddv.find_def_psvt();
+ if (!psvt)
+ return;
+
+ std::vector<struct psv> psvs = psvt->psvs;
+
+ thd_log_info("Name :%s\n", psvt->name.c_str());
+ for (unsigned int j = 0; j < psvs.size(); ++j) {
+ install_passive(&psvs[j]);
+ }
+
+ psvt_consolidate();
+ thd_log_info("\n\n ZONE DUMP BEGIN\n");
+ for (unsigned int i = 0; i < zones.size(); ++i) {
+ zones[i]->zone_dump();
+ }
+ thd_log_info("\n\n ZONE DUMP END\n");
+ passive_installed = 1;
+}
+
~~~

I have did the way you said, the one is affected and the one is not affected.
e.g. TGL and ADL platform.