Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
modedb.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fb.h>
#include <linux/kernel.h>

Go to the source code of this file.

Macros

#define name_matches(v, s, l)   ((v).name && !strncmp((s), (v).name, (l)) && strlen((v).name) == (l))
 
#define res_matches(v, x, y)   ((v).xres == (x) && (v).yres == (y))
 
#define DPRINTK(fmt, args...)
 

Functions

 EXPORT_SYMBOL_GPL (fb_mode_option)
 
int fb_find_mode (struct fb_var_screeninfo *var, struct fb_info *info, const char *mode_option, const struct fb_videomode *db, unsigned int dbsize, const struct fb_videomode *default_mode, unsigned int default_bpp)
 
void fb_var_to_videomode (struct fb_videomode *mode, const struct fb_var_screeninfo *var)
 
void fb_videomode_to_var (struct fb_var_screeninfo *var, const struct fb_videomode *mode)
 
int fb_mode_is_equal (const struct fb_videomode *mode1, const struct fb_videomode *mode2)
 
struct fb_videomodefb_find_best_mode (const struct fb_var_screeninfo *var, struct list_head *head)
 
struct fb_videomodefb_find_nearest_mode (const struct fb_videomode *mode, struct list_head *head)
 
struct fb_videomodefb_match_mode (const struct fb_var_screeninfo *var, struct list_head *head)
 
int fb_add_videomode (const struct fb_videomode *mode, struct list_head *head)
 
void fb_delete_videomode (const struct fb_videomode *mode, struct list_head *head)
 
void fb_destroy_modelist (struct list_head *head)
 
 EXPORT_SYMBOL_GPL (fb_destroy_modelist)
 
void fb_videomode_to_modelist (const struct fb_videomode *modedb, int num, struct list_head *head)
 
struct fb_videomodefb_find_best_display (const struct fb_monspecs *specs, struct list_head *head)
 
 EXPORT_SYMBOL (fb_find_best_display)
 
 EXPORT_SYMBOL (fb_videomode_to_var)
 
 EXPORT_SYMBOL (fb_var_to_videomode)
 
 EXPORT_SYMBOL (fb_mode_is_equal)
 
 EXPORT_SYMBOL (fb_add_videomode)
 
 EXPORT_SYMBOL (fb_match_mode)
 
 EXPORT_SYMBOL (fb_find_best_mode)
 
 EXPORT_SYMBOL (fb_find_nearest_mode)
 
 EXPORT_SYMBOL (fb_videomode_to_modelist)
 
 EXPORT_SYMBOL (fb_find_mode)
 
 EXPORT_SYMBOL (fb_find_mode_cvt)
 

Variables

const charfb_mode_option
 

Macro Definition Documentation

#define DPRINTK (   fmt,
  args... 
)

Definition at line 29 of file modedb.c.

#define name_matches (   v,
  s,
  l 
)    ((v).name && !strncmp((s), (v).name, (l)) && strlen((v).name) == (l))

Definition at line 21 of file modedb.c.

#define res_matches (   v,
  x,
  y 
)    ((v).xres == (x) && (v).yres == (y))

Definition at line 23 of file modedb.c.

Function Documentation

EXPORT_SYMBOL ( fb_find_best_display  )
EXPORT_SYMBOL ( fb_videomode_to_var  )
EXPORT_SYMBOL ( fb_var_to_videomode  )
EXPORT_SYMBOL ( fb_mode_is_equal  )
EXPORT_SYMBOL ( fb_add_videomode  )
EXPORT_SYMBOL ( fb_match_mode  )
EXPORT_SYMBOL ( fb_find_best_mode  )
EXPORT_SYMBOL ( fb_find_nearest_mode  )
EXPORT_SYMBOL ( fb_videomode_to_modelist  )
EXPORT_SYMBOL ( fb_find_mode  )
EXPORT_SYMBOL ( fb_find_mode_cvt  )
EXPORT_SYMBOL_GPL ( fb_mode_option  )
EXPORT_SYMBOL_GPL ( fb_destroy_modelist  )
int fb_add_videomode ( const struct fb_videomode mode,
struct list_head head 
)

fb_add_videomode - adds videomode entry to modelist : videomode to add : struct list_head of modelist

NOTES: Will only add unmatched mode entries

Definition at line 982 of file modedb.c.

void fb_delete_videomode ( const struct fb_videomode mode,
struct list_head head 
)

fb_delete_videomode - removed videomode entry from modelist : videomode to remove : struct list_head of modelist

NOTES: Will remove all matching mode entries

Definition at line 1017 of file modedb.c.

void fb_destroy_modelist ( struct list_head head)

fb_destroy_modelist - destroy modelist : struct list_head of modelist

Definition at line 1038 of file modedb.c.

struct fb_videomode* fb_find_best_display ( const struct fb_monspecs specs,
struct list_head head 
)
read

Definition at line 1068 of file modedb.c.

struct fb_videomode* fb_find_best_mode ( const struct fb_var_screeninfo var,
struct list_head head 
)
read

Definition at line 879 of file modedb.c.

int fb_find_mode ( struct fb_var_screeninfo var,
struct fb_info info,
const char mode_option,
const struct fb_videomode db,
unsigned int  dbsize,
const struct fb_videomode default_mode,
unsigned int  default_bpp 
)

Definition at line 564 of file modedb.c.

struct fb_videomode* fb_find_nearest_mode ( const struct fb_videomode mode,
struct list_head head 
)
read

fb_find_nearest_mode - find closest videomode

: pointer to struct fb_videomode : pointer to modelist

Finds best matching videomode, smaller or greater in dimension. If more than 1 videomode is found, will return the videomode with the closest refresh rate.

Definition at line 917 of file modedb.c.

struct fb_videomode* fb_match_mode ( const struct fb_var_screeninfo var,
struct list_head head 
)
read

Definition at line 957 of file modedb.c.

int fb_mode_is_equal ( const struct fb_videomode mode1,
const struct fb_videomode mode2 
)

fb_mode_is_equal - compare 2 videomodes : first videomode : second videomode

RETURNS: 1 if equal, 0 if not

Definition at line 846 of file modedb.c.

void fb_var_to_videomode ( struct fb_videomode mode,
const struct fb_var_screeninfo var 
)

Definition at line 774 of file modedb.c.

void fb_videomode_to_modelist ( const struct fb_videomode modedb,
int  num,
struct list_head head 
)

fb_videomode_to_modelist - convert mode array to mode list : array of struct fb_videomode : number of entries in array : struct list_head of modelist

Definition at line 1055 of file modedb.c.

void fb_videomode_to_var ( struct fb_var_screeninfo var,
const struct fb_videomode mode 
)

Definition at line 818 of file modedb.c.

Variable Documentation

const char* fb_mode_option

Definition at line 32 of file modedb.c.