10 #define PCI_CHIP_AST2000 0x2000
11 #define PCI_CHIP_AST2100 0x2010
12 #define PCI_CHIP_AST1180 0x1180
33 #define AST_DRAM_512Mx16 0
34 #define AST_DRAM_1Gx16 1
35 #define AST_DRAM_512Mx32 2
36 #define AST_DRAM_1Gx32 3
37 #define AST_DRAM_2Gx16 6
38 #define AST_DRAM_4Gx16 7
39 #define AST_DRAM_8Gx16 8
81 #define AST_IO_AR_PORT_WRITE (0x40)
82 #define AST_IO_MISC_PORT_WRITE (0x42)
83 #define AST_IO_VGA_ENABLE_PORT (0x43)
84 #define AST_IO_SEQ_PORT (0x44)
85 #define AST_IO_DAC_INDEX_READ (0x47)
86 #define AST_IO_DAC_INDEX_WRITE (0x48)
87 #define AST_IO_DAC_DATA (0x49)
88 #define AST_IO_GR_PORT (0x4E)
89 #define AST_IO_CRTC_PORT (0x54)
90 #define AST_IO_INPUT_STATUS1_READ (0x5A)
91 #define AST_IO_MISC_PORT_READ (0x4C)
93 #define AST_IO_MM_OFFSET (0x380)
95 #define __ast_read(x) \
96 static inline u##x ast_read##x(struct ast_private *ast, u32 reg) { \
98 val = ioread##x(ast->regs + reg); \
106 #define __ast_io_read(x) \
107 static inline u##x ast_io_read##x(struct ast_private *ast, u32 reg) { \
109 if (ast->io_space_uses_mmap) \
110 val = ioread##x(ast->regs + reg); \
112 val = ioread_cbio##x(ast->ioregs + reg); \
120 #define __ast_write(x) \
121 static inline void ast_write##x(struct ast_private *ast, u32 reg, u##x val) {\
122 iowrite##x(val, ast->regs + reg);\
129 #define __ast_io_write(x) \
130 static inline void ast_io_write##x(struct ast_private *ast, u32 reg, u##x val) {\
131 if (ast->io_space_uses_mmap) \
132 iowrite##x(val, ast->regs + reg);\
134 iowrite_cbio##x(val, ast->ioregs + reg);\
139 #undef __ast_io_write
161 #define AST_VIDMEM_SIZE_8M 0x00800000
162 #define AST_VIDMEM_SIZE_16M 0x01000000
163 #define AST_VIDMEM_SIZE_32M 0x02000000
164 #define AST_VIDMEM_SIZE_64M 0x04000000
165 #define AST_VIDMEM_SIZE_128M 0x08000000
167 #define AST_VIDMEM_DEFAULT_SIZE AST_VIDMEM_SIZE_8M
169 #define AST_MAX_HWC_WIDTH 64
170 #define AST_MAX_HWC_HEIGHT 64
172 #define AST_HWC_SIZE (AST_MAX_HWC_WIDTH*AST_MAX_HWC_HEIGHT*2)
173 #define AST_HWC_SIGNATURE_SIZE 32
177 #define AST_DEFAULT_HWC_NUM 2
179 #define AST_HWC_SIGNATURE_CHECKSUM 0x00
180 #define AST_HWC_SIGNATURE_SizeX 0x04
181 #define AST_HWC_SIGNATURE_SizeY 0x08
182 #define AST_HWC_SIGNATURE_X 0x0C
183 #define AST_HWC_SIGNATURE_Y 0x10
184 #define AST_HWC_SIGNATURE_HOTSPOTX 0x14
185 #define AST_HWC_SIGNATURE_HOTSPOTY 0x18
223 #define DRM_MODE_FLAG_NVSYNC 1
224 #define DRM_MODE_FLAG_PVSYNC 2
225 #define DRM_MODE_FLAG_NHSYNC 4
226 #define DRM_MODE_FLAG_PHSYNC 8
280 #define AST_MM_ALIGN_SHIFT 4
281 #define AST_MM_ALIGN_MASK ((1 << AST_MM_ALIGN_SHIFT) - 1)
283 #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)
305 const unsigned int hdisplay,
306 const unsigned int vdisplay);
void ast_hide_cursor(struct drm_crtc *crtc)
void ast_set_offset_reg(struct drm_crtc *crtc)
void ast_release_firmware(struct drm_device *dev)
uint8_t ast_get_index_reg_mask(struct ast_private *ast, uint32_t base, uint8_t index, uint8_t mask)
void ast_post_gpu(struct drm_device *dev)
int ast_software_i2c_read(struct ast_private *ast_priv, uint8_t edid[128])
int ast_driver_framebuffer_init(struct drm_device *dev, int flags)
int ast_crtc_do_set_base(struct drm_crtc *crtc)
void ast_init_3rdtx(struct drm_device *dev)
bool ast_dp501_read_edid(struct drm_device *dev, u8 *ediddata)
void ast_set_index_reg_mask(struct ast_private *ast, uint32_t base, uint8_t index, uint8_t mask, uint8_t val)
void ast_moutdwm(struct ast_private *ast, u32 r, u32 v)
int ast_driver_unload(struct drm_device *dev)
#define __ast_io_write(x)
void ast_enable_mmio(struct drm_device *dev)
static void ast_set_index_reg(struct ast_private *ast, uint32_t base, uint8_t index, uint8_t val)
enum drm_mode_status ast_mode_valid(struct drm_connector *connector, const unsigned int hdisplay, const unsigned int vdisplay)
void ast_set_start_address_crt1(struct ast_private *ast, u32 offset)
void ast_enable_vga(struct drm_device *dev)
bool ast_is_vga_enabled(struct drm_device *dev)
u32 ast_mindwm(struct ast_private *ast, u32 r)
int ast_driver_load(struct drm_device *dev, unsigned long flags)
void ast_set_dp501_video_output(struct drm_device *dev, u8 mode)
bool ast_backup_fw(struct drm_device *dev, u8 *addr, u32 size)
static void ast_open_key(struct ast_private *ast)
uint8_t ast_get_index_reg(struct ast_private *ast, uint32_t base, uint8_t index)
int ast_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
u8 ast_get_dp501_max_clk(struct drm_device *dev)
static struct ast_private * ast
unsigned long long uint64_t
enum ast_private::@25 config_mode
const struct firmware * dp501_fw
struct drm_gem_object * cursor_cache
uint64_t cursor_cache_gpu_addr
enum ast_tx_chip tx_chip_type
const struct ast_vbios_enhtable * enh_table
const struct ast_vbios_stdtable * std_table
struct drm_display_mode mode
struct drm_primary * primary
struct drm_format * format
struct drm_framebuffer * fb