Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
i915_dma.c File Reference
#include <drm/drmP.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_helper.h>
#include "intel_drv.h"
#include <drm/i915_drm.h>
#include "i915_drv.h"
#include "i915_trace.h"
#include <linux/pci.h>
#include <linux/vgaarb.h>
#include <linux/acpi.h>
#include <linux/pnp.h>
#include <linux/vga_switcheroo.h>
#include <linux/slab.h>
#include <acpi/video.h>
#include <asm/pat.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define LP_RING(d)   (&((struct drm_i915_private *)(d))->ring[RCS])
 
#define BEGIN_LP_RING(n)   intel_ring_begin(LP_RING(dev_priv), (n))
 
#define OUT_RING(x)   intel_ring_emit(LP_RING(dev_priv), x)
 
#define ADVANCE_LP_RING()   intel_ring_advance(LP_RING(dev_priv))
 
#define RING_LOCK_TEST_WITH_RETURN(dev, file)
 
#define READ_HWSP(dev_priv, reg)   intel_read_legacy_status_page(dev_priv, reg)
 
#define READ_BREADCRUMB(dev_priv)   READ_HWSP(dev_priv, I915_BREADCRUMB_INDEX)
 
#define I915_BREADCRUMB_INDEX   0x21
 
#define MCHBAR_I915   0x44
 
#define MCHBAR_I965   0x48
 
#define MCHBAR_SIZE   (4*4096)
 
#define DEVEN_REG   0x54
 
#define DEVEN_MCHBAR_EN   (1 << 28)
 
#define DEV_INFO_FLAG(name)   info->name ? #name "," : ""
 
#define DEV_INFO_SEP   ,
 

Functions

void i915_update_dri1_breadcrumb (struct drm_device *dev)
 
void i915_kernel_lost_context (struct drm_device *dev)
 
int i915_emit_box (struct drm_device *dev, struct drm_clip_rect *box, int DR1, int DR4)
 
int i915_master_create (struct drm_device *dev, struct drm_master *master)
 
void i915_master_destroy (struct drm_device *dev, struct drm_master *master)
 
int i915_driver_load (struct drm_device *dev, unsigned long flags)
 
int i915_driver_unload (struct drm_device *dev)
 
int i915_driver_open (struct drm_device *dev, struct drm_file *file)
 
void i915_driver_lastclose (struct drm_device *dev)
 
void i915_driver_preclose (struct drm_device *dev, struct drm_file *file_priv)
 
void i915_driver_postclose (struct drm_device *dev, struct drm_file *file)
 
int i915_driver_device_is_agp (struct drm_device *dev)
 

Variables

struct drm_ioctl_desc i915_ioctls []
 
int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls)
 

Macro Definition Documentation

#define ADVANCE_LP_RING ( )    intel_ring_advance(LP_RING(dev_priv))

Definition at line 55 of file i915_dma.c.

#define BEGIN_LP_RING (   n)    intel_ring_begin(LP_RING(dev_priv), (n))

Definition at line 49 of file i915_dma.c.

#define DEV_INFO_FLAG (   name)    info->name ? #name "," : ""
#define DEV_INFO_SEP   ,
#define DEVEN_MCHBAR_EN   (1 << 28)

Definition at line 1130 of file i915_dma.c.

#define DEVEN_REG   0x54

Definition at line 1129 of file i915_dma.c.

#define I915_BREADCRUMB_INDEX   0x21

Definition at line 80 of file i915_dma.c.

#define LP_RING (   d)    (&((struct drm_i915_private *)(d))->ring[RCS])

Definition at line 47 of file i915_dma.c.

#define MCHBAR_I915   0x44

Definition at line 1125 of file i915_dma.c.

#define MCHBAR_I965   0x48

Definition at line 1126 of file i915_dma.c.

#define MCHBAR_SIZE   (4*4096)

Definition at line 1127 of file i915_dma.c.

#define OUT_RING (   x)    intel_ring_emit(LP_RING(dev_priv), x)

Definition at line 52 of file i915_dma.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 29 of file i915_dma.c.

#define READ_BREADCRUMB (   dev_priv)    READ_HWSP(dev_priv, I915_BREADCRUMB_INDEX)

Definition at line 79 of file i915_dma.c.

#define READ_HWSP (   dev_priv,
  reg 
)    intel_read_legacy_status_page(dev_priv, reg)

Definition at line 78 of file i915_dma.c.

#define RING_LOCK_TEST_WITH_RETURN (   dev,
  file 
)
Value:
do { \
if (LP_RING(dev->dev_private)->obj == NULL) \
LOCK_TEST_WITH_RETURN(dev, file); \
} while (0)

Lock test for when it's just for synchronization of ring access.

In that case, we don't need to do it when GEM is initialized as nobody else has access to the ring.

Definition at line 64 of file i915_dma.c.

Function Documentation

int i915_driver_device_is_agp ( struct drm_device dev)

Definition at line 1905 of file i915_dma.c.

void i915_driver_lastclose ( struct drm_device dev)

i915_driver_lastclose - clean up after all DRM clients have exited : DRM device

Take care of cleaning up after all DRM clients have exited. In the mode setting case, we want to restore the kernel's initial mode (just in case the last client left us in a bad state).

Additionally, in the non-mode setting case, we'll tear down the GTT and DMA structures, since the kernel won't be using them, and clea up any GEM state.

Definition at line 1813 of file i915_dma.c.

int i915_driver_load ( struct drm_device dev,
unsigned long  flags 
)

i915_driver_load - setup chip and create an initial config : DRM device : startup flags

The driver load routine has to do several things:

  • drive output discovery via intel_modeset_init()
  • initialize the memory manager
  • allocate initial config memory
  • setup the DRM framebuffer with the allocated memory

Definition at line 1459 of file i915_dma.c.

int i915_driver_open ( struct drm_device dev,
struct drm_file *  file 
)

Definition at line 1782 of file i915_dma.c.

void i915_driver_postclose ( struct drm_device dev,
struct drm_file *  file 
)

Definition at line 1840 of file i915_dma.c.

void i915_driver_preclose ( struct drm_device dev,
struct drm_file *  file_priv 
)

Definition at line 1834 of file i915_dma.c.

int i915_driver_unload ( struct drm_device dev)

Definition at line 1689 of file i915_dma.c.

int i915_emit_box ( struct drm_device dev,
struct drm_clip_rect box,
int  DR1,
int  DR4 
)

Definition at line 405 of file i915_dma.c.

void i915_kernel_lost_context ( struct drm_device dev)

Definition at line 155 of file i915_dma.c.

int i915_master_create ( struct drm_device dev,
struct drm_master *  master 
)

Definition at line 1365 of file i915_dma.c.

void i915_master_destroy ( struct drm_device dev,
struct drm_master *  master 
)

Definition at line 1377 of file i915_dma.c.

void i915_update_dri1_breadcrumb ( struct drm_device dev)

Definition at line 82 of file i915_dma.c.

Variable Documentation

struct drm_ioctl_desc i915_ioctls[]

Definition at line 1847 of file i915_dma.c.

int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls)

Definition at line 1898 of file i915_dma.c.