Skip to content

adaptive: Stop mapping SwOem conditions to ODVP variables#582

Open
RevySR wants to merge 1 commit into
intel:masterfrom
RevySR:adaptive-swoem-unsupported
Open

adaptive: Stop mapping SwOem conditions to ODVP variables#582
RevySR wants to merge 1 commit into
intel:masterfrom
RevySR:adaptive-swoem-unsupported

Conversation

@RevySR

@RevySR RevySR commented Jun 27, 2026

Copy link
Copy Markdown

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.

@spandruvada

Copy link
Copy Markdown
Contributor

Have you seen any issue on any platform?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/thd_gddv.cpp
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;
}
@RevySR

RevySR commented Jul 13, 2026

Copy link
Copy Markdown
Author

Have you seen any issue on any platform?

ThinkBook 14 G8+ IPH

@spandruvada

Copy link
Copy Markdown
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
RevySR force-pushed the adaptive-swoem-unsupported branch from dba0748 to 836648d Compare July 17, 2026 07:52
@RevySR RevySR changed the title adaptive: Treat SwOem conditions as unsupported instead of ODVP adaptive: Stop mapping SwOem conditions to ODVP variables Jul 17, 2026
@RevySR

RevySR commented Jul 17, 2026

Copy link
Copy Markdown
Author

Please check copilot review comment.

done.

@spandruvada
spandruvada requested a review from Copilot July 21, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread src/thd_gddv.h
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 thread src/thd_gddv.cpp
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants