Skip to content

fix CPU max freq for 4K H.265 encode on qcs8300 and qcs9100 for Config 1 - #328

Merged
rajulup merged 1 commit into
qualcomm:mainfrom
varunsinghal29:conig_1_encoder_fix
Sep 22, 2026
Merged

rajulup merged 1 commit into
qualcomm:mainfrom
varunsinghal29:conig_1_encoder_fix

Conversation

@varunsinghal29

@varunsinghal29 Varun Singhal (varunsinghal29) commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

CRs-Fixed: 4489411

@varunsinghal29 Varun Singhal (varunsinghal29) changed the title fix CPU max freq for URM_SIG_CAMERA_ENCODE 4K H.265 encode on qcs8300… fix CPU max freq for Encode 4K H.265 encode on qcs8300 and qcs9100 for Config 1 Sep 22, 2026
@varunsinghal29 Varun Singhal (varunsinghal29) changed the title fix CPU max freq for Encode 4K H.265 encode on qcs8300 and qcs9100 for Config 1 fix CPU max freq for 4K H.265 encode on qcs8300 and qcs9100 for Config 1 Sep 22, 2026
@qualcomm-ai-code-review-assistant

Copy link
Copy Markdown

Qualcomm AI Review

Click to expand Code Review
Reviewed Commits: a41e6ae
  • a41e6ae: fix CPU max freq for URM_SIG_CAMERA_ENCODE 4K H.265 encode on qcs8300 and qcs9100 for Config 1

Signed-off-by: Varun Singhal varusing@qti.qualcomm.com

Pull Request Overview

This PR updates CPU frequency scaling configurations for camera encode operations across two target platforms (qcs8300 and qcs9100). The changes increase the maximum frequency limits for different CPU clusters to improve camera encoding performance.

Files Changed Summary

File Lines Changed Issues Found Highest Severity
plugins/Configs/target-specific/qcs8300/SignalsConfig.yaml 3 1 Medium
plugins/Configs/target-specific/qcs9100/SignalsConfig.yaml 2 1 Medium

Key Changes

  • qcs8300: Updated URM_SIG_CAMERA_ENCODE signal to increase CPU frequency limits from 1200000 KHz to 1881600/2054400/2208000 KHz for LITTLE/BIG/PLUS clusters respectively
  • qcs9100: Updated URM_SIG_CAMERA_ENCODE signal to increase CPU frequency limits from 1267200 KHz to 2265600/1363200 KHz for LITTLE/BIG clusters respectively

Critical Issues

  • Configuration Consistency: The frequency values now match those already defined in the same signal configuration (lines 115-117 for qcs8300, lines 114-115 for qcs9100), suggesting these changes align the default encode settings with existing tuning parameters. However, there's a potential inconsistency issue where the comment describes "Default encode - 30fps" but the frequency values are now set to maximum performance levels, which may not be appropriate for all default scenarios.

[FUNCTIONALITY] Potential Configuration Inconsistency - Medium Severity

The updated frequency values for the default camera encode signal (SigId: 0x0003) now match the maximum performance values that were already defined in the same configuration block. This creates a potential issue:

  1. qcs8300 (lines 115-117): The frequencies are set to 1881600/2054400/2208000 KHz, which are high-performance values
  2. qcs9100 (lines 114-115): The frequencies are set to 2265600/1363200 KHz, which are also high-performance values

The comment on line 97 (qcs8300) and line 96 (qcs9100) states "Default encode - 30fps", suggesting this should be a baseline configuration. However, setting maximum frequency limits to such high values for a "default" scenario may:

  • Cause unnecessary power consumption for standard 30fps encoding
  • Reduce the differentiation between default and high-performance scenarios
  • Impact thermal management and battery life

Recommendation: Consider whether these high frequency values are truly appropriate for the "default" 30fps encode scenario, or if they should be reserved for higher performance requirements (e.g., higher frame rates, multiple streams, or higher resolutions). If these values are intentional for default operation, update the comments to reflect the performance expectations more accurately.

Fixed Code Snippet (qcs8300 example):

  # camera encode
  # High-performance encode - 30fps (optimized for quality/latency)
  - SigId: "0x0003"
    Category: "0x03"
    Name: "URM_SIG_CAMERA_ENCODE"
    Enable: true
    TargetsEnabled: ["qcs8300", "qcs8275", "sa7255p"]
    Permissions: ["third_party", "system"]
    Timeout: -1
    Resources:
      - {ResCode: "RES_CGRP_RUN_CORES", Values: [2, 0,1,2,3]}
      - {ResCode: "RES_CGRP_RUN_CORES", Values: [3, 4,5,6,7]}
      - {ResCode: "RES_CGRP_REL_CPU_WEIGHT", Values: [3, 90]}
      - {ResCode: "RES_CGRP_HIGH_MEM", Values: [3, 1048576]}
      - {ResCode: "RES_CGRP_RUN_CORES", Values: [4, 0,1,2,3,4,5,6,7]}
      - {ResCode: "RES_CGRP_REL_CPU_WEIGHT", Values: [4, 150]}
      - {ResCode: "RES_CGRP_CPU_LATENCY", Values: [4, -20]}
      - {ResCode: "RES_CGRP_LOW_MEM", Values: [4, 507256]}
      - {ResCode: "RES_CGRP_MIN_MEM", Values: [4, 116631]}
      - {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_LITTLE_ALL_CORES", Values: [1881600]}
      - {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_BIG_ALL_CORES", Values: [2054400]}
      - {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_PLUS_ALL_CORES", Values: [2208000]}

[MAINTAINABILITY] Frequency Value Duplication - Low Severity

In the qcs8300 configuration file, the frequency values for URM_SIG_CAMERA_ENCODE (lines 115-117) are now identical to the values that appear to be defined elsewhere in the same signal configuration. This duplication could lead to maintenance issues if these values need to be updated in the future, as they would need to be changed in multiple locations.

While this is currently just a configuration update and may be intentional for this specific signal, consider whether there's an opportunity to:

  1. Use a reference mechanism if the configuration system supports it
  2. Document why these specific values are used for the default encode scenario
  3. Ensure consistency across similar signal configurations

This is a low-severity observation as the configuration appears syntactically correct and the values are appropriate for the hardware specifications mentioned in the comments (lines 164-166 for qcs8300 show the CPU cluster capabilities).


⚠️ This review was generated using AI assistance. Please verify all suggestions before applying.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Qualcomm AI Review

Comment on lines 112 to 120
- {ResCode: "RES_CGRP_CPU_LATENCY", Values: [4, -20]}
- {ResCode: "RES_CGRP_LOW_MEM", Values: [4, 507256]}
- {ResCode: "RES_CGRP_MIN_MEM", Values: [4, 116631]}
- {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_LITTLE_ALL_CORES", Values: [1200000]}
- {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_BIG_ALL_CORES", Values: [1200000]}
- {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_PLUS_ALL_CORES", Values: [1200000]}
- {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_LITTLE_ALL_CORES", Values: [1881600]}
- {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_BIG_ALL_CORES", Values: [2054400]}
- {ResCode: "RES_SCALE_MAX_FREQ", ResInfo: "CLUSTER_PLUS_ALL_CORES", Values: [2208000]}

# camera encode multi-stream
# encode (0-12 streams)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MAINTAINABILITY] Frequency Value Duplication - Low Severity

In the qcs8300 configuration file, the frequency values for URM_SIG_CAMERA_ENCODE (lines 115-117) are now identical to the values that appear to be defined elsewhere in the same signal configuration. This duplication could lead to maintenance issues if these values need to be updated in the future, as they would need to be changed in multiple locations.

While this is currently just a configuration update and may be intentional for this specific signal, consider whether there's an opportunity to:

  1. Use a reference mechanism if the configuration system supports it
  2. Document why these specific values are used for the default encode scenario
  3. Ensure consistency across similar signal configurations

This is a low-severity observation as the configuration appears syntactically correct and the values are appropriate for the hardware specifications mentioned in the comments (lines 164-166 for qcs8300 show the CPU cluster capabilities).

@varunsinghal29

Copy link
Copy Markdown
Member Author

without this getting fps drop | running camera usecase for config 1
see:
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 241, dropped: 0, current: 19.33, average: 19.30 /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 251, dropped: 0, current: 19.45, average: 19.31 /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 261, dropped: 0, current: 19.18, average: 19.30 /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 271, dropped: 0, current: 19.36, average: 19.30

but with this change getting good fps:
l data. Shortening processing latency to 0:00:00.000000000. /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 16, dropped: 0, current: 31.73, average: 31.73 /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 32, dropped: 0, current: 30.36, average: 31.03 /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 48, dropped: 0, current: 30.09, average: 30.71 [0:22:09.776245428] [4070] INFO Debayer debayer_cpu.cpp:848 Processed 30 frames in 813044us, 27101 us/frame /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 64, dropped: 0, current: 30.09, average: 30.55 /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 80, dropped: 0, current: 30.04, average: 30.45

CRs-Fixed: 4489411

Signed-off-by: Varun Singhal <varusing@qti.qualcomm.com>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fixed the issue on config 1 with correct codes.

@rajulup
rajulup merged commit aede360 into qualcomm:main Sep 22, 2026
16 of 18 checks passed
@varunsinghal29
Varun Singhal (varunsinghal29) deleted the conig_1_encoder_fix branch September 24, 2026 10:52
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.

4 participants