From 64bfca56b44496d50ca8bee2c8bc5979c1c3e86b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 16 Nov 2013 17:41:03 +0100 Subject: [PATCH] videomixer: add more video modes --- software/videomixer/processor.c | 98 ++++++++++++++++++++++++++++++++- software/videomixer/processor.h | 2 +- 2 files changed, 96 insertions(+), 4 deletions(-) diff --git a/software/videomixer/processor.c b/software/videomixer/processor.c index 972d22fe..12969bcf 100644 --- a/software/videomixer/processor.c +++ b/software/videomixer/processor.c @@ -9,6 +9,7 @@ #include "edid.h" #include "processor.h" +/* reference: http://martin.hinner.info/vga/timing.html */ static const struct video_timing video_modes[PROCESSOR_MODE_COUNT] = { { .pixel_clock = 3150, @@ -25,21 +26,81 @@ static const struct video_timing video_modes[PROCESSOR_MODE_COUNT] = { .established_timing = 0x0800 }, + { + .pixel_clock = 3150, + + .h_active = 640, + .h_blanking = 200, + .h_sync_offset = 16, + .h_sync_width = 64, + + .v_active = 480, + .v_blanking = 20, + .v_sync_offset = 1, + .v_sync_width = 3, + + .established_timing = 0x0400 + }, + { + .pixel_clock = 3600, + + .h_active = 800, + .h_blanking = 224, + .h_sync_offset = 24, + .h_sync_width = 72, + + .v_active = 600, + .v_blanking = 25, + .v_sync_offset = 1, + .v_sync_width = 2, + + .established_timing = 0x0200 + }, { .pixel_clock = 4000, .h_active = 800, .h_blanking = 256, - .h_sync_offset = 32, + .h_sync_offset = 40, .h_sync_width = 128, .v_active = 600, .v_blanking = 28, .v_sync_offset = 1, - .v_sync_width = 6, + .v_sync_width = 4, .established_timing = 0x0100 }, + { + .pixel_clock = 5000, + + .h_active = 800, + .h_blanking = 240, + .h_sync_offset = 56, + .h_sync_width = 120, + + .v_active = 600, + .v_blanking = 66, + .v_sync_offset = 37, + .v_sync_width = 6, + + .established_timing = 0x0080 + }, + { + .pixel_clock = 4950, + + .h_active = 800, + .h_blanking = 256, + .h_sync_offset = 16, + .h_sync_width = 80, + + .v_active = 600, + .v_blanking = 25, + .v_sync_offset = 1, + .v_sync_width = 3, + + .established_timing = 0x0040 + }, { .pixel_clock = 6500, @@ -54,7 +115,38 @@ static const struct video_timing video_modes[PROCESSOR_MODE_COUNT] = { .v_sync_width = 6, .established_timing = 0x0008 - }, { + }, + { + .pixel_clock = 7500, + + .h_active = 1024, + .h_blanking = 304, + .h_sync_offset = 24, + .h_sync_width = 136, + + .v_active = 768, + .v_blanking = 38, + .v_sync_offset = 3, + .v_sync_width = 6, + + .established_timing = 0x0004 + }, + { + .pixel_clock = 7880, + + .h_active = 1024, + .h_blanking = 288, + .h_sync_offset = 16, + .h_sync_width = 96, + + .v_active = 768, + .v_blanking = 32, + .v_sync_offset = 1, + .v_sync_width = 3, + + .established_timing = 0x0002 + }, + { .pixel_clock = 7425, .h_active = 1280, diff --git a/software/videomixer/processor.h b/software/videomixer/processor.h index 75fa5205..cd121b19 100644 --- a/software/videomixer/processor.h +++ b/software/videomixer/processor.h @@ -1,7 +1,7 @@ #ifndef __PROCESSOR_H #define __PROCESSOR_H -#define PROCESSOR_MODE_COUNT 4 +#define PROCESSOR_MODE_COUNT 10 #define PROCESSOR_MODE_DESCLEN 32 void processor_list_modes(char *mode_descriptors); -- 2.30.2