mirror of
https://github.com/apache/nuttx.git
synced 2026-10-23 14:58:47 +00:00
video/videomode: Fix EDID parsing and formatting of video mode dumps
Fixes several bugs in EDID parsing and consolidates syslog output in
videomode_dump to prevent broken lines.
Specific changes include:
- Corrected bitwise masking for _HACT_HI (0xf0) and _HBLK_HI (0x0f)
to properly extract the upper bits of horizontal active and blanking
timings.
- Multiplied raw EDID pixel clock by 10 to convert it into kHz, matching
the expectation of the videomode struct dotclock field.
- Combined fragmented syslog calls in videomode_dump into a single line
to prevent unwanted newlines from splitting the output across multiple logs.
Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
This commit is contained in:
parent
f3805fb222
commit
bd2081aeec
3 changed files with 82 additions and 81 deletions
|
|
@ -387,8 +387,8 @@
|
|||
|
||||
#define _HACT_LO(p) ((p)[EDID_DESC_HPIXELS_LSBITS_OFFSET])
|
||||
#define _HBLK_LO(p) ((p)[EDID_DESC_HBLANK_LSBITS_OFFSET])
|
||||
#define _HACT_HI(p) (((p)[EDID_DESC_HMSBITS_OFFSET] & EDID_DESC_HPIXELS_MSBITS_SHIFT) << 4)
|
||||
#define _HBLK_HI(p) (((p)[EDID_DESC_HMSBITS_OFFSET] & EDID_DESC_HBLANK_MSBITS_SHIFT) << 8)
|
||||
#define _HACT_HI(p) (((p)[EDID_DESC_HMSBITS_OFFSET] & 0xf0) << 4)
|
||||
#define _HBLK_HI(p) (((p)[EDID_DESC_HMSBITS_OFFSET] & 0x0f) << 8)
|
||||
#define EDID_DESC_HACTIVE(p) (_HACT_LO(p) | _HACT_HI(p))
|
||||
#define EDID_DESC_HBLANK(p) (_HBLK_LO(p) | _HBLK_HI(p))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue