[PATCH v2 00/16] drm/ast: Clean up display-mode detection and validation
Thomas Zimmermann
tzimmermann at suse.de
Wed Jan 29 09:54:46 UTC 2025
The ast driver detects support for display modes from hardware features
and internal mode tables. Streamline the detection code and put all
validation into a single place.
Patches 1 to 6 refactor the code for detecting support for widescreen
modes. Regular 4:3 modes are supported by all hardware Gens; support
for widescreen modes differs among hardware Gens and individual boards.
The series moves all hardware-related code into a single helper
function that set state flags accordingly. Other places within the
driver then refer to these flags.
Building upon this, patches 7 to 16 refactor display-mode validation.
The ast driver contains a list of display modes supported by the VBIOS.
The series changes the driver to validate DRM display modes against
the VBIOS modes.
Tested on various hardware Gens and display modes.
v2:
- move mode detection into helper functions (Jocelyn)
- replace various large switch statements with LUTs (Jocelyn)
- set max width/height from fullhd flag
Thomas Zimmermann (16):
drm/ast: Remove 1152x864 from list of widescreen resolutions
drm/ast: Align naming in widescreen detection code to manual
drm/ast: Rename support_wide_screen to support_wsxga_p
drm/ast: Reorganize widescreen test around hardware Gens
drm/ast: Add support_fullhd flag to struct ast_device
drm/ast: Add support_wuxga flag to struct ast_device
drm/ast: Always validate H/V sync flags
drm/ast: Find VBIOS mode from regular display size
drm/ast: Add empty initializer for VBIOS modes
drm/ast: Add helpers for VBIOS mode lookup
drm/ast: Validate DRM display modes against VBIOS modes
drm/ast: Inline ast_get_vbios_mode_info()
drm/ast: astdp: Rework display-mode setting
drm/ast: astdp: Look up mode index from table
drm/ast: Remove struct ast_vbios_mode_info
drm/ast: Only look up VBIOS mode on full modesets
drivers/gpu/drm/ast/Makefile | 1 +
drivers/gpu/drm/ast/ast_dp.c | 168 +++++++++--------
drivers/gpu/drm/ast/ast_drv.c | 2 +-
drivers/gpu/drm/ast/ast_drv.h | 30 +--
drivers/gpu/drm/ast/ast_main.c | 102 +++++++---
drivers/gpu/drm/ast/ast_mode.c | 315 +++++++++----------------------
drivers/gpu/drm/ast/ast_post.c | 2 +-
drivers/gpu/drm/ast/ast_reg.h | 30 ++-
drivers/gpu/drm/ast/ast_tables.h | 187 +-----------------
drivers/gpu/drm/ast/ast_vbios.c | 241 +++++++++++++++++++++++
drivers/gpu/drm/ast/ast_vbios.h | 108 +++++++++++
11 files changed, 628 insertions(+), 558 deletions(-)
create mode 100644 drivers/gpu/drm/ast/ast_vbios.c
create mode 100644 drivers/gpu/drm/ast/ast_vbios.h
base-commit: 9afc49c1b29a25d9efba5e29e43c9ce3986e569c
--
2.48.1
More information about the dri-devel
mailing list