RetroArch
Classes | Typedefs | Functions | Variables
omap_gfx.c File Reference
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <ctype.h>
#include <assert.h>
#include <sys/mman.h>
#include <linux/omapfb.h>
#include <retro_inline.h>
#include <retro_assert.h>
#include <gfx/scaler/scaler.h>
#include <gfx/video_frame.h>
#include <string/stdstring.h>
#include "../font_driver.h"
#include "../../configuration.h"
#include "../../driver.h"
#include "../../retroarch.h"
Include dependency graph for omap_gfx.c:

Classes

struct  omapfb_page
 
struct  omapfb_state
 
struct  omapfb_data
 
struct  omap_video
 

Typedefs

typedef struct omapfb_page omapfb_page_t
 
typedef struct omapfb_state omapfb_state_t
 
typedef struct omapfb_data omapfb_data_t
 
typedef struct omap_video omap_video_t
 

Functions

static const char * omapfb_get_fb_device (void)
 
static omapfb_page_tomapfb_get_page (omapfb_data_t *pdata)
 
static void omapfb_page_flip (omapfb_data_t *pdata)
 
static int omapfb_read_sysfs (const char *fname, char *buff, size_t size)
 
static INLINE void omapfb_put_pixel_rgb565 (uint16_t *p, unsigned r, unsigned g, unsigned b)
 
static INLINE void omapfb_put_pixel_argb8888 (uint32_t *p, unsigned r, unsigned g, unsigned b)
 
static int omapfb_detect_screen (omapfb_data_t *pdata)
 
static int omapfb_setup_pages (omapfb_data_t *pdata)
 
static int omapfb_mmap (omapfb_data_t *pdata)
 
static int omapfb_backup_state (omapfb_data_t *pdata)
 
static int omapfb_alloc_mem (omapfb_data_t *pdata)
 
static int omapfb_setup_screeninfo (omapfb_data_t *pdata, int width, int height)
 
static float omapfb_scaling (omapfb_data_t *pdata, int width, int height)
 
static int omapfb_setup_plane (omapfb_data_t *pdata, int width, int height)
 
static int omapfb_enable_plane (omapfb_data_t *pdata)
 
static int omapfb_init (omapfb_data_t *pdata, unsigned bpp)
 
void omapfb_free (omapfb_data_t *pdata)
 
static int omapfb_set_mode (omapfb_data_t *pdata, int width, int height)
 
static void omapfb_prepare (omapfb_data_t *pdata)
 
static void omapfb_blend_glyph_rgb565 (omapfb_data_t *pdata, const uint8_t *src, uint8_t *f_rgb, unsigned g_width, unsigned g_height, unsigned g_pitch, unsigned dst_x, unsigned dst_y)
 
static void omapfb_blend_glyph_argb8888 (omapfb_data_t *pdata, const uint8_t *src, uint8_t *f_rgb, unsigned g_width, unsigned g_height, unsigned g_pitch, unsigned dst_x, unsigned dst_y)
 
static void omapfb_blit_frame (omapfb_data_t *pdata, const void *src, unsigned height, unsigned src_pitch)
 
static void omap_gfx_free (void *data)
 
static void omap_init_font (omap_video_t *vid, const char *font_path, unsigned font_size)
 
static void omap_render_msg (omap_video_t *vid, const char *msg)
 
static voidomap_gfx_init (const video_info_t *video, const input_driver_t **input, void **input_data)
 
static bool omap_gfx_frame (void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
 
static void omap_gfx_set_nonblock_state (void *data, bool state)
 
static bool omap_gfx_alive (void *data)
 
static bool omap_gfx_focus (void *data)
 
static void omap_gfx_viewport_info (void *data, struct video_viewport *vp)
 
static bool omap_gfx_suppress_screensaver (void *data, bool enable)
 
static bool omap_gfx_has_windowed (void *data)
 
static bool omap_gfx_set_shader (void *data, enum rarch_shader_type type, const char *path)
 
static void omap_gfx_set_rotation (void *data, unsigned rotation)
 
static bool omap_gfx_read_viewport (void *data, uint8_t *buffer, bool is_idle)
 
static void omap_gfx_set_texture_frame (void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
 
static void omap_gfx_set_texture_enable (void *data, bool state, bool full_screen)
 
static float omap_get_refresh_rate (void *data)
 
static void omap_gfx_get_poke_interface (void *data, const video_poke_interface_t **iface)
 

Variables

static const video_poke_interface_t omap_gfx_poke_interface
 
video_driver_t video_omap
 

Typedef Documentation

◆ omap_video_t

typedef struct omap_video omap_video_t

◆ omapfb_data_t

typedef struct omapfb_data omapfb_data_t

◆ omapfb_page_t

typedef struct omapfb_page omapfb_page_t

◆ omapfb_state_t

typedef struct omapfb_state omapfb_state_t

Function Documentation

◆ omap_get_refresh_rate()

static float omap_get_refresh_rate ( void data)
static

◆ omap_gfx_alive()

static bool omap_gfx_alive ( void data)
static
Here is the call graph for this function:

◆ omap_gfx_focus()

static bool omap_gfx_focus ( void data)
static
Here is the call graph for this function:

◆ omap_gfx_frame()

static bool omap_gfx_frame ( void data,
const void frame,
unsigned  width,
unsigned  height,
uint64_t  frame_count,
unsigned  pitch,
const char *  msg,
video_frame_info_t video_info 
)
static
Here is the call graph for this function:

◆ omap_gfx_free()

static void omap_gfx_free ( void data)
static
Here is the call graph for this function:

◆ omap_gfx_get_poke_interface()

static void omap_gfx_get_poke_interface ( void data,
const video_poke_interface_t **  iface 
)
static
Here is the call graph for this function:

◆ omap_gfx_has_windowed()

static bool omap_gfx_has_windowed ( void data)
static
Here is the call graph for this function:

◆ omap_gfx_init()

static void* omap_gfx_init ( const video_info_t video,
const input_driver_t **  input,
void **  input_data 
)
static
Here is the call graph for this function:

◆ omap_gfx_read_viewport()

static bool omap_gfx_read_viewport ( void data,
uint8_t buffer,
bool  is_idle 
)
static
Here is the call graph for this function:

◆ omap_gfx_set_nonblock_state()

static void omap_gfx_set_nonblock_state ( void data,
bool  state 
)
static

◆ omap_gfx_set_rotation()

static void omap_gfx_set_rotation ( void data,
unsigned  rotation 
)
static
Here is the call graph for this function:

◆ omap_gfx_set_shader()

static bool omap_gfx_set_shader ( void data,
enum rarch_shader_type  type,
const char *  path 
)
static
Here is the call graph for this function:

◆ omap_gfx_set_texture_enable()

static void omap_gfx_set_texture_enable ( void data,
bool  state,
bool  full_screen 
)
static
Here is the call graph for this function:

◆ omap_gfx_set_texture_frame()

static void omap_gfx_set_texture_frame ( void data,
const void frame,
bool  rgb32,
unsigned  width,
unsigned  height,
float  alpha 
)
static
Here is the call graph for this function:

◆ omap_gfx_suppress_screensaver()

static bool omap_gfx_suppress_screensaver ( void data,
bool  enable 
)
static
Here is the call graph for this function:

◆ omap_gfx_viewport_info()

static void omap_gfx_viewport_info ( void data,
struct video_viewport vp 
)
static

◆ omap_init_font()

static void omap_init_font ( omap_video_t vid,
const char *  font_path,
unsigned  font_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omap_render_msg()

static void omap_render_msg ( omap_video_t vid,
const char *  msg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_alloc_mem()

static int omapfb_alloc_mem ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_backup_state()

static int omapfb_backup_state ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_blend_glyph_argb8888()

static void omapfb_blend_glyph_argb8888 ( omapfb_data_t pdata,
const uint8_t src,
uint8_t f_rgb,
unsigned  g_width,
unsigned  g_height,
unsigned  g_pitch,
unsigned  dst_x,
unsigned  dst_y 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_blend_glyph_rgb565()

static void omapfb_blend_glyph_rgb565 ( omapfb_data_t pdata,
const uint8_t src,
uint8_t f_rgb,
unsigned  g_width,
unsigned  g_height,
unsigned  g_pitch,
unsigned  dst_x,
unsigned  dst_y 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_blit_frame()

static void omapfb_blit_frame ( omapfb_data_t pdata,
const void src,
unsigned  height,
unsigned  src_pitch 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_detect_screen()

static int omapfb_detect_screen ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_enable_plane()

static int omapfb_enable_plane ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_free()

void omapfb_free ( omapfb_data_t pdata)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_get_fb_device()

static const char* omapfb_get_fb_device ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_get_page()

static omapfb_page_t* omapfb_get_page ( omapfb_data_t pdata)
static
Here is the caller graph for this function:

◆ omapfb_init()

static int omapfb_init ( omapfb_data_t pdata,
unsigned  bpp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_mmap()

static int omapfb_mmap ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_page_flip()

static void omapfb_page_flip ( omapfb_data_t pdata)
static
Here is the caller graph for this function:

◆ omapfb_prepare()

static void omapfb_prepare ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_put_pixel_argb8888()

static INLINE void omapfb_put_pixel_argb8888 ( uint32_t p,
unsigned  r,
unsigned  g,
unsigned  b 
)
static
Here is the caller graph for this function:

◆ omapfb_put_pixel_rgb565()

static INLINE void omapfb_put_pixel_rgb565 ( uint16_t p,
unsigned  r,
unsigned  g,
unsigned  b 
)
static
Here is the caller graph for this function:

◆ omapfb_read_sysfs()

static int omapfb_read_sysfs ( const char *  fname,
char *  buff,
size_t  size 
)
static
Here is the caller graph for this function:

◆ omapfb_scaling()

static float omapfb_scaling ( omapfb_data_t pdata,
int  width,
int  height 
)
static
Here is the caller graph for this function:

◆ omapfb_set_mode()

static int omapfb_set_mode ( omapfb_data_t pdata,
int  width,
int  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_setup_pages()

static int omapfb_setup_pages ( omapfb_data_t pdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_setup_plane()

static int omapfb_setup_plane ( omapfb_data_t pdata,
int  width,
int  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ omapfb_setup_screeninfo()

static int omapfb_setup_screeninfo ( omapfb_data_t pdata,
int  width,
int  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ omap_gfx_poke_interface

const video_poke_interface_t omap_gfx_poke_interface
static
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static void omap_gfx_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
Definition: omap_gfx.c:1105
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void omap_gfx_set_texture_enable(void *data, bool state, bool full_screen)
Definition: omap_gfx.c:1124
static float omap_get_refresh_rate(void *data)
Definition: omap_gfx.c:1132

◆ video_omap

video_driver_t video_omap
Initial value:
= {
"omap",
NULL,
NULL,
}
static bool omap_gfx_has_windowed(void *data)
Definition: omap_gfx.c:1073
static void omap_gfx_viewport_info(void *data, struct video_viewport *vp)
Definition: omap_gfx.c:1052
static bool omap_gfx_set_shader(void *data, enum rarch_shader_type type, const char *path)
Definition: omap_gfx.c:1081
static void omap_gfx_set_rotation(void *data, unsigned rotation)
Definition: omap_gfx.c:1091
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool omap_gfx_focus(void *data)
Definition: omap_gfx.c:1046
static bool omap_gfx_alive(void *data)
Definition: omap_gfx.c:1040
static void omap_gfx_free(void *data)
Definition: omap_gfx.c:813
static bool omap_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
Definition: omap_gfx.c:988
static bool omap_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle)
Definition: omap_gfx.c:1097
static void omap_gfx_set_nonblock_state(void *data, bool state)
Definition: omap_gfx.c:1029
static void * omap_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data)
Definition: omap_gfx.c:935
static bool omap_gfx_suppress_screensaver(void *data, bool enable)
Definition: omap_gfx.c:1065
static void omap_gfx_get_poke_interface(void *data, const video_poke_interface_t **iface)
Definition: omap_gfx.c:1168