Repository navigation
kgsl: build: Stub out governors skipped for simple_ondemand - #23
Closed
Ricardo Salveti (ricardosalveti) wants to merge 1 commit into
Closed
Ricardo Salveti (ricardosalveti) wants to merge 1 commit into
Ricardo Salveti (ricardosalveti) wants to merge 1 commit into
Conversation
Commits b47b4a8 ("kgsl: build: Skip governor files when simple_ondemand governor is selected") and e741eff ("kgsl: build: Fix governor name string comparison in Kbuild") stopped building governor_msm_adreno_tz.c and governor_gpubw_mon.c for simple_ondemand, but kgsl_pwrscale.h still declares their functions extern. msm_kgsl.ko then only links if the compiler inlines the static functions called once in kgsl_pwrscale.c and drops the msm-adreno-tz path, so kernels with CONFIG_DEBUG_SECTION_MISMATCH=y (which adds -fno-inline-functions-called-once) fail in modpost: ERROR: modpost: msm_kgsl.ko: symbol 'msm_adreno_tz_init' undefined! ERROR: modpost: msm_kgsl.ko: symbol 'devfreq_gpubw_exit' undefined! ERROR: modpost: msm_kgsl.ko: symbol 'devfreq_gpubw_init' undefined! Set CONFIG_QCOM_KGSL_SKIP_MSM_GOVERNORS in a single place when simple_ondemand is selected, use it to skip the governor objects, and make the governor API, including msm_adreno_tz_reinit(), fall back to inline stubs when it is set. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Qualcomm AI ReviewClick to expand Deep Code ReviewSummaryIssues: 🔴0 🟠0 🟡0 🟢1 → Minor improvements suggested Issues🟢 [BUG] msm_adreno_tz_reinit stub keyed only on SKIP flag, inconsistent with other stubs/apps/qgenie_code_agent/Github/qualcomm-linux/kgsl/fix-simple-ondemand-governor-stubs/73c490dd1abc240bee7bc6de579fa2fccc8b4504/repo/msm_adreno_devfreq.h:L82-L83 Problematic Code: #if IS_ENABLED(CONFIG_QCOM_KGSL_SKIP_MSM_GOVERNORS)
static inline int msm_adreno_tz_reinit(Recommended Fix: /*
* Only stub out reinit when the governor is skipped and no external
* msm-adreno-tz governor provides the real implementation.
*/
#if IS_ENABLED(CONFIG_QCOM_KGSL_SKIP_MSM_GOVERNORS) && \
!IS_ENABLED(CONFIG_DEVFREQ_GOV_QCOM_ADRENO_TZ)
static inline int msm_adreno_tz_reinit( |
This was referenced Oct 26, 2026
Author
|
quic-ksanadhy mind a review? |
Author
|
Merged as df04fd1. |
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.
Commits b47b4a8 ("kgsl: build: Skip governor files when simple_ondemand governor is selected") and e741eff ("kgsl: build: Fix governor name string comparison in Kbuild") stopped building governor_msm_adreno_tz.c and governor_gpubw_mon.c for simple_ondemand, but kgsl_pwrscale.h still declares their functions extern. msm_kgsl.ko then only links if the compiler inlines the static functions called once in kgsl_pwrscale.c and drops the msm-adreno-tz path, so kernels with
CONFIG_DEBUG_SECTION_MISMATCH=y (which adds
-fno-inline-functions-called-once) fail in modpost:
ERROR: modpost: msm_kgsl.ko: symbol 'msm_adreno_tz_init' undefined!
ERROR: modpost: msm_kgsl.ko: symbol 'devfreq_gpubw_exit' undefined!
ERROR: modpost: msm_kgsl.ko: symbol 'devfreq_gpubw_init' undefined!
Set CONFIG_QCOM_KGSL_SKIP_MSM_GOVERNORS in a single place when simple_ondemand is selected, use it to skip the governor objects, and make the governor API, including msm_adreno_tz_reinit(), fall back to inline stubs when it is set.