adaptive: Stop mapping SwOem conditions to ODVP variables#582
Open
RevySR wants to merge 1 commit into
Open
Conversation
Contributor
|
Have you seen any issue on any platform? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines adaptive condition handling so that Intel DPTF software-OEM (SwOem) condition IDs are no longer misclassified as ODVP firmware-exported variables, avoiding repeated sysfs read errors for non-existent odvp* entries.
Changes:
- Introduces named constants for DPTF adaptive condition ID ranges (OEM / SwOem / participant).
- Restricts ODVP mapping to
[0x1000, 0x2000)and flags[0x2000, 0x10000)SwOem conditions as unsupported during verification. - Prevents runtime evaluation from attempting to read
odvp*sysfs files for SwOem condition IDs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/thd_gddv.h |
Adds documented ID-range constants used to classify adaptive condition IDs. |
src/thd_gddv.cpp |
Updates condition verification and ODVP evaluation gating to exclude SwOem IDs from ODVP handling and report them unsupported. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1386
to
+1394
| if (condition.condition >= adaptive_condition(SW_OEM_CONDITION_BASE_ID) | ||
| && condition.condition < adaptive_condition(PARTICIPANT_CONDITION_BASE_ID)) { | ||
| thd_log_info( | ||
| "Unsupported software-OEM condition %" PRIu64 | ||
| " (SwOem%" PRIu64 "); set by OEM software via DPTF, not available on Linux\n", | ||
| condition.condition, | ||
| condition.condition - SW_OEM_CONDITION_BASE_ID); | ||
| return THD_ERROR; | ||
| } |
Author
ThinkBook 14 G8+ IPH |
Contributor
|
Please check copilot review comment. |
Per Intel DPTF ConditionType.h, condition ids in [0x2000, 0x10000) are software-OEM conditions set at runtime by OEM software via DPTF/ESIF; they have no equivalent on Linux. thermald instead lumped the whole [0x1000, 0x10000) range into ODVP and mapped e.g. 0x200D to a non-existent odvp4115, logging "Unable to read odvp4115" every poll. Restrict the ODVP mapping to [0x1000, 0x2000). SwOem conditions are still recognized by verify_condition() so engine startup behavior is unchanged (failing verify_conditions() would enter the unsupported condition fallback and stop evaluating conditions at poll time), but they are no longer evaluated via ODVP: the containing condition set quietly never matches, exactly as before when the odvpN read failed, just without the per-poll error spam. A one-time info message is logged at startup instead. No functional change - such sets were never satisfiable on Linux. Signed-off-by: Han Gao <rabenda.cn@gmail.com>
RevySR
force-pushed
the
adaptive-swoem-unsupported
branch
from
July 17, 2026 07:52
dba0748 to
836648d
Compare
Author
done. |
Comment on lines
+114
to
+116
| #define OEM_CONDITION_BASE_ID 0x1000 | ||
| #define SW_OEM_CONDITION_BASE_ID 0x2000 | ||
| #define PARTICIPANT_CONDITION_BASE_ID 0x10000 |
Comment on lines
+1396
to
+1404
| if (condition.condition >= adaptive_condition(SW_OEM_CONDITION_BASE_ID) | ||
| && condition.condition < adaptive_condition(PARTICIPANT_CONDITION_BASE_ID)) { | ||
| thd_log_info( | ||
| "Software-OEM condition %" PRIu64 | ||
| " (SwOem%" PRIu64 ") is set by OEM software via DPTF, not available on Linux; the condition set using it will never match\n", | ||
| condition.condition, | ||
| condition.condition - SW_OEM_CONDITION_BASE_ID); | ||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per Intel DPTF ConditionType.h, condition ids in [0x2000, 0x10000) are
software-OEM conditions set at runtime by OEM software via DPTF/ESIF;
they have no equivalent on Linux. thermald instead lumped the whole
[0x1000, 0x10000) range into ODVP and mapped e.g. 0x200D to a
non-existent odvp4115, logging "Unable to read odvp4115" every poll.
Restrict the ODVP mapping to [0x1000, 0x2000). SwOem conditions are
still recognized by verify_condition() so engine startup behavior is
unchanged (failing verify_conditions() would enter the unsupported
condition fallback and stop evaluating conditions at poll time), but
they are no longer evaluated via ODVP: the containing condition set
quietly never matches, exactly as before when the odvpN read failed,
just without the per-poll error spam. A one-time info message is
logged at startup instead.
No functional change - such sets were never satisfiable on Linux.