Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
udl_fb.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fb.h>
#include <linux/dma-buf.h>
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include "udl_drv.h"
#include <drm/drm_fb_helper.h>

Go to the source code of this file.

Data Structures

struct  udl_fbdev
 

Macros

#define DL_DEFIO_WRITE_DELAY   5 /* fb_deferred_io.delay in jiffies */
 
#define DL_ALIGN_UP(x, a)   ALIGN(x, a)
 
#define DL_ALIGN_DOWN(x, a)   ALIGN(x-(a-1), a)
 
#define DLO_RGB_GETRED(col)   (uint8_t)((col) & 0xFF)
 
#define DLO_RGB_GETGRN(col)   (uint8_t)(((col) >> 8) & 0xFF)
 
#define DLO_RGB_GETBLU(col)   (uint8_t)(((col) >> 16) & 0xFF)
 
#define DLO_RG16(red, grn)   (uint8_t)((((red) & 0xF8) | ((grn) >> 5)) & 0xFF)
 
#define DLO_GB16(grn, blu)   (uint8_t)(((((grn) & 0x1C) << 3) | ((blu) >> 3)) & 0xFF)
 
#define DLO_RGB8(red, grn, blu)   ((((red) << 5) | (((grn) & 3) << 3) | ((blu) & 7)) & 0xFF)
 

Functions

 module_param (fb_bpp, int, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP)
 
 module_param (fb_defio, int, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP)
 
int udl_handle_damage (struct udl_framebuffer *fb, int x, int y, int width, int height)
 
int udl_fbdev_init (struct drm_device *dev)
 
void udl_fbdev_cleanup (struct drm_device *dev)
 
void udl_fbdev_unplug (struct drm_device *dev)
 
struct drm_framebufferudl_fb_user_fb_create (struct drm_device *dev, struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd)
 

Macro Definition Documentation

#define DL_ALIGN_DOWN (   x,
  a 
)    ALIGN(x-(a-1), a)

Definition at line 41 of file udl_fb.c.

#define DL_ALIGN_UP (   x,
  a 
)    ALIGN(x, a)

Definition at line 40 of file udl_fb.c.

#define DL_DEFIO_WRITE_DELAY   5 /* fb_deferred_io.delay in jiffies */

Definition at line 25 of file udl_fb.c.

#define DLO_GB16 (   grn,
  blu 
)    (uint8_t)(((((grn) & 0x1C) << 3) | ((blu) >> 3)) & 0xFF)

Return green/blue component of a 16 bpp colour number.

Definition at line 56 of file udl_fb.c.

#define DLO_RG16 (   red,
  grn 
)    (uint8_t)((((red) & 0xF8) | ((grn) >> 5)) & 0xFF)

Return red/green component of a 16 bpp colour number.

Definition at line 53 of file udl_fb.c.

#define DLO_RGB8 (   red,
  grn,
  blu 
)    ((((red) << 5) | (((grn) & 3) << 3) | ((blu) & 7)) & 0xFF)

Return 8 bpp colour number from red, green and blue components.

Definition at line 59 of file udl_fb.c.

#define DLO_RGB_GETBLU (   col)    (uint8_t)(((col) >> 16) & 0xFF)

Read the blue component (0..255) of a 32 bpp colour.

Definition at line 50 of file udl_fb.c.

#define DLO_RGB_GETGRN (   col)    (uint8_t)(((col) >> 8) & 0xFF)

Read the green component (0..255) of a 32 bpp colour.

Definition at line 47 of file udl_fb.c.

#define DLO_RGB_GETRED (   col)    (uint8_t)((col) & 0xFF)

Read the red component (0..255) of a 32 bpp colour.

Definition at line 44 of file udl_fb.c.

Function Documentation

module_param ( fb_bpp  ,
int  ,
S_IWUSR|S_IRUSR|S_IWGRP S_IRGRP 
)
module_param ( fb_defio  ,
int  ,
S_IWUSR|S_IRUSR|S_IWGRP S_IRGRP 
)
struct drm_framebuffer* udl_fb_user_fb_create ( struct drm_device dev,
struct drm_file *  file,
struct drm_mode_fb_cmd2 mode_cmd 
)
read

Definition at line 617 of file udl_fb.c.

void udl_fbdev_cleanup ( struct drm_device dev)

Definition at line 590 of file udl_fb.c.

int udl_fbdev_init ( struct drm_device dev)

Definition at line 563 of file udl_fb.c.

void udl_fbdev_unplug ( struct drm_device dev)

Definition at line 601 of file udl_fb.c.

int udl_handle_damage ( struct udl_framebuffer fb,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 143 of file udl_fb.c.