2010-04-14 02:35:53 +04:00
|
|
|
/*
|
2011-05-10 06:02:41 +04:00
|
|
|
* Copyright 2006-2011, Haiku, Inc. All Rights Reserved.
|
2010-04-14 02:35:53 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Axel Dörfler, axeld@pinc-software.de
|
2011-03-22 00:52:01 +03:00
|
|
|
* Alexander von Gluck IV, kallisti5@unixzen.com
|
2010-04-14 02:35:53 +04:00
|
|
|
*/
|
|
|
|
#ifndef RADEON_HD_H
|
|
|
|
#define RADEON_HD_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "lock.h"
|
|
|
|
|
2011-08-06 02:24:57 +04:00
|
|
|
#include "radeon_reg.h"
|
|
|
|
|
|
|
|
#include "rhd_regs.h" // to phase out
|
2011-08-03 22:16:10 +04:00
|
|
|
#include "r500_reg.h"
|
2011-05-10 06:02:41 +04:00
|
|
|
#include "r600_reg.h"
|
2011-05-16 06:53:15 +04:00
|
|
|
#include "r800_reg.h"
|
2011-05-10 06:02:41 +04:00
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
#include <Accelerant.h>
|
|
|
|
#include <Drivers.h>
|
2011-05-10 06:02:41 +04:00
|
|
|
#include <edid.h>
|
2010-04-14 02:35:53 +04:00
|
|
|
#include <PCI.h>
|
|
|
|
|
|
|
|
|
2011-08-08 00:16:32 +04:00
|
|
|
#define VENDOR_ID_ATI 0x1002
|
|
|
|
|
|
|
|
#define RADEON_R520 0x0520 // Fudo
|
|
|
|
#define RADEON_R580 0x0580 // Rodin
|
|
|
|
#define RADEON_R600 0x0600 // Pele
|
|
|
|
#define RADEON_R700 0x0700 // Wekiva
|
|
|
|
#define RADEON_R1000 0x1000 // Evergreen
|
|
|
|
#define RADEON_R2000 0x2000 // Northern Islands
|
|
|
|
#define RADEON_R3000 0x3000 // Southern Islands
|
|
|
|
#define RADEON_R4000 0x4000 // Not yet known / used
|
2011-04-28 22:57:22 +04:00
|
|
|
|
2011-05-10 06:02:41 +04:00
|
|
|
#define RADEON_VBIOS_SIZE 0x10000
|
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
#define DEVICE_NAME "radeon_hd"
|
|
|
|
#define RADEON_ACCELERANT_NAME "radeon_hd.accelerant"
|
|
|
|
|
2011-05-10 06:02:41 +04:00
|
|
|
// Used to collect EDID from boot loader
|
|
|
|
#define EDID_BOOT_INFO "vesa_edid/v1"
|
|
|
|
#define MODES_BOOT_INFO "vesa_modes/v1"
|
|
|
|
|
2011-06-15 19:44:14 +04:00
|
|
|
#define RHD_POWER_ON 0
|
|
|
|
#define RHD_POWER_RESET 1 /* off temporarily */
|
|
|
|
#define RHD_POWER_SHUTDOWN 2 /* long term shutdown */
|
|
|
|
#define RHD_POWER_UNKNOWN 3 /* initial state */
|
|
|
|
|
2011-03-22 00:52:01 +03:00
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
// info about PLL on graphics card
|
|
|
|
struct pll_info {
|
|
|
|
uint32 reference_frequency;
|
|
|
|
uint32 max_frequency;
|
|
|
|
uint32 min_frequency;
|
|
|
|
uint32 divisor_register;
|
|
|
|
};
|
|
|
|
|
2011-04-03 21:20:05 +04:00
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
struct ring_buffer {
|
|
|
|
struct lock lock;
|
|
|
|
uint32 register_base;
|
|
|
|
uint32 offset;
|
|
|
|
uint32 size;
|
|
|
|
uint32 position;
|
|
|
|
uint32 space_left;
|
|
|
|
uint8* base;
|
|
|
|
};
|
|
|
|
|
2011-04-03 21:20:05 +04:00
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
struct overlay_registers;
|
|
|
|
|
2011-04-03 21:20:05 +04:00
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
struct radeon_shared_info {
|
2011-08-11 09:17:34 +04:00
|
|
|
uint32 device_index; // accelerant index
|
2011-06-16 07:10:17 +04:00
|
|
|
uint32 device_id; // device pciid
|
2010-04-14 02:35:53 +04:00
|
|
|
area_id mode_list_area; // area containing display mode list
|
|
|
|
uint32 mode_count;
|
|
|
|
|
2011-08-03 22:16:10 +04:00
|
|
|
bool has_rom; // was rom mapped?
|
2011-08-04 03:23:16 +04:00
|
|
|
area_id rom_area; // area of mapped rom
|
2011-08-02 22:05:52 +04:00
|
|
|
uint32 rom_phys; // rom base location
|
|
|
|
uint32 rom_size; // rom size
|
2011-08-03 22:16:10 +04:00
|
|
|
uint8* rom; // cloned, memory mapped PCI ROM
|
2011-08-02 18:58:56 +04:00
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
display_mode current_mode;
|
|
|
|
uint32 bytes_per_row;
|
|
|
|
uint32 bits_per_pixel;
|
|
|
|
uint32 dpms_mode;
|
|
|
|
|
|
|
|
area_id registers_area; // area of memory mapped registers
|
|
|
|
uint8* status_page;
|
|
|
|
addr_t physical_status_page;
|
|
|
|
uint32 graphics_memory_size;
|
2011-05-18 22:38:28 +04:00
|
|
|
|
|
|
|
addr_t frame_buffer_phys; // card PCI BAR address of FB
|
2011-05-25 02:08:54 +04:00
|
|
|
area_id frame_buffer_area; // area of memory mapped FB
|
2011-07-29 10:10:52 +04:00
|
|
|
uint32 frame_buffer_int; // card internal FB location
|
2011-05-18 22:38:28 +04:00
|
|
|
uint32 frame_buffer_size; // card internal FB aperture size
|
2011-05-25 02:08:54 +04:00
|
|
|
uint8* frame_buffer; // virtual memory mapped FB
|
2010-04-14 02:35:53 +04:00
|
|
|
|
2011-05-10 06:02:41 +04:00
|
|
|
bool has_edid;
|
|
|
|
edid1_info edid_info;
|
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
struct lock accelerant_lock;
|
|
|
|
struct lock engine_lock;
|
|
|
|
|
|
|
|
ring_buffer primary_ring_buffer;
|
|
|
|
|
|
|
|
int32 overlay_channel_used;
|
|
|
|
bool overlay_active;
|
|
|
|
uint32 overlay_token;
|
|
|
|
addr_t physical_overlay_registers;
|
|
|
|
uint32 overlay_offset;
|
|
|
|
|
|
|
|
bool hardware_cursor_enabled;
|
|
|
|
sem_id vblank_sem;
|
|
|
|
|
|
|
|
uint8* cursor_memory;
|
|
|
|
addr_t physical_cursor_memory;
|
|
|
|
uint32 cursor_buffer_offset;
|
|
|
|
uint32 cursor_format;
|
|
|
|
bool cursor_visible;
|
|
|
|
uint16 cursor_hot_x;
|
|
|
|
uint16 cursor_hot_y;
|
|
|
|
|
2011-05-18 08:25:05 +04:00
|
|
|
uint16 device_chipset;
|
2010-04-14 02:35:53 +04:00
|
|
|
char device_identifier[32];
|
|
|
|
struct pll_info pll_info;
|
|
|
|
};
|
|
|
|
|
|
|
|
//----------------- ioctl() interface ----------------
|
|
|
|
|
|
|
|
// magic code for ioctls
|
|
|
|
#define RADEON_PRIVATE_DATA_MAGIC 'rdhd'
|
|
|
|
|
|
|
|
// list ioctls
|
|
|
|
enum {
|
|
|
|
RADEON_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1,
|
|
|
|
|
|
|
|
RADEON_GET_DEVICE_NAME,
|
|
|
|
RADEON_ALLOCATE_GRAPHICS_MEMORY,
|
|
|
|
RADEON_FREE_GRAPHICS_MEMORY
|
|
|
|
};
|
|
|
|
|
|
|
|
// retrieve the area_id of the kernel/accelerant shared info
|
|
|
|
struct radeon_get_private_data {
|
|
|
|
uint32 magic; // magic number
|
|
|
|
area_id shared_info_area;
|
|
|
|
};
|
|
|
|
|
|
|
|
// allocate graphics memory
|
|
|
|
struct radeon_allocate_graphics_memory {
|
|
|
|
uint32 magic;
|
|
|
|
uint32 size;
|
|
|
|
uint32 alignment;
|
|
|
|
uint32 flags;
|
|
|
|
uint32 buffer_base;
|
|
|
|
};
|
|
|
|
|
|
|
|
// free graphics memory
|
|
|
|
struct radeon_free_graphics_memory {
|
|
|
|
uint32 magic;
|
|
|
|
uint32 buffer_base;
|
|
|
|
};
|
|
|
|
|
2011-05-16 22:10:49 +04:00
|
|
|
// registers
|
|
|
|
#define R6XX_CONFIG_APER_SIZE 0x5430 // r600>
|
|
|
|
#define OLD_CONFIG_APER_SIZE 0x0108 // <r600
|
2011-04-03 21:20:05 +04:00
|
|
|
|
2011-05-27 06:14:54 +04:00
|
|
|
#define R700_D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6914
|
|
|
|
#define R700_D1GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x691c
|
|
|
|
#define R700_D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6114
|
|
|
|
#define R700_D2GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x611c
|
|
|
|
|
2010-04-14 02:35:53 +04:00
|
|
|
// cursor
|
|
|
|
#define RADEON_CURSOR_CONTROL 0x70080
|
|
|
|
#define RADEON_CURSOR_BASE 0x70084
|
|
|
|
#define RADEON_CURSOR_POSITION 0x70088
|
|
|
|
#define RADEON_CURSOR_PALETTE 0x70090 // (- 0x7009f)
|
|
|
|
#define RADEON_CURSOR_SIZE 0x700a0
|
|
|
|
#define CURSOR_ENABLED (1UL << 31)
|
|
|
|
#define CURSOR_FORMAT_2_COLORS (0UL << 24)
|
|
|
|
#define CURSOR_FORMAT_3_COLORS (1UL << 24)
|
|
|
|
#define CURSOR_FORMAT_4_COLORS (2UL << 24)
|
|
|
|
#define CURSOR_FORMAT_ARGB (4UL << 24)
|
|
|
|
#define CURSOR_FORMAT_XRGB (5UL << 24)
|
|
|
|
#define CURSOR_POSITION_NEGATIVE 0x8000
|
|
|
|
#define CURSOR_POSITION_MASK 0x3fff
|
|
|
|
|
|
|
|
// overlay flip
|
|
|
|
#define COMMAND_OVERLAY_FLIP (0x11 << 23)
|
|
|
|
#define COMMAND_OVERLAY_CONTINUE (0 << 21)
|
|
|
|
#define COMMAND_OVERLAY_ON (1 << 21)
|
|
|
|
#define COMMAND_OVERLAY_OFF (2 << 21)
|
|
|
|
#define OVERLAY_UPDATE_COEFFICIENTS 0x1
|
|
|
|
|
|
|
|
// 2D acceleration
|
|
|
|
#define XY_COMMAND_SOURCE_BLIT 0x54c00006
|
|
|
|
#define XY_COMMAND_COLOR_BLIT 0x54000004
|
|
|
|
#define XY_COMMAND_SETUP_MONO_PATTERN 0x44400007
|
|
|
|
#define XY_COMMAND_SCANLINE_BLIT 0x49400001
|
|
|
|
#define COMMAND_COLOR_BLIT 0x50000003
|
|
|
|
#define COMMAND_BLIT_RGBA 0x00300000
|
|
|
|
|
|
|
|
#define COMMAND_MODE_SOLID_PATTERN 0x80
|
|
|
|
#define COMMAND_MODE_CMAP8 0x00
|
|
|
|
#define COMMAND_MODE_RGB15 0x02
|
|
|
|
#define COMMAND_MODE_RGB16 0x01
|
|
|
|
#define COMMAND_MODE_RGB32 0x03
|
|
|
|
|
2011-03-22 00:52:01 +03:00
|
|
|
// display
|
|
|
|
|
|
|
|
#define DISPLAY_CONTROL_ENABLED (1UL << 31)
|
|
|
|
#define DISPLAY_CONTROL_GAMMA (1UL << 30)
|
|
|
|
#define DISPLAY_CONTROL_COLOR_MASK (0x0fUL << 26)
|
|
|
|
#define DISPLAY_CONTROL_CMAP8 (2UL << 26)
|
|
|
|
#define DISPLAY_CONTROL_RGB15 (4UL << 26)
|
|
|
|
#define DISPLAY_CONTROL_RGB16 (5UL << 26)
|
|
|
|
#define DISPLAY_CONTROL_RGB32 (6UL << 26)
|
|
|
|
|
2011-08-03 22:16:10 +04:00
|
|
|
/* VIP bus */
|
|
|
|
#define RADEON_VIPH_CH0_DATA 0x0c00
|
|
|
|
#define RADEON_VIPH_CH1_DATA 0x0c04
|
|
|
|
#define RADEON_VIPH_CH2_DATA 0x0c08
|
|
|
|
#define RADEON_VIPH_CH3_DATA 0x0c0c
|
|
|
|
#define RADEON_VIPH_CH0_ADDR 0x0c10
|
|
|
|
#define RADEON_VIPH_CH1_ADDR 0x0c14
|
|
|
|
#define RADEON_VIPH_CH2_ADDR 0x0c18
|
|
|
|
#define RADEON_VIPH_CH3_ADDR 0x0c1c
|
|
|
|
#define RADEON_VIPH_CH0_SBCNT 0x0c20
|
|
|
|
#define RADEON_VIPH_CH1_SBCNT 0x0c24
|
|
|
|
#define RADEON_VIPH_CH2_SBCNT 0x0c28
|
|
|
|
#define RADEON_VIPH_CH3_SBCNT 0x0c2c
|
|
|
|
#define RADEON_VIPH_CH0_ABCNT 0x0c30
|
|
|
|
#define RADEON_VIPH_CH1_ABCNT 0x0c34
|
|
|
|
#define RADEON_VIPH_CH2_ABCNT 0x0c38
|
|
|
|
#define RADEON_VIPH_CH3_ABCNT 0x0c3c
|
|
|
|
#define RADEON_VIPH_CONTROL 0x0c40
|
|
|
|
# define RADEON_VIP_BUSY 0
|
|
|
|
# define RADEON_VIP_IDLE 1
|
|
|
|
# define RADEON_VIP_RESET 2
|
|
|
|
# define RADEON_VIPH_EN (1 << 21)
|
|
|
|
#define RADEON_VIPH_DV_LAT 0x0c44
|
|
|
|
#define RADEON_VIPH_BM_CHUNK 0x0c48
|
|
|
|
#define RADEON_VIPH_DV_INT 0x0c4c
|
|
|
|
#define RADEON_VIPH_TIMEOUT_STAT 0x0c50
|
|
|
|
#define RADEON_VIPH_TIMEOUT_STAT__VIPH_REG_STAT 0x00000010
|
|
|
|
#define RADEON_VIPH_TIMEOUT_STAT__VIPH_REG_AK 0x00000010
|
|
|
|
#define RADEON_VIPH_TIMEOUT_STAT__VIPH_REGR_DIS 0x01000000
|
|
|
|
|
|
|
|
#define RADEON_VIPH_REG_DATA 0x0084
|
|
|
|
#define RADEON_VIPH_REG_ADDR 0x0080
|
|
|
|
|
2011-03-22 00:52:01 +03:00
|
|
|
// PCI bridge memory management
|
2010-04-14 02:35:53 +04:00
|
|
|
|
|
|
|
// overlay
|
|
|
|
|
|
|
|
#define RADEON_OVERLAY_UPDATE 0x30000
|
|
|
|
#define RADEON_OVERLAY_TEST 0x30004
|
|
|
|
#define RADEON_OVERLAY_STATUS 0x30008
|
|
|
|
#define RADEON_OVERLAY_EXTENDED_STATUS 0x3000c
|
|
|
|
#define RADEON_OVERLAY_GAMMA_5 0x30010
|
|
|
|
#define RADEON_OVERLAY_GAMMA_4 0x30014
|
|
|
|
#define RADEON_OVERLAY_GAMMA_3 0x30018
|
|
|
|
#define RADEON_OVERLAY_GAMMA_2 0x3001c
|
|
|
|
#define RADEON_OVERLAY_GAMMA_1 0x30020
|
|
|
|
#define RADEON_OVERLAY_GAMMA_0 0x30024
|
|
|
|
|
|
|
|
struct overlay_scale {
|
|
|
|
uint32 _reserved0 : 3;
|
|
|
|
uint32 horizontal_scale_fraction : 12;
|
|
|
|
uint32 _reserved1 : 1;
|
|
|
|
uint32 horizontal_downscale_factor : 3;
|
|
|
|
uint32 _reserved2 : 1;
|
|
|
|
uint32 vertical_scale_fraction : 12;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define OVERLAY_FORMAT_RGB15 0x2
|
|
|
|
#define OVERLAY_FORMAT_RGB16 0x3
|
|
|
|
#define OVERLAY_FORMAT_RGB32 0x1
|
|
|
|
#define OVERLAY_FORMAT_YCbCr422 0x8
|
|
|
|
#define OVERLAY_FORMAT_YCbCr411 0x9
|
|
|
|
#define OVERLAY_FORMAT_YCbCr420 0xc
|
|
|
|
|
|
|
|
#define OVERLAY_MIRROR_NORMAL 0x0
|
|
|
|
#define OVERLAY_MIRROR_HORIZONTAL 0x1
|
|
|
|
#define OVERLAY_MIRROR_VERTICAL 0x2
|
|
|
|
|
|
|
|
// The real overlay registers are written to using an update buffer
|
|
|
|
|
|
|
|
struct overlay_registers {
|
|
|
|
uint32 buffer_rgb0;
|
|
|
|
uint32 buffer_rgb1;
|
|
|
|
uint32 buffer_u0;
|
|
|
|
uint32 buffer_v0;
|
|
|
|
uint32 buffer_u1;
|
|
|
|
uint32 buffer_v1;
|
|
|
|
// (0x18) OSTRIDE - overlay stride
|
|
|
|
uint16 stride_rgb;
|
|
|
|
uint16 stride_uv;
|
|
|
|
// (0x1c) YRGB_VPH - Y/RGB vertical phase
|
|
|
|
uint16 vertical_phase0_rgb;
|
|
|
|
uint16 vertical_phase1_rgb;
|
|
|
|
// (0x20) UV_VPH - UV vertical phase
|
|
|
|
uint16 vertical_phase0_uv;
|
|
|
|
uint16 vertical_phase1_uv;
|
|
|
|
// (0x24) HORZ_PH - horizontal phase
|
|
|
|
uint16 horizontal_phase_rgb;
|
|
|
|
uint16 horizontal_phase_uv;
|
|
|
|
// (0x28) INIT_PHS - initial phase shift
|
|
|
|
uint32 initial_vertical_phase0_shift_rgb0 : 4;
|
|
|
|
uint32 initial_vertical_phase1_shift_rgb0 : 4;
|
|
|
|
uint32 initial_horizontal_phase_shift_rgb0 : 4;
|
|
|
|
uint32 initial_vertical_phase0_shift_uv : 4;
|
|
|
|
uint32 initial_vertical_phase1_shift_uv : 4;
|
|
|
|
uint32 initial_horizontal_phase_shift_uv : 4;
|
|
|
|
uint32 _reserved0 : 8;
|
|
|
|
// (0x2c) DWINPOS - destination window position
|
|
|
|
uint16 window_left;
|
|
|
|
uint16 window_top;
|
|
|
|
// (0x30) DWINSZ - destination window size
|
|
|
|
uint16 window_width;
|
|
|
|
uint16 window_height;
|
|
|
|
// (0x34) SWIDTH - source width
|
|
|
|
uint16 source_width_rgb;
|
|
|
|
uint16 source_width_uv;
|
|
|
|
// (0x38) SWITDHSW - source width in 8 byte steps
|
|
|
|
uint16 source_bytes_per_row_rgb;
|
|
|
|
uint16 source_bytes_per_row_uv;
|
|
|
|
uint16 source_height_rgb;
|
|
|
|
uint16 source_height_uv;
|
|
|
|
overlay_scale scale_rgb;
|
|
|
|
overlay_scale scale_uv;
|
|
|
|
// (0x48) OCLRC0 - overlay color correction 0
|
|
|
|
uint32 brightness_correction : 8; // signed, -128 to 127
|
|
|
|
uint32 _reserved1 : 10;
|
|
|
|
uint32 contrast_correction : 9; // fixed point: 3.6 bits
|
|
|
|
uint32 _reserved2 : 5;
|
|
|
|
// (0x4c) OCLRC1 - overlay color correction 1
|
|
|
|
uint32 saturation_cos_correction : 10; // fixed point: 3.7 bits
|
|
|
|
uint32 _reserved3 : 6;
|
|
|
|
uint32 saturation_sin_correction : 11; // signed fixed point: 3.7 bits
|
|
|
|
uint32 _reserved4 : 5;
|
|
|
|
// (0x50) DCLRKV - destination color key value
|
|
|
|
uint32 color_key_blue : 8;
|
|
|
|
uint32 color_key_green : 8;
|
|
|
|
uint32 color_key_red : 8;
|
|
|
|
uint32 _reserved5 : 8;
|
|
|
|
// (0x54) DCLRKM - destination color key mask
|
|
|
|
uint32 color_key_mask_blue : 8;
|
|
|
|
uint32 color_key_mask_green : 8;
|
|
|
|
uint32 color_key_mask_red : 8;
|
|
|
|
uint32 _reserved6 : 7;
|
|
|
|
uint32 color_key_enabled : 1;
|
|
|
|
// (0x58) SCHRKVH - source chroma key high value
|
|
|
|
uint32 source_chroma_key_high_red : 8;
|
|
|
|
uint32 source_chroma_key_high_blue : 8;
|
|
|
|
uint32 source_chroma_key_high_green : 8;
|
|
|
|
uint32 _reserved7 : 8;
|
|
|
|
// (0x5c) SCHRKVL - source chroma key low value
|
|
|
|
uint32 source_chroma_key_low_red : 8;
|
|
|
|
uint32 source_chroma_key_low_blue : 8;
|
|
|
|
uint32 source_chroma_key_low_green : 8;
|
|
|
|
uint32 _reserved8 : 8;
|
|
|
|
// (0x60) SCHRKEN - source chroma key enable
|
|
|
|
uint32 _reserved9 : 24;
|
|
|
|
uint32 source_chroma_key_red_enabled : 1;
|
|
|
|
uint32 source_chroma_key_blue_enabled : 1;
|
|
|
|
uint32 source_chroma_key_green_enabled : 1;
|
|
|
|
uint32 _reserved10 : 5;
|
|
|
|
// (0x64) OCONFIG - overlay configuration
|
|
|
|
uint32 _reserved11 : 3;
|
|
|
|
uint32 color_control_output_mode : 1;
|
|
|
|
uint32 yuv_to_rgb_bypass : 1;
|
|
|
|
uint32 _reserved12 : 11;
|
|
|
|
uint32 gamma2_enabled : 1;
|
|
|
|
uint32 _reserved13 : 1;
|
|
|
|
uint32 select_pipe : 1;
|
|
|
|
uint32 slot_time : 8;
|
|
|
|
uint32 _reserved14 : 5;
|
|
|
|
// (0x68) OCOMD - overlay command
|
|
|
|
uint32 overlay_enabled : 1;
|
|
|
|
uint32 active_field : 1;
|
|
|
|
uint32 active_buffer : 2;
|
|
|
|
uint32 test_mode : 1;
|
|
|
|
uint32 buffer_field_mode : 1;
|
|
|
|
uint32 _reserved15 : 1;
|
|
|
|
uint32 tv_flip_field_enabled : 1;
|
|
|
|
uint32 _reserved16 : 1;
|
|
|
|
uint32 tv_flip_field_parity : 1;
|
|
|
|
uint32 source_format : 4;
|
|
|
|
uint32 ycbcr422_order : 2;
|
|
|
|
uint32 _reserved18 : 1;
|
|
|
|
uint32 mirroring_mode : 2;
|
|
|
|
uint32 _reserved19 : 13;
|
|
|
|
|
|
|
|
uint32 _reserved20;
|
|
|
|
|
|
|
|
uint32 start_0y;
|
|
|
|
uint32 start_1y;
|
|
|
|
uint32 start_0u;
|
|
|
|
uint32 start_0v;
|
|
|
|
uint32 start_1u;
|
|
|
|
uint32 start_1v;
|
|
|
|
uint32 _reserved21[6];
|
|
|
|
#if 0
|
|
|
|
// (0x70) AWINPOS - alpha blend window position
|
|
|
|
uint32 awinpos;
|
|
|
|
// (0x74) AWINSZ - alpha blend window size
|
|
|
|
uint32 awinsz;
|
|
|
|
|
|
|
|
uint32 _reserved21[10];
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// (0xa0) FASTHSCALE - fast horizontal downscale (strangely enough,
|
|
|
|
// the next two registers switch the usual Y/RGB vs. UV order)
|
|
|
|
uint16 horizontal_scale_uv;
|
|
|
|
uint16 horizontal_scale_rgb;
|
|
|
|
// (0xa4) UVSCALEV - vertical downscale
|
|
|
|
uint16 vertical_scale_uv;
|
|
|
|
uint16 vertical_scale_rgb;
|
|
|
|
|
|
|
|
uint32 _reserved22[86];
|
|
|
|
|
|
|
|
// (0x200) polyphase filter coefficients
|
|
|
|
uint16 vertical_coefficients_rgb[128];
|
|
|
|
uint16 horizontal_coefficients_rgb[128];
|
|
|
|
|
|
|
|
uint32 _reserved23[64];
|
|
|
|
|
|
|
|
// (0x500)
|
|
|
|
uint16 vertical_coefficients_uv[128];
|
|
|
|
uint16 horizontal_coefficients_uv[128];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct hardware_status {
|
|
|
|
uint32 interrupt_status_register;
|
|
|
|
uint32 _reserved0[3];
|
|
|
|
void* primary_ring_head_storage;
|
|
|
|
uint32 _reserved1[3];
|
|
|
|
void* secondary_ring_0_head_storage;
|
|
|
|
void* secondary_ring_1_head_storage;
|
|
|
|
uint32 _reserved2[2];
|
|
|
|
void* binning_head_storage;
|
|
|
|
uint32 _reserved3[3];
|
|
|
|
uint32 store[1008];
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* RADEON_HD_H */
|