Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
gtt.h File Reference
#include <drm/drmP.h>

Go to the source code of this file.

Data Structures

struct  psb_gtt
 
struct  gtt_range
 

Functions

int psb_gtt_init (struct drm_device *dev, int resume)
 
void psb_gtt_takedown (struct drm_device *dev)
 
struct gtt_rangepsb_gtt_alloc_range (struct drm_device *dev, int len, const char *name, int backed)
 
void psb_gtt_kref_put (struct gtt_range *gt)
 
void psb_gtt_free_range (struct drm_device *dev, struct gtt_range *gt)
 
int psb_gtt_pin (struct gtt_range *gt)
 
void psb_gtt_unpin (struct gtt_range *gt)
 
void psb_gtt_roll (struct drm_device *dev, struct gtt_range *gt, int roll)
 

Function Documentation

struct gtt_range* psb_gtt_alloc_range ( struct drm_device dev,
int  len,
const char name,
int  backed 
)
read

Definition at line 330 of file gtt.c.

void psb_gtt_free_range ( struct drm_device dev,
struct gtt_range gt 
)

psb_gtt_free_range - release GTT address space : our DRM device : a mapping created with psb_gtt_alloc_range

Release a resource that was allocated with psb_gtt_alloc_range. If the object has been pinned by mmap users we clean this up here currently.

Definition at line 376 of file gtt.c.

int psb_gtt_init ( struct drm_device dev,
int  resume 
)

Definition at line 412 of file gtt.c.

void psb_gtt_kref_put ( struct gtt_range gt)
int psb_gtt_pin ( struct gtt_range gt)

psb_gtt_pin - pin pages into the GTT : range to pin

Pin a set of pages into the GTT. The pins are refcounted so that multiple pins need multiple unpins to undo.

Non GEM backed objects treat this as a no-op as they are always GTT backed objects.

Definition at line 260 of file gtt.c.

void psb_gtt_roll ( struct drm_device dev,
struct gtt_range r,
int  roll 
)

psb_gtt_roll - set scrolling position : our DRM device : the gtt mapping we are using : roll offset

Roll an existing pinned mapping by moving the pages through the GTT. This allows us to implement hardware scrolling on the consoles without a 2D engine

Definition at line 155 of file gtt.c.

void psb_gtt_takedown ( struct drm_device dev)

Definition at line 394 of file gtt.c.

void psb_gtt_unpin ( struct gtt_range gt)

psb_gtt_unpin - Drop a GTT pin requirement : range to pin

Undoes the effect of psb_gtt_pin. On the last drop the GEM object will be removed from the GTT which will also drop the page references and allow the VM to clean up or page stuff.

Non GEM backed objects treat this as a no-op as they are always GTT backed objects.

Definition at line 295 of file gtt.c.