Skip to content

Commit

Permalink
use 2 DVI samplers and initialize software video mux (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Aug 19, 2015
1 parent 99fc47f commit 930f3a8
Show file tree
Hide file tree
Showing 14 changed files with 907 additions and 423 deletions.
2 changes: 1 addition & 1 deletion firmware/lm32/Makefile
Expand Up @@ -2,7 +2,7 @@
MSCDIR=../../build/misoc
include $(MSCDIR)/software/common.mak

OBJECTS=isr.o processor.o dvisampler.o edid.o pll.o ci.o config.o encoder.o main.o
OBJECTS=isr.o processor.o dvisampler0.o dvisampler1.o edid.o pll.o ci.o config.o encoder.o main.o

all: firmware.bin

Expand Down
30 changes: 23 additions & 7 deletions firmware/lm32/ci.c
Expand Up @@ -6,7 +6,7 @@
#include <time.h>

#include "config.h"
#include "dvisampler.h"
#include "dvisampler0.h"
#include "processor.h"
#include "pll.h"
#include "ci.h"
Expand Down Expand Up @@ -74,8 +74,8 @@ static void version(void)

static void system_status(void)
{
printf("dvi_in: %dx%d", dvisampler_resdetection_hres_read(),
dvisampler_resdetection_vres_read());
printf("dvi_in: %dx%d", dvisampler0_resdetection_hres_read(),
dvisampler0_resdetection_vres_read());
printf(" | ");
if(fb_fi_enable_read())
printf("dvi_out: %dx%d", processor_h_active,
Expand Down Expand Up @@ -122,15 +122,23 @@ void ci_service(void)
list_video_modes();
break;
case 'D':
dvisampler_debug = 1;
dvisampler0_debug = 1;
printf("DVI sampler debug is ON\n");
break;
case 'd':
dvisampler_debug = 0;
dvisampler0_debug = 0;
printf("DVI sampler debug is OFF\n");
break;
#ifdef ENCODER_BASE
case 'E':
/* XXX for test, FIXME */
c = readchar();
if (c == '0')
processor_encoder_source = VIDEO_IN_DVISAMPLER0;
else if (c == '1')
processor_encoder_source = VIDEO_IN_DVISAMPLER1;
processor_update();

encoder_enable(1);
printf("Encoder is ON\n");
break;
Expand All @@ -140,12 +148,20 @@ void ci_service(void)
break;
#endif
case 'F':
/* XXX for test, FIXME */
c = readchar();
if (c == '0')
processor_framebuffer_source = VIDEO_IN_DVISAMPLER0;
else if (c == '1')
processor_framebuffer_source = VIDEO_IN_DVISAMPLER1;
processor_update();

fb_fi_enable_write(1);
printf("framebuffer is ON\n");
printf("Framebuffer is ON\n");
break;
case 'f':
fb_fi_enable_write(0);
printf("framebuffer is OFF\n");
printf("Framebuffer is OFF\n");
break;
case 'h':
help();
Expand Down

0 comments on commit 930f3a8

Please sign in to comment.