Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1400 → Rev 1401

/demos/trunk/mesademo/initfile.c
37,7 → 37,7
#include "kernel/kern.h"
#include "modules/intdrive.h"
#include "modules/edf.h"
#include "modules/cbs.h"
#include "modules/hardcbs.h"
#include "modules/rr.h"
#include "modules/dummy.h"
 
78,7 → 78,7
 
INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, 1);
HCBS_register_level(HCBS_ENABLE_ALL, 1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
/demos/trunk/mesademo/mesademo.c
45,8 → 45,8
unsigned long int VMEMLONG = WIDTH * HEIGHT * BYTES_PP / 4; // Used by copy_videomem_16to16
unsigned long int RGB565MEM = WIDTH * HEIGHT * BYTES_PP; // Total video mem
 
unsigned long int PERIOD_REFRESH = 45000;
unsigned long int PERIOD_DISEGNA = 45000;
unsigned long int PERIOD_REFRESH = 100000;
unsigned long int PERIOD_DISEGNA = 100000;
 
unsigned long int WCET_REFRESH, WCET_DISEGNA;
 
259,9 → 259,6
void program_key_end(KEY_EVT *k)
{
 
OSMesaDestroyContext(ctx);
free(rgb_565_buf);
sys_end();
 
}
271,6 → 268,7
 
while(1) {
 
task_testcancel();
memcpy((video_buf+40*WIDTH*2), rgb_565_buf, RGB565MEM);
task_endcycle();
 
288,6 → 286,8
TIME disegna_TIME, refresh_TIME;
while(1) {
 
task_testcancel();
jet_gettable(refresh_PID, &refresh_TIME, 1);
jet_gettable(disegna_PID, &disegna_TIME, 1);
314,8 → 314,8
HARD_TASK_MODEL ht_refresh, ht_disegna;
 
WCET_REFRESH =((long int) PERIOD_REFRESH * (0.35));
WCET_DISEGNA =((long int) PERIOD_DISEGNA * (0.6));
WCET_REFRESH =((long int) PERIOD_REFRESH * (0.30));
WCET_DISEGNA =((long int) PERIOD_DISEGNA * (0.55));
 
hard_task_default_model(ht_refresh);
hard_task_def_wcet(ht_refresh,WCET_REFRESH);
327,6 → 327,7
refresh_PID = task_create("refresh", refresh, &ht_refresh, NULL);
if (refresh_PID == -1) {
sys_end();
return 0;
}
 
hard_task_default_model(ht_disegna);
340,6 → 341,7
disegna_PID = task_create("disegna", disegna, &ht_disegna, NULL);
if (disegna_PID == -1) {
sys_end();
return 0;
}
 
{
/demos/trunk/mesademo/readme.txt
10,10 → 10,8
 
This is a simple test demo for the MESA (5.0)
libraries, the low level graphic drivers is
the SVGA (from the SVGAlib)
the Linux 2.6 Frame Buffer Driver
 
See drivers/svga/readme for supported cards
 
--------------------------------------
 
The demo is composed by:
25,20 → 23,3
 
--------------------------------------
 
- To specify your card change the line
 
#define CARD <driver name>
 
- The demo calls the grx and off-screen Mesa functions.
The resolution must be 16 bitsperpixel (64K colors) and
the graphic access mode must be linear.
 
- There are two buffers
 
The video buffer (video_buf)
The virtual buffer (rgb_565_buf)
 
copy_videomem_16to16 links these buffers