Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
firmware: initialize video pattern
- Loading branch information
1 parent
4a158df
commit e88854d
Showing
8 changed files
with
91 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
#include <generated/csr.h> | ||
#include <generated/mem.h> | ||
#include <hw/flags.h> | ||
#include <system.h> | ||
#include <time.h> | ||
|
||
#include "pattern.h" | ||
|
||
#define PATTERN_FRAMEBUFFER_BASE 0x02000000 | ||
#define PATTERN_FRAMEBUFFER_SIZE 1280*720*2 | ||
|
||
unsigned int pattern_framebuffer_base(void) { | ||
return PATTERN_FRAMEBUFFER_BASE; | ||
} | ||
|
||
void pattern_fill_framebuffer(void) | ||
{ | ||
int i; | ||
flush_l2_cache(); | ||
volatile unsigned int *framebuffer = (unsigned int *)(MAIN_RAM_BASE + PATTERN_FRAMEBUFFER_BASE); | ||
for(i=0; i<PATTERN_FRAMEBUFFER_SIZE/4; i++) { | ||
framebuffer[i] = 0xf0296e29; /* blue in YCbCr 4:2:2 */ | ||
} | ||
flush_l2_cache(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef __PATTERN_H | ||
#define __PATTERN_H | ||
|
||
unsigned int pattern_framebuffer_base(void); | ||
|
||
void pattern_fill_framebuffer(void); | ||
|
||
#endif /* __PATTERN_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters