Skip to content

drivers/video: Improve IT66021 EDID definitions and add new DTDs#601

Open
Strykar wants to merge 2 commits intohd-zero:mainfrom
Strykar:main
Open

drivers/video: Improve IT66021 EDID definitions and add new DTDs#601
Strykar wants to merge 2 commits intohd-zero:mainfrom
Strykar:main

Conversation

@Strykar
Copy link

@Strykar Strykar commented Feb 26, 2026

This patch (originally at #591) refactors the IT66021 HDMI hardcoded EDID array to improve maintainability and memory efficiency, while adding support for two new video timings.

Using designated initializers makes the checksum location explicit and prevents accidental misplacement if the EDID contents are edited later.

Functional Changes

Replaces two redundant Detailed Timing Descriptors (DTDs) in the CEA Extension block with:

  • 1280x720 @ 50 Hz (replaces duplicate 720p60)
  • 960x720 @ 100 Hz (CVT-RB) (replaces duplicate 1080p60)

The base EDID and previously supported fundamental timings (1080p60, 720p60) remain completely intact and unaffected.

Technical Enhancements

Memory Optimization: Added the static modifier to the 256-byte EDID array. Previously, the lack of this modifier forced the compiler to dynamically allocate and populate this.

This patch refactors the IT66021 HDMI transmitter's hardcoded EDID array to improve maintainability and memory efficiency, while adding support for two new video timings.

Functional Changes
Replaces two redundant Detailed Timing Descriptors (DTDs) in the CEA Extension block with:

1280x720 @ 50 Hz (replaces duplicated 720p60)
960x720 @ 100 Hz (CVT-RB) (replaces duplicated 1080p60)
The base EDID and previously supported fundamental timings (1080p60, 720p60) remain completely intact and unaffected.

Technical Enhancements
Memory Optimization: Added the static modifier to the 256-byte EDID array. Previously, the lack of this modifier forced the compiler to dynamically allocate and populate this.
The inner loop in IT66021_Get_VTMG() reads r9a[j+1] while iterating j from
IT66121_9A_READ_N - 1, which can access one element past the end of the array.

This change adjusts the loop bound to prevent out-of-bounds access while
preserving the existing sorting behavior.

Is a full refactor necessary to address the bounds violation?
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.

1 participant