Skip to content

graphics: add adaptive FPS policy to weston-simple-egl#379

Merged
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:Display
Apr 1, 2026
Merged

graphics: add adaptive FPS policy to weston-simple-egl#379
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:Display

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented Apr 1, 2026

This PR address the issue #376 weston-simple-egl to use an adaptive FPS policy instead of relying only on a fixed 60 FPS expectation.

What changed

  • add shared FPS helpers in Runner/utils/lib_display.sh for:
    • FPS log parsing
    • FPS policy resolution
    • refresh-policy application
    • FPS gating
  • update Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh to
    use the shared display FPS helpers
  • support FPS_EXPECT_MODE with auto as the default behavior
  • in auto mode:
    • use fixed mode when EXPECT_FPS is explicitly provided
    • otherwise detect the current primary refresh and use detected mode
  • in detected mode:
    • keep native refresh instead of forcing ~60Hz
    • gate FPS using a minimum threshold derived from detected refresh
  • in fixed mode:
    • preserve explicit expected-FPS validation
  • improve logs by separating:
    • input config / fallback defaults
    • resolved runtime FPS policy

Why this is needed

The previous implementation was effectively centered around a fixed 60 FPS expectation and ~60Hz normalization. That works for 60Hz panels, but it is not suitable for higher-refresh platforms such as 120Hz laptop displays.

With this change, the same test can run correctly on both:

  • 60Hz targets
  • higher-refresh targets such as 120Hz panels

Update Runner/utils/lib_display.sh to add reusable helpers for
display FPS validation:

- display_parse_fps_log()
- display_resolve_fps_policy()
- display_apply_fps_refresh_policy()
- display_fps_gate_avg()

These helpers centralize FPS parsing, expectation mode resolution,
refresh-policy application, and FPS gating so display test run.sh
scripts can stay thin and reuse the same logic across platforms with
different refresh rates.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update weston-simple-egl/run.sh to use shared FPS helpers from
lib_display.sh instead of carrying FPS policy and parsing logic in the
test script.

Changes in this update:
- switch to FPS_EXPECT_MODE-based configuration
- resolve FPS policy through shared display helpers
- apply refresh policy through shared display helpers
- parse FPS stats through shared display helpers
- gate average FPS through shared display helpers

This keeps the runner focused on setup, execution, and result emission
while reusing common display logic for mixed-refresh platforms.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand smuppand self-assigned this Apr 1, 2026
@smuppand smuppand added the enhancement New feature or request label Apr 1, 2026
@bhargav0610
Copy link
Copy Markdown
Contributor

[INFO] 2026-04-01 09:08:45 - EGLINFO: GL_RENDERER: Adreno (TM) X2-85
[INFO] 2026-04-01 09:08:45 - ---------------- End EGLINFO pipeline detection --------------------------
[INFO] 2026-04-01 09:08:45 - Using weston-simple-egl: /bin/weston-simple-egl
[INFO] 2026-04-01 09:08:45 - Launching weston-simple-egl for 30s ...
[INFO] 2026-04-01 09:08:45 - Using helper: run_with_timeout
[INFO] 2026-04-01 09:09:15 - Client finished: rc=143 elapsed=30s
[INFO] 2026-04-01 09:09:15 - FPS stats from ./weston-simple-egl_run.log: samples=4 avg=119.600000 min=119.400002 max=119.800003
[INFO] 2026-04-01 09:09:15 - Result summary: rc=143 elapsed=30s fps=119.600000 mode=detected refresh=120Hz expected=120 min_ok=102
[INFO] 2026-04-01 09:09:15 - Detected-refresh FPS gate passed: avg=119.600000 (~120) >= 102 (refresh=120Hz)
[INFO] 2026-04-01 09:09:15 - Final decision for weston-simple-egl: PASS
[PASS] 2026-04-01 09:09:15 - weston-simple-egl : PASS
root@glymur-crd:/tmp/Runner/suites/Multimedia/Graphics/Weston-simple-egl#

@bhargav0610 bhargav0610 merged commit e1a0684 into qualcomm-linux:main Apr 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants