Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
omap_drv.h File Reference
#include <video/omapdss.h>
#include <linux/module.h>
#include <linux/types.h>
#include <drm/drmP.h>
#include <drm/drm_crtc_helper.h>
#include <linux/platform_data/omap_drm.h>
#include "omap_drm.h"

Go to the source code of this file.

Data Structures

struct  omap_drm_private
struct  omap_drm_window


#define DBG(fmt,...)   DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
#define VERB(fmt,...)   if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */
#define MODULE_NAME   "omapdrm"
#define MAX_MAPPERS   2
#define DRM_ROTATE_0   0
#define DRM_ROTATE_90   1
#define DRM_ROTATE_180   2
#define DRM_ROTATE_270   3
#define DRM_REFLECT_X   4
#define DRM_REFLECT_Y   5


struct drm_fb_helperomap_fbdev_init (struct drm_device *dev)
void omap_fbdev_free (struct drm_device *dev)
struct drm_crtcomap_crtc_init (struct drm_device *dev, struct omap_overlay *ovl, int id)
struct drm_planeomap_plane_init (struct drm_device *dev, struct omap_overlay *ovl, unsigned int possible_crtcs, bool priv)
int omap_plane_dpms (struct drm_plane *plane, int mode)
int omap_plane_mode_set (struct drm_plane *plane, struct drm_crtc *crtc, struct drm_framebuffer *fb, int crtc_x, int crtc_y, unsigned int crtc_w, unsigned int crtc_h, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h)
void omap_plane_on_endwin (struct drm_plane *plane, void(*fxn)(void *), void *arg)
void omap_plane_install_properties (struct drm_plane *plane, struct drm_mode_object *obj)
int omap_plane_set_property (struct drm_plane *plane, struct drm_property *property, uint64_t val)
struct drm_encoderomap_encoder_init (struct drm_device *dev, struct omap_overlay_manager *mgr)
struct omap_overlay_manageromap_encoder_get_manager (struct drm_encoder *encoder)
struct drm_encoderomap_connector_attached_encoder (struct drm_connector *connector)
enum drm_connector_status omap_connector_detect (struct drm_connector *connector, bool force)
struct drm_connectoromap_connector_init (struct drm_device *dev, int connector_type, struct omap_dss_device *dssdev)
void omap_connector_mode_set (struct drm_connector *connector, struct drm_display_mode *mode)
void omap_connector_flush (struct drm_connector *connector, int x, int y, int w, int h)
uint32_t omap_framebuffer_get_formats (uint32_t *pixel_formats, uint32_t max_formats, enum omap_color_mode supported_modes)
struct drm_framebufferomap_framebuffer_create (struct drm_device *dev, struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd)
struct drm_framebufferomap_framebuffer_init (struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos)
struct drm_gem_object * omap_framebuffer_bo (struct drm_framebuffer *fb, int p)
int omap_framebuffer_replace (struct drm_framebuffer *a, struct drm_framebuffer *b, void *arg, void(*unpin)(void *arg, struct drm_gem_object *bo))
void omap_framebuffer_update_scanout (struct drm_framebuffer *fb, struct omap_drm_window *win, struct omap_overlay_info *info)
struct drm_connectoromap_framebuffer_get_next_connector (struct drm_framebuffer *fb, struct drm_connector *from)
void omap_framebuffer_flush (struct drm_framebuffer *fb, int x, int y, int w, int h)
void omap_gem_init (struct drm_device *dev)
void omap_gem_deinit (struct drm_device *dev)
struct drm_gem_object * omap_gem_new (struct drm_device *dev, union omap_gem_size gsize, uint32_t flags)
int omap_gem_new_handle (struct drm_device *dev, struct drm_file *file, union omap_gem_size gsize, uint32_t flags, uint32_t *handle)
void omap_gem_free_object (struct drm_gem_object *obj)
int omap_gem_init_object (struct drm_gem_object *obj)
voidomap_gem_vaddr (struct drm_gem_object *obj)
int omap_gem_dumb_map_offset (struct drm_file *file, struct drm_device *dev, uint32_t handle, uint64_t *offset)
int omap_gem_dumb_destroy (struct drm_file *file, struct drm_device *dev, uint32_t handle)
int omap_gem_dumb_create (struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args)
int omap_gem_mmap (struct file *filp, struct vm_area_struct *vma)
int omap_gem_mmap_obj (struct drm_gem_object *obj, struct vm_area_struct *vma)
int omap_gem_fault (struct vm_area_struct *vma, struct vm_fault *vmf)
int omap_gem_op_start (struct drm_gem_object *obj, enum omap_gem_op op)
int omap_gem_op_finish (struct drm_gem_object *obj, enum omap_gem_op op)
int omap_gem_op_sync (struct drm_gem_object *obj, enum omap_gem_op op)
int omap_gem_op_async (struct drm_gem_object *obj, enum omap_gem_op op, void(*fxn)(void *arg), void *arg)
int omap_gem_roll (struct drm_gem_object *obj, uint32_t roll)
void omap_gem_cpu_sync (struct drm_gem_object *obj, int pgoff)
void omap_gem_dma_sync (struct drm_gem_object *obj, enum dma_data_direction dir)
int omap_gem_get_paddr (struct drm_gem_object *obj, dma_addr_t *paddr, bool remap)
int omap_gem_put_paddr (struct drm_gem_object *obj)
int omap_gem_get_pages (struct drm_gem_object *obj, struct page ***pages, bool remap)
int omap_gem_put_pages (struct drm_gem_object *obj)
uint32_t omap_gem_flags (struct drm_gem_object *obj)
int omap_gem_rotated_paddr (struct drm_gem_object *obj, uint32_t orient, int x, int y, dma_addr_t *paddr)
uint64_t omap_gem_mmap_offset (struct drm_gem_object *obj)
size_t omap_gem_mmap_size (struct drm_gem_object *obj)
int omap_gem_tiled_size (struct drm_gem_object *obj, uint16_t *w, uint16_t *h)
int omap_gem_tiled_stride (struct drm_gem_object *obj, uint32_t orient)
struct dma_bufomap_gem_prime_export (struct drm_device *dev, struct drm_gem_object *obj, int flags)
struct drm_gem_object * omap_gem_prime_import (struct drm_device *dev, struct dma_buf *buffer)

Macro Definition Documentation

#define DBG (   fmt,
)    DRM_DEBUG(fmt"\n", ##__VA_ARGS__)

Definition at line 31 of file omap_drv.h.

#define DRM_REFLECT_X   4

Definition at line 73 of file omap_drv.h.

#define DRM_REFLECT_Y   5

Definition at line 74 of file omap_drv.h.

#define DRM_ROTATE_0   0

Definition at line 69 of file omap_drv.h.

#define DRM_ROTATE_180   2

Definition at line 71 of file omap_drv.h.

#define DRM_ROTATE_270   3

Definition at line 72 of file omap_drv.h.

#define DRM_ROTATE_90   1

Definition at line 70 of file omap_drv.h.

#define MAX_MAPPERS   2

Definition at line 40 of file omap_drv.h.

#define MODULE_NAME   "omapdrm"

Definition at line 34 of file omap_drv.h.

#define VERB (   fmt,
)    if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */

Definition at line 32 of file omap_drv.h.

Function Documentation

struct drm_encoder* omap_connector_attached_encoder ( struct drm_connector connector)

Definition at line 262 of file omap_connector.c.

enum drm_connector_status omap_connector_detect ( struct drm_connector connector,
bool  force 

Definition at line 140 of file omap_connector.c.

void omap_connector_flush ( struct drm_connector connector,
int  x,
int  y,
int  w,
int  h 

Definition at line 337 of file omap_connector.c.

struct drm_connector* omap_connector_init ( struct drm_device dev,
int  connector_type,
struct omap_dss_device dssdev 

Definition at line 347 of file omap_connector.c.

void omap_connector_mode_set ( struct drm_connector connector,
struct drm_display_mode mode 

Definition at line 307 of file omap_connector.c.

struct drm_crtc* omap_crtc_init ( struct drm_device dev,
struct omap_overlay ovl,
int  id 

Definition at line 238 of file omap_crtc.c.

struct omap_overlay_manager* omap_encoder_get_manager ( struct drm_encoder encoder)

Definition at line 112 of file omap_encoder.c.

struct drm_encoder* omap_encoder_init ( struct drm_device dev,
struct omap_overlay_manager mgr 

Definition at line 120 of file omap_encoder.c.

void omap_fbdev_free ( struct drm_device dev)

Definition at line 381 of file omap_fbdev.c.

struct drm_fb_helper* omap_fbdev_init ( struct drm_device dev)

Definition at line 343 of file omap_fbdev.c.

struct drm_gem_object* omap_framebuffer_bo ( struct drm_framebuffer fb,
int  p 

Definition at line 292 of file omap_fb.c.

struct drm_framebuffer* omap_framebuffer_create ( struct drm_device dev,
struct drm_file *  file,
struct drm_mode_fb_cmd2 mode_cmd 

Definition at line 372 of file omap_fb.c.

void omap_framebuffer_flush ( struct drm_framebuffer fb,
int  x,
int  y,
int  w,
int  h 

Definition at line 330 of file omap_fb.c.

uint32_t omap_framebuffer_get_formats ( uint32_t pixel_formats,
uint32_t  max_formats,
enum omap_color_mode  supported_modes 

Definition at line 64 of file omap_fb.c.

struct drm_connector* omap_framebuffer_get_next_connector ( struct drm_framebuffer fb,
struct drm_connector from 

Definition at line 303 of file omap_fb.c.

struct drm_framebuffer* omap_framebuffer_init ( struct drm_device dev,
struct drm_mode_fb_cmd2 mode_cmd,
struct drm_gem_object **  bos 

Definition at line 394 of file omap_fb.c.

int omap_framebuffer_replace ( struct drm_framebuffer a,
struct drm_framebuffer b,
void arg,
void(*)(void *arg, struct drm_gem_object *bo)  unpin 

Definition at line 249 of file omap_fb.c.

void omap_framebuffer_update_scanout ( struct drm_framebuffer fb,
struct omap_drm_window win,
struct omap_overlay_info info 

Definition at line 155 of file omap_fb.c.

void omap_gem_cpu_sync ( struct drm_gem_object *  obj,
int  pgoff 

Definition at line 717 of file omap_gem.c.

void omap_gem_deinit ( struct drm_device dev)

Definition at line 1485 of file omap_gem.c.

void omap_gem_dma_sync ( struct drm_gem_object *  obj,
enum dma_data_direction  dir 

Definition at line 730 of file omap_gem.c.

int omap_gem_dumb_create ( struct drm_file *  file,
struct drm_device dev,
struct drm_mode_create_dumb args 

omap_gem_dumb_create - create a dumb buffer : our client file : our device : the requested arguments copied from userspace

Allocate a buffer suitable for use for a frame buffer of the form described by user space. Give userspace a handle by which to reference it.

Definition at line 615 of file omap_gem.c.

int omap_gem_dumb_destroy ( struct drm_file *  file,
struct drm_device dev,
uint32_t  handle 

Definition at line 640 of file omap_gem.c.

int omap_gem_dumb_map_offset ( struct drm_file *  file,
struct drm_device dev,
uint32_t  handle,
uint64_t offset 

Definition at line 656 of file omap_gem.c.

int omap_gem_fault ( struct vm_area_struct vma,
struct vm_fault *  vmf 

omap_gem_fault - pagefault handler for GEM objects : the VMA of the GEM object : fault detail

Invoked when a fault occurs on an mmap of a GEM managed area. GEM does most of the work for us including the actual map/unmap calls but we need to do the actual page work.

The VMA was set up by GEM. In doing so it also ensured that the vma->vm_private_data points to the GEM object that is backing this mapping.

Definition at line 509 of file omap_gem.c.

uint32_t omap_gem_flags ( struct drm_gem_object *  obj)

Definition at line 302 of file omap_gem.c.

void omap_gem_free_object ( struct drm_gem_object *  obj)

Definition at line 1277 of file omap_gem.c.

int omap_gem_get_paddr ( struct drm_gem_object *  obj,
dma_addr_t paddr,
bool  remap 

Definition at line 760 of file omap_gem.c.

int omap_gem_get_pages ( struct drm_gem_object *  obj,
struct page ***  pages,
bool  remap 

Definition at line 922 of file omap_gem.c.

void omap_gem_init ( struct drm_device dev)

Definition at line 1430 of file omap_gem.c.

int omap_gem_init_object ( struct drm_gem_object *  obj)

Definition at line 1269 of file omap_gem.c.

int omap_gem_mmap ( struct file filp,
struct vm_area_struct vma 

We override mainly to fix up some of the vm mapping flags..

Definition at line 555 of file omap_gem.c.

int omap_gem_mmap_obj ( struct drm_gem_object *  obj,
struct vm_area_struct vma 

Definition at line 568 of file omap_gem.c.

uint64_t omap_gem_mmap_offset ( struct drm_gem_object *  obj)

Definition at line 328 of file omap_gem.c.

size_t omap_gem_mmap_size ( struct drm_gem_object *  obj)

get mmap size

Definition at line 338 of file omap_gem.c.

struct drm_gem_object* omap_gem_new ( struct drm_device dev,
union omap_gem_size  gsize,
uint32_t  flags 

Definition at line 1345 of file omap_gem.c.

int omap_gem_new_handle ( struct drm_device dev,
struct drm_file *  file,
union omap_gem_size  gsize,
uint32_t  flags,
uint32_t handle 

Definition at line 1321 of file omap_gem.c.

int omap_gem_op_async ( struct drm_gem_object *  obj,
enum omap_gem_op  op,
void(*)(void *arg fxn,
void arg 

Definition at line 1196 of file omap_gem.c.

int omap_gem_op_finish ( struct drm_gem_object *  obj,
enum omap_gem_op  op 

Definition at line 1126 of file omap_gem.c.

int omap_gem_op_start ( struct drm_gem_object *  obj,
enum omap_gem_op  op 

Definition at line 1121 of file omap_gem.c.

int omap_gem_op_sync ( struct drm_gem_object *  obj,
enum omap_gem_op  op 

Definition at line 1140 of file omap_gem.c.

struct dma_buf* omap_gem_prime_export ( struct drm_device dev,
struct drm_gem_object *  obj,
int  flags 

Definition at line 194 of file omap_gem_dmabuf.c.

struct drm_gem_object* omap_gem_prime_import ( struct drm_device dev,
struct dma_buf buffer 

Definition at line 200 of file omap_gem_dmabuf.c.

int omap_gem_put_paddr ( struct drm_gem_object *  obj)

Definition at line 832 of file omap_gem.c.

int omap_gem_put_pages ( struct drm_gem_object *  obj)

Definition at line 940 of file omap_gem.c.

int omap_gem_roll ( struct drm_gem_object *  obj,
uint32_t  roll 

Definition at line 682 of file omap_gem.c.

int omap_gem_rotated_paddr ( struct drm_gem_object *  obj,
uint32_t  orient,
int  x,
int  y,
dma_addr_t paddr 

Definition at line 864 of file omap_gem.c.

int omap_gem_tiled_size ( struct drm_gem_object *  obj,
uint16_t w,
uint16_t h 

Definition at line 358 of file omap_gem.c.

int omap_gem_tiled_stride ( struct drm_gem_object *  obj,
uint32_t  orient 

Definition at line 881 of file omap_gem.c.

void* omap_gem_vaddr ( struct drm_gem_object *  obj)

Definition at line 953 of file omap_gem.c.

int omap_plane_dpms ( struct drm_plane plane,
int  mode 

Definition at line 375 of file omap_plane.c.

struct drm_plane* omap_plane_init ( struct drm_device dev,
struct omap_overlay ovl,
unsigned int  possible_crtcs,
bool  priv 

Definition at line 487 of file omap_plane.c.

void omap_plane_install_properties ( struct drm_plane plane,
struct drm_mode_object obj 

Definition at line 412 of file omap_plane.c.

int omap_plane_mode_set ( struct drm_plane plane,
struct drm_crtc crtc,
struct drm_framebuffer fb,
int  crtc_x,
int  crtc_y,
unsigned int  crtc_w,
unsigned int  crtc_h,
uint32_t  src_x,
uint32_t  src_y,
uint32_t  src_w,
uint32_t  src_h 

Definition at line 311 of file omap_plane.c.

void omap_plane_on_endwin ( struct drm_plane plane,
void(*)(void *)  fxn,
void arg 

Definition at line 398 of file omap_plane.c.

int omap_plane_set_property ( struct drm_plane plane,
struct drm_property property,
uint64_t  val 

Definition at line 447 of file omap_plane.c.