1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
#ifdef SH7722_DEBUG_SCREEN
#define DIRECT_ENABLE_DEBUG
#endif
#include <config.h>
#include <stdio.h>
#include <sys/mman.h>
#include <asm/types.h>
#include <directfb.h>
#include <fusion/fusion.h>
#include <fusion/shmalloc.h>
#include <core/core.h>
#include <core/coredefs.h>
#include <core/coretypes.h>
#include <core/layers.h>
#include <core/palette.h>
#include <core/surface.h>
#include <core/system.h>
#include <gfx/convert.h>
#include <misc/conf.h>
#include <direct/memcpy.h>
#include <direct/messages.h>
#include "sh7722.h"
#include "sh7722_screen.h"
D_DEBUG_DOMAIN( SH7722_Screen, "SH7722/Screen", "Renesas SH7722 Screen" );
/**********************************************************************************************************************/
static DFBResult
sh7722InitScreen( CoreScreen *screen,
CoreGraphicsDevice *device,
void *driver_data,
void *screen_data,
DFBScreenDescription *description )
{
D_DEBUG_AT( SH7722_Screen, "%s()\n", __FUNCTION__ );
/* Set the screen capabilities. */
description->caps = DSCCAPS_NONE;
/* Set the screen name. */
snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "SH7722 Screen" );
return DFB_OK;
}
static DFBResult
sh7722GetScreenSize( CoreScreen *screen,
void *driver_data,
void *screen_data,
int *ret_width,
int *ret_height )
{
SH7722DriverData *sdrv = driver_data;
SH7722DeviceData *sdev = sdrv->dev;
D_DEBUG_AT( SH7722_Screen, "%s()\n", __FUNCTION__ );
D_ASSERT( ret_width != NULL );
D_ASSERT( ret_height != NULL );
*ret_width = sdev->lcd_width;
*ret_height = sdev->lcd_height;
return DFB_OK;
}
ScreenFuncs sh7722ScreenFuncs = {
.InitScreen = sh7722InitScreen,
.GetScreenSize = sh7722GetScreenSize,
};
|