diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-15 08:46:13 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-15 08:46:13 +0100 |
commit | 7fe60435bce6595a9c58a9bfd8244d74b5320e96 (patch) | |
tree | 1ac714a916e02fc90901ddac8bc2a3c6d051d28c /Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c | |
download | directfb-voodoo-7fe60435bce6595a9c58a9bfd8244d74b5320e96.tar.gz directfb-voodoo-7fe60435bce6595a9c58a9bfd8244d74b5320e96.tar.bz2 directfb-voodoo-7fe60435bce6595a9c58a9bfd8244d74b5320e96.zip |
Import DirectFB141_2k11R3_beta5
Diffstat (limited to 'Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c')
-rwxr-xr-x | Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c b/Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c new file mode 100755 index 0000000..2fe4d46 --- /dev/null +++ b/Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c @@ -0,0 +1,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, +}; + |