Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
psb_drv.h File Reference
#include <linux/kref.h>
#include <drm/drmP.h>
#include <drm/drm_global.h>
#include <drm/gma_drm.h>
#include "psb_reg.h"
#include "psb_intel_drv.h"
#include "intel_bios.h"
#include "gtt.h"
#include "power.h"
#include "opregion.h"
#include "oaktrail.h"

Go to the source code of this file.

Data Structures

struct  psb_intel_opregion
 
struct  sdvo_device_mapping
 
struct  intel_gmbus
 
struct  psb_offset
 
struct  psb_pipe
 
struct  psb_state
 
struct  medfield_state
 
struct  cdv_state
 
struct  psb_save_area
 
struct  drm_psb_private
 
struct  psb_ops
 

Macros

#define DRM_MODE_SCALE_NO_SCALE   2
 
#define IS_PSB(dev)   (((dev)->pci_device & 0xfffe) == 0x8108)
 
#define IS_MRST(dev)   (((dev)->pci_device & 0xfffc) == 0x4100)
 
#define IS_MFLD(dev)   (((dev)->pci_device & 0xfff8) == 0x0130)
 
#define DRIVER_NAME   "gma500"
 
#define DRIVER_DESC   "DRM driver for the Intel GMA500"
 
#define PSB_DRM_DRIVER_DATE   "2011-06-06"
 
#define PSB_DRM_DRIVER_MAJOR   1
 
#define PSB_DRM_DRIVER_MINOR   0
 
#define PSB_DRM_DRIVER_PATCHLEVEL   0
 
#define PSB_VDC_OFFSET   0x00000000
 
#define PSB_VDC_SIZE   0x000080000
 
#define MRST_MMIO_SIZE   0x0000C0000
 
#define MDFLD_MMIO_SIZE   0x000100000
 
#define PSB_SGX_SIZE   0x8000
 
#define PSB_SGX_OFFSET   0x00040000
 
#define MRST_SGX_OFFSET   0x00080000
 
#define PSB_MMIO_RESOURCE   0
 
#define PSB_GATT_RESOURCE   2
 
#define PSB_GTT_RESOURCE   3
 
#define PSB_GMCH_CTRL   0x52
 
#define PSB_BSM   0x5C
 
#define _PSB_GMCH_ENABLED   0x4
 
#define PSB_PGETBL_CTL   0x2020
 
#define _PSB_PGETBL_ENABLED   0x00000001
 
#define PSB_SGX_2D_SLAVE_PORT   0x4000
 
#define PSB_TT_PRIV0_LIMIT   (256*1024*1024)
 
#define PSB_TT_PRIV0_PLIMIT   (PSB_TT_PRIV0_LIMIT >> PAGE_SHIFT)
 
#define PSB_MMU_CACHED_MEMORY   0x0001 /* Bind to MMU only */
 
#define PSB_MMU_RO_MEMORY   0x0002 /* MMU RO memory */
 
#define PSB_MMU_WO_MEMORY   0x0004 /* MMU WO memory */
 
#define PSB_PDE_MASK   0x003FFFFF
 
#define PSB_PDE_SHIFT   22
 
#define PSB_PTE_SHIFT   12
 
#define PSB_PTE_VALID   0x0001 /* PTE / PDE valid */
 
#define PSB_PTE_WO   0x0002 /* Write only */
 
#define PSB_PTE_RO   0x0004 /* Read only */
 
#define PSB_PTE_CACHED   0x0008 /* CPU cache coherent */
 
#define PSB_MSVDX_CLOCKGATING   0x2064
 
#define PSB_TOPAZ_CLOCKGATING   0x2068
 
#define PSB_HWSTAM   0x2098
 
#define PSB_INSTPM   0x20C0
 
#define PSB_INT_IDENTITY_R   0x20A4
 
#define _PSB_IRQ_ASLE   (1<<0)
 
#define _MDFLD_PIPEC_EVENT_FLAG   (1<<2)
 
#define _MDFLD_PIPEC_VBLANK_FLAG   (1<<3)
 
#define _PSB_DPST_PIPEB_FLAG   (1<<4)
 
#define _MDFLD_PIPEB_EVENT_FLAG   (1<<4)
 
#define _PSB_VSYNC_PIPEB_FLAG   (1<<5)
 
#define _PSB_DPST_PIPEA_FLAG   (1<<6)
 
#define _PSB_PIPEA_EVENT_FLAG   (1<<6)
 
#define _PSB_VSYNC_PIPEA_FLAG   (1<<7)
 
#define _MDFLD_MIPIA_FLAG   (1<<16)
 
#define _MDFLD_MIPIC_FLAG   (1<<17)
 
#define _PSB_IRQ_DISP_HOTSYNC   (1<<17)
 
#define _PSB_IRQ_SGX_FLAG   (1<<18)
 
#define _PSB_IRQ_MSVDX_FLAG   (1<<19)
 
#define _LNC_IRQ_TOPAZ_FLAG   (1<<20)
 
#define _PSB_PIPE_EVENT_FLAG
 
#define _MDFLD_DISP_ALL_IRQ_FLAG
 
#define PSB_INT_IDENTITY_R   0x20A4
 
#define PSB_INT_MASK_R   0x20A8
 
#define PSB_INT_ENABLE_R   0x20A0
 
#define _PSB_MMU_ER_MASK   0x0001FF00
 
#define _PSB_MMU_ER_HOST   (1 << 16)
 
#define GPIOA   0x5010
 
#define GPIOB   0x5014
 
#define GPIOC   0x5018
 
#define GPIOD   0x501c
 
#define GPIOE   0x5020
 
#define GPIOF   0x5024
 
#define GPIOG   0x5028
 
#define GPIOH   0x502c
 
#define GPIO_CLOCK_DIR_MASK   (1 << 0)
 
#define GPIO_CLOCK_DIR_IN   (0 << 1)
 
#define GPIO_CLOCK_DIR_OUT   (1 << 1)
 
#define GPIO_CLOCK_VAL_MASK   (1 << 2)
 
#define GPIO_CLOCK_VAL_OUT   (1 << 3)
 
#define GPIO_CLOCK_VAL_IN   (1 << 4)
 
#define GPIO_CLOCK_PULLUP_DISABLE   (1 << 5)
 
#define GPIO_DATA_DIR_MASK   (1 << 8)
 
#define GPIO_DATA_DIR_IN   (0 << 9)
 
#define GPIO_DATA_DIR_OUT   (1 << 9)
 
#define GPIO_DATA_VAL_MASK   (1 << 10)
 
#define GPIO_DATA_VAL_OUT   (1 << 11)
 
#define GPIO_DATA_VAL_IN   (1 << 12)
 
#define GPIO_DATA_PULLUP_DISABLE   (1 << 13)
 
#define VCLK_DIVISOR_VGA0   0x6000
 
#define VCLK_DIVISOR_VGA1   0x6004
 
#define VCLK_POST_DIV   0x6010
 
#define PSB_COMM_2D   (PSB_ENGINE_2D << 4)
 
#define PSB_COMM_3D   (PSB_ENGINE_3D << 4)
 
#define PSB_COMM_TA   (PSB_ENGINE_TA << 4)
 
#define PSB_COMM_HP   (PSB_ENGINE_HP << 4)
 
#define PSB_COMM_USER_IRQ   (1024 >> 2)
 
#define PSB_COMM_USER_IRQ_LOST   (PSB_COMM_USER_IRQ + 1)
 
#define PSB_COMM_FW   (2048 >> 2)
 
#define PSB_UIRQ_VISTEST   1
 
#define PSB_UIRQ_OOM_REPLY   2
 
#define PSB_UIRQ_FIRE_TA_REPLY   3
 
#define PSB_UIRQ_FIRE_RASTER_REPLY   4
 
#define PSB_2D_SIZE   (256*1024*1024)
 
#define PSB_MAX_RELOC_PAGES   1024
 
#define PSB_LOW_REG_OFFS   0x0204
 
#define PSB_HIGH_REG_OFFS   0x0600
 
#define PSB_NUM_VBLANKS   2
 
#define PSB_2D_SIZE   (256*1024*1024)
 
#define PSB_MAX_RELOC_PAGES   1024
 
#define PSB_LOW_REG_OFFS   0x0204
 
#define PSB_HIGH_REG_OFFS   0x0600
 
#define PSB_NUM_VBLANKS   2
 
#define PSB_WATCHDOG_DELAY   (DRM_HZ * 2)
 
#define PSB_LID_DELAY   (DRM_HZ / 10)
 
#define MDFLD_PNW_B0   0x04
 
#define MDFLD_PNW_C0   0x08
 
#define MDFLD_DSR_2D_3D_0   (1 << 0)
 
#define MDFLD_DSR_2D_3D_2   (1 << 1)
 
#define MDFLD_DSR_CURSOR_0   (1 << 2)
 
#define MDFLD_DSR_CURSOR_2   (1 << 3)
 
#define MDFLD_DSR_OVERLAY_0   (1 << 4)
 
#define MDFLD_DSR_OVERLAY_2   (1 << 5)
 
#define MDFLD_DSR_MIPI_CONTROL   (1 << 6)
 
#define MDFLD_DSR_DAMAGE_MASK_0   ((1 << 0) | (1 << 2) | (1 << 4))
 
#define MDFLD_DSR_DAMAGE_MASK_2   ((1 << 1) | (1 << 3) | (1 << 5))
 
#define MDFLD_DSR_2D_3D   (MDFLD_DSR_2D_3D_0 | MDFLD_DSR_2D_3D_2)
 
#define MDFLD_DSR_RR   45
 
#define MDFLD_DPU_ENABLE   (1 << 31)
 
#define MDFLD_DSR_FULLSCREEN   (1 << 30)
 
#define MDFLD_DSR_DELAY   (DRM_HZ / MDFLD_DSR_RR)
 
#define PSB_PWR_STATE_ON   1
 
#define PSB_PWR_STATE_OFF   2
 
#define PSB_PMPOLICY_NOPM   0
 
#define PSB_PMPOLICY_CLOCKGATING   1
 
#define PSB_PMPOLICY_POWERDOWN   2
 
#define PSB_PMSTATE_POWERUP   0
 
#define PSB_PMSTATE_CLOCKGATED   1
 
#define PSB_PMSTATE_POWERDOWN   2
 
#define PSB_PCIx_MSI_ADDR_LOC   0x94
 
#define PSB_PCIx_MSI_DATA_LOC   0x98
 
#define KSEL_CRYSTAL_19   1
 
#define KSEL_BYPASS_19   5
 
#define KSEL_BYPASS_25   6
 
#define KSEL_BYPASS_83_100   7
 
#define PSB_NUM_PIPE   3
 
#define PSB_D_GENERAL   (1 << 0)
 
#define PSB_D_INIT   (1 << 1)
 
#define PSB_D_IRQ   (1 << 2)
 
#define PSB_D_ENTRY   (1 << 3)
 
#define PSB_D_HV   (1 << 4)
 
#define PSB_D_DBI_BF   (1 << 5)
 
#define PSB_D_PM   (1 << 6)
 
#define PSB_D_RENDER   (1 << 7)
 
#define PSB_D_REG   (1 << 8)
 
#define PSB_D_MSVDX   (1 << 9)
 
#define PSB_D_TOPAZ   (1 << 10)
 
#define REG_READ(reg)   REGISTER_READ(dev, (reg))
 
#define REG_WRITE(reg, val)   REGISTER_WRITE(dev, (reg), (val))
 
#define REG_WRITE16(reg, val)   REGISTER_WRITE16(dev, (reg), (val))
 
#define REG_WRITE8(reg, val)   REGISTER_WRITE8(dev, (reg), (val))
 
#define PSB_WVDC32(_val, _offs)   iowrite32(_val, dev_priv->vdc_reg + (_offs))
 
#define PSB_RVDC32(_offs)   ioread32(dev_priv->vdc_reg + (_offs))
 
#define PSB_RSGX32(_offs)   ioread32(dev_priv->sgx_reg + (_offs))
 
#define PSB_WSGX32(_val, _offs)   iowrite32(_val, dev_priv->sgx_reg + (_offs))
 
#define MSVDX_REG_DUMP   0
 
#define PSB_WMSVDX32(_val, _offs)   iowrite32(_val, dev_priv->msvdx_reg + (_offs))
 
#define PSB_RMSVDX32(_offs)   ioread32(dev_priv->msvdx_reg + (_offs))
 

Enumerations

enum  { CHIP_PSB_8108 = 0, CHIP_PSB_8109 = 1, CHIP_MRST_4100 = 2, CHIP_MFLD_0130 = 3 }
 

Functions

int drm_crtc_probe_output_modes (struct drm_device *dev, int, int)
 
int drm_pick_crtcs (struct drm_device *dev)
 
struct psb_mmu_driverpsb_mmu_driver_init (uint8_t __iomem *registers, int trap_pagefaults, int invalid_type, struct drm_psb_private *dev_priv)
 
void psb_mmu_driver_takedown (struct psb_mmu_driver *driver)
 
struct psb_mmu_pdpsb_mmu_get_default_pd (struct psb_mmu_driver *driver)
 
void psb_mmu_mirror_gtt (struct psb_mmu_pd *pd, uint32_t mmu_offset, uint32_t gtt_start, uint32_t gtt_pages)
 
struct psb_mmu_pdpsb_mmu_alloc_pd (struct psb_mmu_driver *driver, int trap_pagefaults, int invalid_type)
 
void psb_mmu_free_pagedir (struct psb_mmu_pd *pd)
 
void psb_mmu_flush (struct psb_mmu_driver *driver, int rc_prot)
 
void psb_mmu_remove_pfn_sequence (struct psb_mmu_pd *pd, unsigned long address, uint32_t num_pages)
 
int psb_mmu_insert_pfn_sequence (struct psb_mmu_pd *pd, uint32_t start_pfn, unsigned long address, uint32_t num_pages, int type)
 
int psb_mmu_virtual_to_pfn (struct psb_mmu_pd *pd, uint32_t virtual, unsigned long *pfn)
 
void psb_mmu_set_pd_context (struct psb_mmu_pd *pd, int hw_context)
 
int psb_mmu_insert_pages (struct psb_mmu_pd *pd, struct page **pages, unsigned long address, uint32_t num_pages, uint32_t desired_tile_stride, uint32_t hw_tile_stride, int type)
 
void psb_mmu_remove_pages (struct psb_mmu_pd *pd, unsigned long address, uint32_t num_pages, uint32_t desired_tile_stride, uint32_t hw_tile_stride)
 
irqreturn_t psb_irq_handler (DRM_IRQ_ARGS)
 
int psb_irq_enable_dpst (struct drm_device *dev)
 
int psb_irq_disable_dpst (struct drm_device *dev)
 
void psb_irq_preinstall (struct drm_device *dev)
 
int psb_irq_postinstall (struct drm_device *dev)
 
void psb_irq_uninstall (struct drm_device *dev)
 
void psb_irq_turn_on_dpst (struct drm_device *dev)
 
void psb_irq_turn_off_dpst (struct drm_device *dev)
 
void psb_irq_uninstall_islands (struct drm_device *dev, int hw_islands)
 
int psb_vblank_wait2 (struct drm_device *dev, unsigned int *sequence)
 
int psb_vblank_wait (struct drm_device *dev, unsigned int *sequence)
 
int psb_enable_vblank (struct drm_device *dev, int crtc)
 
void psb_disable_vblank (struct drm_device *dev, int crtc)
 
void psb_enable_pipestat (struct drm_psb_private *dev_priv, int pipe, u32 mask)
 
void psb_disable_pipestat (struct drm_psb_private *dev_priv, int pipe, u32 mask)
 
u32 psb_get_vblank_counter (struct drm_device *dev, int crtc)
 
int psbfb_probed (struct drm_device *dev)
 
int psbfb_remove (struct drm_device *dev, struct drm_framebuffer *fb)
 
void psbfb_copyarea (struct fb_info *info, const struct fb_copyarea *region)
 
int psbfb_sync (struct fb_info *info)
 
void psb_spank (struct drm_psb_private *dev_priv)
 
void psb_lid_timer_init (struct drm_psb_private *dev_priv)
 
void psb_lid_timer_takedown (struct drm_psb_private *dev_priv)
 
void psb_print_pagefault (struct drm_psb_private *dev_priv)
 
void psb_modeset_init (struct drm_device *dev)
 
void psb_modeset_cleanup (struct drm_device *dev)
 
int psb_fbdev_init (struct drm_device *dev)
 
int gma_backlight_init (struct drm_device *dev)
 
void gma_backlight_exit (struct drm_device *dev)
 
void gma_backlight_disable (struct drm_device *dev)
 
void gma_backlight_enable (struct drm_device *dev)
 
void gma_backlight_set (struct drm_device *dev, int v)
 
void oaktrail_lvds_init (struct drm_device *dev, struct psb_intel_mode_device *mode_dev)
 
int psb_gem_init_object (struct drm_gem_object *obj)
 
void psb_gem_free_object (struct drm_gem_object *obj)
 
int psb_gem_get_aperture (struct drm_device *dev, void *data, struct drm_file *file)
 
int psb_gem_dumb_create (struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args)
 
int psb_gem_dumb_destroy (struct drm_file *file, struct drm_device *dev, uint32_t handle)
 
int psb_gem_dumb_map_gtt (struct drm_file *file, struct drm_device *dev, uint32_t handle, uint64_t *offset)
 
int psb_gem_fault (struct vm_area_struct *vma, struct vm_fault *vmf)
 
int psb_gem_create_ioctl (struct drm_device *dev, void *data, struct drm_file *file)
 
int psb_gem_mmap_ioctl (struct drm_device *dev, void *data, struct drm_file *file)
 

Variables

struct drm_crtc_helper_funcs oaktrail_helper_funcs
 
struct drm_crtc_helper_funcs psb_intel_helper_funcs
 
struct drm_crtc_funcs psb_intel_crtc_funcs
 
struct drm_connector_helper_funcs psb_intel_lvds_connector_helper_funcs
 
struct drm_connector_funcs psb_intel_lvds_connector_funcs
 
struct psb_ops psb_chip_ops
 
struct psb_ops oaktrail_chip_ops
 
struct psb_ops mdfld_chip_ops
 
struct psb_ops cdv_chip_ops
 
int drm_psb_no_fb
 
int drm_idle_check_interval
 

Macro Definition Documentation

#define _LNC_IRQ_TOPAZ_FLAG   (1<<20)

Definition at line 138 of file psb_drv.h.

#define _MDFLD_DISP_ALL_IRQ_FLAG
Value:
_MDFLD_PIPEB_EVENT_FLAG | \
_PSB_PIPEA_EVENT_FLAG | \
_PSB_VSYNC_PIPEA_FLAG | \
_MDFLD_MIPIA_FLAG | \
_MDFLD_MIPIC_FLAG)

Definition at line 144 of file psb_drv.h.

#define _MDFLD_MIPIA_FLAG   (1<<16)

Definition at line 133 of file psb_drv.h.

#define _MDFLD_MIPIC_FLAG   (1<<17)

Definition at line 134 of file psb_drv.h.

#define _MDFLD_PIPEB_EVENT_FLAG   (1<<4)

Definition at line 128 of file psb_drv.h.

#define _MDFLD_PIPEC_EVENT_FLAG   (1<<2)

Definition at line 125 of file psb_drv.h.

#define _MDFLD_PIPEC_VBLANK_FLAG   (1<<3)

Definition at line 126 of file psb_drv.h.

#define _PSB_DPST_PIPEA_FLAG   (1<<6)

Definition at line 130 of file psb_drv.h.

#define _PSB_DPST_PIPEB_FLAG   (1<<4)

Definition at line 127 of file psb_drv.h.

#define _PSB_GMCH_ENABLED   0x4

Definition at line 83 of file psb_drv.h.

#define _PSB_IRQ_ASLE   (1<<0)

Definition at line 124 of file psb_drv.h.

#define _PSB_IRQ_DISP_HOTSYNC   (1<<17)

Definition at line 135 of file psb_drv.h.

#define _PSB_IRQ_MSVDX_FLAG   (1<<19)

Definition at line 137 of file psb_drv.h.

#define _PSB_IRQ_SGX_FLAG   (1<<18)

Definition at line 136 of file psb_drv.h.

#define _PSB_MMU_ER_HOST   (1 << 16)

Definition at line 155 of file psb_drv.h.

#define _PSB_MMU_ER_MASK   0x0001FF00

Definition at line 154 of file psb_drv.h.

#define _PSB_PGETBL_ENABLED   0x00000001

Definition at line 85 of file psb_drv.h.

#define _PSB_PIPE_EVENT_FLAG
Value:
_PSB_VSYNC_PIPEB_FLAG)

Definition at line 140 of file psb_drv.h.

#define _PSB_PIPEA_EVENT_FLAG   (1<<6)

Definition at line 131 of file psb_drv.h.

#define _PSB_VSYNC_PIPEA_FLAG   (1<<7)

Definition at line 132 of file psb_drv.h.

#define _PSB_VSYNC_PIPEB_FLAG   (1<<5)

Definition at line 129 of file psb_drv.h.

#define DRIVER_DESC   "DRM driver for the Intel GMA500"

Definition at line 55 of file psb_drv.h.

#define DRIVER_NAME   "gma500"

Definition at line 54 of file psb_drv.h.

#define DRM_MODE_SCALE_NO_SCALE   2

Definition at line 37 of file psb_drv.h.

#define GPIO_CLOCK_DIR_IN   (0 << 1)

Definition at line 165 of file psb_drv.h.

#define GPIO_CLOCK_DIR_MASK   (1 << 0)

Definition at line 164 of file psb_drv.h.

#define GPIO_CLOCK_DIR_OUT   (1 << 1)

Definition at line 166 of file psb_drv.h.

#define GPIO_CLOCK_PULLUP_DISABLE   (1 << 5)

Definition at line 170 of file psb_drv.h.

#define GPIO_CLOCK_VAL_IN   (1 << 4)

Definition at line 169 of file psb_drv.h.

#define GPIO_CLOCK_VAL_MASK   (1 << 2)

Definition at line 167 of file psb_drv.h.

#define GPIO_CLOCK_VAL_OUT   (1 << 3)

Definition at line 168 of file psb_drv.h.

#define GPIO_DATA_DIR_IN   (0 << 9)

Definition at line 172 of file psb_drv.h.

#define GPIO_DATA_DIR_MASK   (1 << 8)

Definition at line 171 of file psb_drv.h.

#define GPIO_DATA_DIR_OUT   (1 << 9)

Definition at line 173 of file psb_drv.h.

#define GPIO_DATA_PULLUP_DISABLE   (1 << 13)

Definition at line 177 of file psb_drv.h.

#define GPIO_DATA_VAL_IN   (1 << 12)

Definition at line 176 of file psb_drv.h.

#define GPIO_DATA_VAL_MASK   (1 << 10)

Definition at line 174 of file psb_drv.h.

#define GPIO_DATA_VAL_OUT   (1 << 11)

Definition at line 175 of file psb_drv.h.

#define GPIOA   0x5010

Definition at line 156 of file psb_drv.h.

#define GPIOB   0x5014

Definition at line 157 of file psb_drv.h.

#define GPIOC   0x5018

Definition at line 158 of file psb_drv.h.

#define GPIOD   0x501c

Definition at line 159 of file psb_drv.h.

#define GPIOE   0x5020

Definition at line 160 of file psb_drv.h.

#define GPIOF   0x5024

Definition at line 161 of file psb_drv.h.

#define GPIOG   0x5028

Definition at line 162 of file psb_drv.h.

#define GPIOH   0x502c

Definition at line 163 of file psb_drv.h.

#define IS_MFLD (   dev)    (((dev)->pci_device & 0xfff8) == 0x0130)

Definition at line 48 of file psb_drv.h.

#define IS_MRST (   dev)    (((dev)->pci_device & 0xfffc) == 0x4100)

Definition at line 47 of file psb_drv.h.

#define IS_PSB (   dev)    (((dev)->pci_device & 0xfffe) == 0x8108)

Definition at line 46 of file psb_drv.h.

#define KSEL_BYPASS_19   5

Definition at line 249 of file psb_drv.h.

#define KSEL_BYPASS_25   6

Definition at line 250 of file psb_drv.h.

#define KSEL_BYPASS_83_100   7

Definition at line 251 of file psb_drv.h.

#define KSEL_CRYSTAL_19   1

Definition at line 248 of file psb_drv.h.

#define MDFLD_DPU_ENABLE   (1 << 31)

Definition at line 230 of file psb_drv.h.

#define MDFLD_DSR_2D_3D   (MDFLD_DSR_2D_3D_0 | MDFLD_DSR_2D_3D_2)

Definition at line 227 of file psb_drv.h.

#define MDFLD_DSR_2D_3D_0   (1 << 0)

Definition at line 218 of file psb_drv.h.

#define MDFLD_DSR_2D_3D_2   (1 << 1)

Definition at line 219 of file psb_drv.h.

#define MDFLD_DSR_CURSOR_0   (1 << 2)

Definition at line 220 of file psb_drv.h.

#define MDFLD_DSR_CURSOR_2   (1 << 3)

Definition at line 221 of file psb_drv.h.

#define MDFLD_DSR_DAMAGE_MASK_0   ((1 << 0) | (1 << 2) | (1 << 4))

Definition at line 225 of file psb_drv.h.

#define MDFLD_DSR_DAMAGE_MASK_2   ((1 << 1) | (1 << 3) | (1 << 5))

Definition at line 226 of file psb_drv.h.

#define MDFLD_DSR_DELAY   (DRM_HZ / MDFLD_DSR_RR)

Definition at line 232 of file psb_drv.h.

#define MDFLD_DSR_FULLSCREEN   (1 << 30)

Definition at line 231 of file psb_drv.h.

#define MDFLD_DSR_MIPI_CONTROL   (1 << 6)

Definition at line 224 of file psb_drv.h.

#define MDFLD_DSR_OVERLAY_0   (1 << 4)

Definition at line 222 of file psb_drv.h.

#define MDFLD_DSR_OVERLAY_2   (1 << 5)

Definition at line 223 of file psb_drv.h.

#define MDFLD_DSR_RR   45

Definition at line 229 of file psb_drv.h.

#define MDFLD_MMIO_SIZE   0x000100000

Definition at line 68 of file psb_drv.h.

#define MDFLD_PNW_B0   0x04

Definition at line 215 of file psb_drv.h.

#define MDFLD_PNW_C0   0x08

Definition at line 216 of file psb_drv.h.

#define MRST_MMIO_SIZE   0x0000C0000

Definition at line 67 of file psb_drv.h.

#define MRST_SGX_OFFSET   0x00080000

Definition at line 71 of file psb_drv.h.

#define MSVDX_REG_DUMP   0

Definition at line 978 of file psb_drv.h.

#define PSB_2D_SIZE   (256*1024*1024)

Definition at line 205 of file psb_drv.h.

#define PSB_2D_SIZE   (256*1024*1024)

Definition at line 205 of file psb_drv.h.

#define PSB_BSM   0x5C

Definition at line 82 of file psb_drv.h.

#define PSB_COMM_2D   (PSB_ENGINE_2D << 4)

Definition at line 183 of file psb_drv.h.

#define PSB_COMM_3D   (PSB_ENGINE_3D << 4)

Definition at line 184 of file psb_drv.h.

#define PSB_COMM_FW   (2048 >> 2)

Definition at line 189 of file psb_drv.h.

#define PSB_COMM_HP   (PSB_ENGINE_HP << 4)

Definition at line 186 of file psb_drv.h.

#define PSB_COMM_TA   (PSB_ENGINE_TA << 4)

Definition at line 185 of file psb_drv.h.

#define PSB_COMM_USER_IRQ   (1024 >> 2)

Definition at line 187 of file psb_drv.h.

#define PSB_COMM_USER_IRQ_LOST   (PSB_COMM_USER_IRQ + 1)

Definition at line 188 of file psb_drv.h.

#define PSB_D_DBI_BF   (1 << 5)

Definition at line 872 of file psb_drv.h.

#define PSB_D_ENTRY   (1 << 3)

Definition at line 869 of file psb_drv.h.

#define PSB_D_GENERAL   (1 << 0)

Definition at line 866 of file psb_drv.h.

#define PSB_D_HV   (1 << 4)

Definition at line 871 of file psb_drv.h.

#define PSB_D_INIT   (1 << 1)

Definition at line 867 of file psb_drv.h.

#define PSB_D_IRQ   (1 << 2)

Definition at line 868 of file psb_drv.h.

#define PSB_D_MSVDX   (1 << 9)

Definition at line 876 of file psb_drv.h.

#define PSB_D_PM   (1 << 6)

Definition at line 873 of file psb_drv.h.

#define PSB_D_REG   (1 << 8)

Definition at line 875 of file psb_drv.h.

#define PSB_D_RENDER   (1 << 7)

Definition at line 874 of file psb_drv.h.

#define PSB_D_TOPAZ   (1 << 10)

Definition at line 877 of file psb_drv.h.

#define PSB_DRM_DRIVER_DATE   "2011-06-06"

Definition at line 57 of file psb_drv.h.

#define PSB_DRM_DRIVER_MAJOR   1

Definition at line 58 of file psb_drv.h.

#define PSB_DRM_DRIVER_MINOR   0

Definition at line 59 of file psb_drv.h.

#define PSB_DRM_DRIVER_PATCHLEVEL   0

Definition at line 60 of file psb_drv.h.

#define PSB_GATT_RESOURCE   2

Definition at line 76 of file psb_drv.h.

#define PSB_GMCH_CTRL   0x52

Definition at line 81 of file psb_drv.h.

#define PSB_GTT_RESOURCE   3

Definition at line 77 of file psb_drv.h.

#define PSB_HIGH_REG_OFFS   0x0600

Definition at line 209 of file psb_drv.h.

#define PSB_HIGH_REG_OFFS   0x0600

Definition at line 209 of file psb_drv.h.

#define PSB_HWSTAM   0x2098

Definition at line 121 of file psb_drv.h.

#define PSB_INSTPM   0x20C0

Definition at line 122 of file psb_drv.h.

#define PSB_INT_ENABLE_R   0x20A0

Definition at line 152 of file psb_drv.h.

#define PSB_INT_IDENTITY_R   0x20A4

Definition at line 150 of file psb_drv.h.

#define PSB_INT_IDENTITY_R   0x20A4

Definition at line 150 of file psb_drv.h.

#define PSB_INT_MASK_R   0x20A8

Definition at line 151 of file psb_drv.h.

#define PSB_LID_DELAY   (DRM_HZ / 10)

Definition at line 213 of file psb_drv.h.

#define PSB_LOW_REG_OFFS   0x0204

Definition at line 208 of file psb_drv.h.

#define PSB_LOW_REG_OFFS   0x0204

Definition at line 208 of file psb_drv.h.

#define PSB_MAX_RELOC_PAGES   1024

Definition at line 206 of file psb_drv.h.

#define PSB_MAX_RELOC_PAGES   1024

Definition at line 206 of file psb_drv.h.

#define PSB_MMIO_RESOURCE   0

Definition at line 75 of file psb_drv.h.

#define PSB_MMU_CACHED_MEMORY   0x0001 /* Bind to MMU only */

Definition at line 99 of file psb_drv.h.

#define PSB_MMU_RO_MEMORY   0x0002 /* MMU RO memory */

Definition at line 100 of file psb_drv.h.

#define PSB_MMU_WO_MEMORY   0x0004 /* MMU WO memory */

Definition at line 101 of file psb_drv.h.

#define PSB_MSVDX_CLOCKGATING   0x2064

Definition at line 119 of file psb_drv.h.

#define PSB_NUM_PIPE   3

Definition at line 452 of file psb_drv.h.

#define PSB_NUM_VBLANKS   2

Definition at line 211 of file psb_drv.h.

#define PSB_NUM_VBLANKS   2

Definition at line 211 of file psb_drv.h.

#define PSB_PCIx_MSI_ADDR_LOC   0x94

Definition at line 244 of file psb_drv.h.

#define PSB_PCIx_MSI_DATA_LOC   0x98

Definition at line 245 of file psb_drv.h.

#define PSB_PDE_MASK   0x003FFFFF

Definition at line 105 of file psb_drv.h.

#define PSB_PDE_SHIFT   22

Definition at line 106 of file psb_drv.h.

#define PSB_PGETBL_CTL   0x2020

Definition at line 84 of file psb_drv.h.

#define PSB_PMPOLICY_CLOCKGATING   1

Definition at line 238 of file psb_drv.h.

#define PSB_PMPOLICY_NOPM   0

Definition at line 237 of file psb_drv.h.

#define PSB_PMPOLICY_POWERDOWN   2

Definition at line 239 of file psb_drv.h.

#define PSB_PMSTATE_CLOCKGATED   1

Definition at line 242 of file psb_drv.h.

#define PSB_PMSTATE_POWERDOWN   2

Definition at line 243 of file psb_drv.h.

#define PSB_PMSTATE_POWERUP   0

Definition at line 241 of file psb_drv.h.

#define PSB_PTE_CACHED   0x0008 /* CPU cache coherent */

Definition at line 114 of file psb_drv.h.

#define PSB_PTE_RO   0x0004 /* Read only */

Definition at line 113 of file psb_drv.h.

#define PSB_PTE_SHIFT   12

Definition at line 107 of file psb_drv.h.

#define PSB_PTE_VALID   0x0001 /* PTE / PDE valid */

Definition at line 111 of file psb_drv.h.

#define PSB_PTE_WO   0x0002 /* Write only */

Definition at line 112 of file psb_drv.h.

#define PSB_PWR_STATE_OFF   2

Definition at line 235 of file psb_drv.h.

#define PSB_PWR_STATE_ON   1

Definition at line 234 of file psb_drv.h.

#define PSB_RMSVDX32 (   _offs)    ioread32(dev_priv->msvdx_reg + (_offs))

Definition at line 981 of file psb_drv.h.

#define PSB_RSGX32 (   _offs)    ioread32(dev_priv->sgx_reg + (_offs))

Definition at line 974 of file psb_drv.h.

#define PSB_RVDC32 (   _offs)    ioread32(dev_priv->vdc_reg + (_offs))

Definition at line 959 of file psb_drv.h.

#define PSB_SGX_2D_SLAVE_PORT   0x4000

Definition at line 86 of file psb_drv.h.

#define PSB_SGX_OFFSET   0x00040000

Definition at line 70 of file psb_drv.h.

#define PSB_SGX_SIZE   0x8000

Definition at line 69 of file psb_drv.h.

#define PSB_TOPAZ_CLOCKGATING   0x2068

Definition at line 120 of file psb_drv.h.

#define PSB_TT_PRIV0_LIMIT   (256*1024*1024)

Definition at line 89 of file psb_drv.h.

#define PSB_TT_PRIV0_PLIMIT   (PSB_TT_PRIV0_LIMIT >> PAGE_SHIFT)

Definition at line 90 of file psb_drv.h.

#define PSB_UIRQ_FIRE_RASTER_REPLY   4

Definition at line 194 of file psb_drv.h.

#define PSB_UIRQ_FIRE_TA_REPLY   3

Definition at line 193 of file psb_drv.h.

#define PSB_UIRQ_OOM_REPLY   2

Definition at line 192 of file psb_drv.h.

#define PSB_UIRQ_VISTEST   1

Definition at line 191 of file psb_drv.h.

#define PSB_VDC_OFFSET   0x00000000

Definition at line 65 of file psb_drv.h.

#define PSB_VDC_SIZE   0x000080000

Definition at line 66 of file psb_drv.h.

#define PSB_WATCHDOG_DELAY   (DRM_HZ * 2)

Definition at line 212 of file psb_drv.h.

#define PSB_WMSVDX32 (   _val,
  _offs 
)    iowrite32(_val, dev_priv->msvdx_reg + (_offs))

Definition at line 980 of file psb_drv.h.

#define PSB_WSGX32 (   _val,
  _offs 
)    iowrite32(_val, dev_priv->sgx_reg + (_offs))

Definition at line 976 of file psb_drv.h.

#define PSB_WVDC32 (   _val,
  _offs 
)    iowrite32(_val, dev_priv->vdc_reg + (_offs))

Definition at line 958 of file psb_drv.h.

#define REG_READ (   reg)    REGISTER_READ(dev, (reg))

Definition at line 929 of file psb_drv.h.

#define REG_WRITE (   reg,
  val 
)    REGISTER_WRITE(dev, (reg), (val))

Definition at line 938 of file psb_drv.h.

#define REG_WRITE16 (   reg,
  val 
)    REGISTER_WRITE16(dev, (reg), (val))

Definition at line 947 of file psb_drv.h.

#define REG_WRITE8 (   reg,
  val 
)    REGISTER_WRITE8(dev, (reg), (val))

Definition at line 956 of file psb_drv.h.

#define VCLK_DIVISOR_VGA0   0x6000

Definition at line 179 of file psb_drv.h.

#define VCLK_DIVISOR_VGA1   0x6004

Definition at line 180 of file psb_drv.h.

#define VCLK_POST_DIV   0x6010

Definition at line 181 of file psb_drv.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
CHIP_PSB_8108 
CHIP_PSB_8109 
CHIP_MRST_4100 
CHIP_MFLD_0130 

Definition at line 39 of file psb_drv.h.

Function Documentation

int drm_crtc_probe_output_modes ( struct drm_device dev,
int  ,
int   
)
int drm_pick_crtcs ( struct drm_device dev)
void gma_backlight_disable ( struct drm_device dev)

Definition at line 49 of file backlight.c.

void gma_backlight_enable ( struct drm_device dev)

Definition at line 37 of file backlight.c.

void gma_backlight_exit ( struct drm_device dev)

Definition at line 84 of file backlight.c.

int gma_backlight_init ( struct drm_device dev)

Definition at line 73 of file backlight.c.

void gma_backlight_set ( struct drm_device dev,
int  v 
)

Definition at line 61 of file backlight.c.

void oaktrail_lvds_init ( struct drm_device dev,
struct psb_intel_mode_device mode_dev 
)

oaktrail_lvds_init - setup LVDS connectors on this device : drm device

Create the connector, register the LVDS DDC bus, and try to figure out what modes we can display on the LVDS panel (if present).

Definition at line 325 of file oaktrail_lvds.c.

void psb_disable_pipestat ( struct drm_psb_private dev_priv,
int  pipe,
u32  mask 
)

Definition at line 103 of file psb_irq.c.

void psb_disable_vblank ( struct drm_device dev,
int  crtc 
)

Definition at line 510 of file psb_irq.c.

void psb_enable_pipestat ( struct drm_psb_private dev_priv,
int  pipe,
u32  mask 
)

Definition at line 86 of file psb_irq.c.

int psb_enable_vblank ( struct drm_device dev,
int  crtc 
)

Definition at line 471 of file psb_irq.c.

int psb_fbdev_init ( struct drm_device dev)

Definition at line 600 of file framebuffer.c.

int psb_gem_create_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file 
)

Definition at line 276 of file gem.c.

int psb_gem_dumb_create ( struct drm_file *  file,
struct drm_device dev,
struct drm_mode_create_dumb args 
)

psb_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 159 of file gem.c.

int psb_gem_dumb_destroy ( struct drm_file *  file,
struct drm_device dev,
uint32_t  handle 
)

Definition at line 177 of file gem.c.

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

Definition at line 64 of file gem.c.

int psb_gem_fault ( struct vm_area_struct vma,
struct vm_fault *  vmf 
)

psb_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.

This code eventually needs to handle faulting objects in and out of the GTT and repacking it when we run out of space. We can put that off for now and for our simple uses

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 201 of file gem.c.

void psb_gem_free_object ( struct drm_gem_object *  obj)

Definition at line 36 of file gem.c.

int psb_gem_get_aperture ( struct drm_device dev,
void data,
struct drm_file *  file 
)

Definition at line 49 of file gem.c.

int psb_gem_init_object ( struct drm_gem_object *  obj)

Definition at line 31 of file gem.c.

int psb_gem_mmap_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file 
)

Definition at line 292 of file gem.c.

u32 psb_get_vblank_counter ( struct drm_device dev,
int  crtc 
)

Definition at line 583 of file psb_irq.c.

int psb_irq_disable_dpst ( struct drm_device dev)

Definition at line 437 of file psb_irq.c.

int psb_irq_enable_dpst ( struct drm_device dev)

Definition at line 399 of file psb_irq.c.

irqreturn_t psb_irq_handler ( DRM_IRQ_ARGS  )

Definition at line 203 of file psb_irq.c.

int psb_irq_postinstall ( struct drm_device dev)

Definition at line 296 of file psb_irq.c.

void psb_irq_preinstall ( struct drm_device dev)

Definition at line 264 of file psb_irq.c.

void psb_irq_turn_off_dpst ( struct drm_device dev)

Definition at line 415 of file psb_irq.c.

void psb_irq_turn_on_dpst ( struct drm_device dev)

Definition at line 366 of file psb_irq.c.

void psb_irq_uninstall ( struct drm_device dev)

Definition at line 330 of file psb_irq.c.

void psb_irq_uninstall_islands ( struct drm_device dev,
int  hw_islands 
)
void psb_lid_timer_init ( struct drm_psb_private dev_priv)

Definition at line 72 of file psb_lid.c.

void psb_lid_timer_takedown ( struct drm_psb_private dev_priv)

Definition at line 90 of file psb_lid.c.

struct psb_mmu_pd* psb_mmu_alloc_pd ( struct psb_mmu_driver driver,
int  trap_pagefaults,
int  invalid_type 
)
read

Definition at line 205 of file mmu.c.

struct psb_mmu_driver* psb_mmu_driver_init ( uint8_t __iomem registers,
int  trap_pagefaults,
int  invalid_type,
struct drm_psb_private dev_priv 
)
read

Definition at line 497 of file mmu.c.

void psb_mmu_driver_takedown ( struct psb_mmu_driver driver)

Definition at line 491 of file mmu.c.

void psb_mmu_flush ( struct psb_mmu_driver driver,
int  rc_prot 
)

Definition at line 163 of file mmu.c.

void psb_mmu_free_pagedir ( struct psb_mmu_pd pd)

Definition at line 279 of file mmu.c.

struct psb_mmu_pd* psb_mmu_get_default_pd ( struct psb_mmu_driver driver)
read

Definition at line 480 of file mmu.c.

int psb_mmu_insert_pages ( struct psb_mmu_pd pd,
struct page **  pages,
unsigned long  address,
uint32_t  num_pages,
uint32_t  desired_tile_stride,
uint32_t  hw_tile_stride,
int  type 
)

Definition at line 742 of file mmu.c.

int psb_mmu_insert_pfn_sequence ( struct psb_mmu_pd pd,
uint32_t  start_pfn,
unsigned long  address,
uint32_t  num_pages,
int  type 
)

Definition at line 697 of file mmu.c.

void psb_mmu_mirror_gtt ( struct psb_mmu_pd pd,
uint32_t  mmu_offset,
uint32_t  gtt_start,
uint32_t  gtt_pages 
)

Definition at line 448 of file mmu.c.

void psb_mmu_remove_pages ( struct psb_mmu_pd pd,
unsigned long  address,
uint32_t  num_pages,
uint32_t  desired_tile_stride,
uint32_t  hw_tile_stride 
)

Definition at line 641 of file mmu.c.

void psb_mmu_remove_pfn_sequence ( struct psb_mmu_pd pd,
unsigned long  address,
uint32_t  num_pages 
)

Definition at line 602 of file mmu.c.

void psb_mmu_set_pd_context ( struct psb_mmu_pd pd,
int  hw_context 
)

Definition at line 171 of file mmu.c.

int psb_mmu_virtual_to_pfn ( struct psb_mmu_pd pd,
uint32_t  virtual,
unsigned long pfn 
)

Definition at line 810 of file mmu.c.

void psb_modeset_cleanup ( struct drm_device dev)

Definition at line 813 of file framebuffer.c.

void psb_modeset_init ( struct drm_device dev)

Definition at line 780 of file framebuffer.c.

void psb_print_pagefault ( struct drm_psb_private dev_priv)
void psb_spank ( struct drm_psb_private dev_priv)

psb_spank - reset the 2D engine : our PSB DRM device

Soft reset the graphics engine and then reload the necessary registers. We use this at initialisation time but it will become relevant for accelerated X later

Definition at line 51 of file accel_2d.c.

int psb_vblank_wait ( struct drm_device dev,
unsigned int sequence 
)
int psb_vblank_wait2 ( struct drm_device dev,
unsigned int sequence 
)
void psbfb_copyarea ( struct fb_info info,
const struct fb_copyarea region 
)

psbfb_copyarea - 2D copy interface : our framebuffer : region to copy

Copy an area of the framebuffer console either by the accelerator or directly using the cfb helpers according to the request

Definition at line 302 of file accel_2d.c.

int psbfb_probed ( struct drm_device dev)
int psbfb_remove ( struct drm_device dev,
struct drm_framebuffer fb 
)
int psbfb_sync ( struct fb_info info)

psbfb_sync - synchronize 2D : our framebuffer

Wait for the 2D engine to quiesce so that we can do CPU access to the framebuffer again

Definition at line 323 of file accel_2d.c.

Variable Documentation

struct psb_ops cdv_chip_ops

Definition at line 630 of file cdv_device.c.

int drm_idle_check_interval
int drm_psb_no_fb
struct psb_ops mdfld_chip_ops

Definition at line 527 of file mdfld_device.c.

struct psb_ops oaktrail_chip_ops

Definition at line 542 of file oaktrail_device.c.

struct drm_crtc_helper_funcs oaktrail_helper_funcs

Definition at line 570 of file oaktrail_crtc.c.

struct psb_ops psb_chip_ops

Definition at line 369 of file psb_device.c.

struct drm_crtc_funcs psb_intel_crtc_funcs

Definition at line 1258 of file psb_intel_display.c.

struct drm_crtc_helper_funcs psb_intel_helper_funcs

Definition at line 1249 of file psb_intel_display.c.

struct drm_connector_funcs psb_intel_lvds_connector_funcs

Definition at line 662 of file psb_intel_lvds.c.

struct drm_connector_helper_funcs psb_intel_lvds_connector_helper_funcs

Definition at line 656 of file psb_intel_lvds.c.