annotate vidix/radeon_vid.c @ 26526:f5329f6f59c3

Remove obsolete and non-working test program.
author diego
date Mon, 28 Apr 2008 11:52:56 +0000
parents e8af7338a462
children b315e4b90eb6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1 /*
23046
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
2 * VIDIX driver for ATI Rage128 and Radeon chipsets.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
3 * Copyright (C) 2002 Nick Kurshev
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
4 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
5 * This file is part of MPlayer.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
6 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
7 * MPlayer is free software; you can redistribute it and/or modify
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
8 * it under the terms of the GNU General Public License as published by
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
10 * (at your option) any later version.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
11 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
12 * MPlayer is distributed in the hope that it will be useful,
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
15 * GNU General Public License for more details.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
16 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
17 * You should have received a copy of the GNU General Public License
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
18 * along with MPlayer; if not, write to the Free Software
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
20 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
21 * This file is based on sources from
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
22 * GATOS (gatos.sf.net) and X11 (www.xfree86.org)
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
23 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
24 * Changes:
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
25 * - 31.12.2002
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
26 * added support for fglrx drivers by Marcel Naziri (zwobbl@zwobbl.de)
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
27 * - 6.04.2004
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
28 * fixes to allow compiling vidix without X11 (broken in original patch)
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
29 * - PowerPC support by Alex Beregszaszi
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 23044
diff changeset
30 */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
31
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
32 #include <errno.h>
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
33 #include <stdio.h>
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
34 #include <stdlib.h>
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
35 #include <string.h>
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
36 #include <math.h>
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
37 #include <inttypes.h>
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
38
22905
f34e5d778267 consistent include paths for config.h et al.
diego
parents: 22901
diff changeset
39 #include "config.h"
f34e5d778267 consistent include paths for config.h et al.
diego
parents: 22901
diff changeset
40 #include "libavutil/common.h"
f34e5d778267 consistent include paths for config.h et al.
diego
parents: 22901
diff changeset
41 #include "mpbswap.h"
22900
a9e111b88c4a merged libdha and libvidix, moved all files from libdha to vidix directory
ben
parents: 22874
diff changeset
42 #include "pci_ids.h"
a9e111b88c4a merged libdha and libvidix, moved all files from libdha to vidix directory
ben
parents: 22874
diff changeset
43 #include "pci_names.h"
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
44 #include "vidix.h"
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
45 #include "vidixlib.h"
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
46 #include "fourcc.h"
22901
a7605669b114 renamed libdha.[hc] to dha.[hc]
ben
parents: 22900
diff changeset
47 #include "dha.h"
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
48 #include "radeon.h"
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
49
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
50 #if !defined(RAGE128) && defined(HAVE_X11)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
51 #include <X11/Xlib.h>
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
52 static uint32_t firegl_shift = 0;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
53 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
54
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
55 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
56 #define RADEON_MSG "[rage128]"
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
57 #define X_ADJUST 0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
58 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
59 #define RADEON_MSG "[radeon]"
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
60 #define X_ADJUST (((besr.chip_flags&R_OVL_SHIFT)==R_OVL_SHIFT)?8:0)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
61 #ifndef RADEON
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
62 #define RADEON
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
63 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
64 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
65
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
66 #define RADEON_ASSERT(msg) printf(RADEON_MSG"################# FATAL:"msg);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
67
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
68 #define VERBOSE_LEVEL 0
25859
e8af7338a462 Fix illegal identifiers, names starting with __ are reserved for the system.
diego
parents: 25718
diff changeset
69 static int verbosity = 0;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
70 typedef struct bes_registers_s
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
71 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
72 /* base address of yuv framebuffer */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
73 uint32_t yuv_base;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
74 uint32_t fourcc;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
75 uint32_t surf_id;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
76 int load_prg_start;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
77 int horz_pick_nearest;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
78 int vert_pick_nearest;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
79 int swap_uv; /* for direct support of bgr fourccs */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
80 uint32_t dest_bpp;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
81 /* YUV BES registers */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
82 uint32_t reg_load_cntl;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
83 uint32_t h_inc;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
84 uint32_t step_by;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
85 uint32_t y_x_start;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
86 uint32_t y_x_end;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
87 uint32_t v_inc;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
88 uint32_t p1_blank_lines_at_top;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
89 uint32_t p23_blank_lines_at_top;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
90 uint32_t vid_buf_pitch0_value;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
91 uint32_t vid_buf_pitch1_value;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
92 uint32_t p1_x_start_end;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
93 uint32_t p2_x_start_end;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
94 uint32_t p3_x_start_end;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
95 uint32_t base_addr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
96 uint32_t vid_buf_base_adrs_y[VID_PLAY_MAXFRAMES];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
97 uint32_t vid_buf_base_adrs_u[VID_PLAY_MAXFRAMES];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
98 uint32_t vid_buf_base_adrs_v[VID_PLAY_MAXFRAMES];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
99 uint32_t vid_nbufs;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
100
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
101 uint32_t p1_v_accum_init;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
102 uint32_t p1_h_accum_init;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
103 uint32_t p23_v_accum_init;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
104 uint32_t p23_h_accum_init;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
105 uint32_t scale_cntl;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
106 uint32_t exclusive_horz;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
107 uint32_t auto_flip_cntl;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
108 uint32_t filter_cntl;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
109 uint32_t four_tap_coeff[5];
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
110 uint32_t key_cntl;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
111 uint32_t test;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
112 /* Configurable stuff */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
113 int double_buff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
114
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
115 int brightness;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
116 int saturation;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
117
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
118 int ckey_on;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
119 uint32_t graphics_key_clr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
120 uint32_t graphics_key_msk;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
121 uint32_t ckey_cntl;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
122 uint32_t merge_cntl;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
123
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
124 int deinterlace_on;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
125 uint32_t deinterlace_pattern;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
126
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
127 unsigned chip_flags;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
128 } bes_registers_t;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
129
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
130 typedef struct video_registers_s
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
131 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
132 const char * sname;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
133 uint32_t name;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
134 uint32_t value;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
135 }video_registers_t;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
136
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
137 static bes_registers_t besr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
138 #define DECLARE_VREG(name) { #name, name, 0 }
25718
8eddf6a9af7f Make some radeon vidix driver tables static and const
reimar
parents: 25415
diff changeset
139 static const video_registers_t vregs[] =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
140 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
141 DECLARE_VREG(VIDEOMUX_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
142 DECLARE_VREG(VIPPAD_MASK),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
143 DECLARE_VREG(VIPPAD1_A),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
144 DECLARE_VREG(VIPPAD1_EN),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
145 DECLARE_VREG(VIPPAD1_Y),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
146 DECLARE_VREG(OV0_Y_X_START),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
147 DECLARE_VREG(OV0_Y_X_END),
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
148 DECLARE_VREG(OV1_Y_X_START),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
149 DECLARE_VREG(OV1_Y_X_END),
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
150 DECLARE_VREG(OV0_PIPELINE_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
151 DECLARE_VREG(OV0_EXCLUSIVE_HORZ),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
152 DECLARE_VREG(OV0_EXCLUSIVE_VERT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
153 DECLARE_VREG(OV0_REG_LOAD_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
154 DECLARE_VREG(OV0_SCALE_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
155 DECLARE_VREG(OV0_V_INC),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
156 DECLARE_VREG(OV0_P1_V_ACCUM_INIT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
157 DECLARE_VREG(OV0_P23_V_ACCUM_INIT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
158 DECLARE_VREG(OV0_P1_BLANK_LINES_AT_TOP),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
159 DECLARE_VREG(OV0_P23_BLANK_LINES_AT_TOP),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
160 #ifdef RADEON
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
161 DECLARE_VREG(OV0_BASE_ADDR),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
162 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
163 DECLARE_VREG(OV0_VID_BUF0_BASE_ADRS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
164 DECLARE_VREG(OV0_VID_BUF1_BASE_ADRS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
165 DECLARE_VREG(OV0_VID_BUF2_BASE_ADRS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
166 DECLARE_VREG(OV0_VID_BUF3_BASE_ADRS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
167 DECLARE_VREG(OV0_VID_BUF4_BASE_ADRS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
168 DECLARE_VREG(OV0_VID_BUF5_BASE_ADRS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
169 DECLARE_VREG(OV0_VID_BUF_PITCH0_VALUE),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
170 DECLARE_VREG(OV0_VID_BUF_PITCH1_VALUE),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
171 DECLARE_VREG(OV0_AUTO_FLIP_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
172 DECLARE_VREG(OV0_DEINTERLACE_PATTERN),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
173 DECLARE_VREG(OV0_SUBMIT_HISTORY),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
174 DECLARE_VREG(OV0_H_INC),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
175 DECLARE_VREG(OV0_STEP_BY),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
176 DECLARE_VREG(OV0_P1_H_ACCUM_INIT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
177 DECLARE_VREG(OV0_P23_H_ACCUM_INIT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
178 DECLARE_VREG(OV0_P1_X_START_END),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
179 DECLARE_VREG(OV0_P2_X_START_END),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
180 DECLARE_VREG(OV0_P3_X_START_END),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
181 DECLARE_VREG(OV0_FILTER_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
182 DECLARE_VREG(OV0_FOUR_TAP_COEF_0),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
183 DECLARE_VREG(OV0_FOUR_TAP_COEF_1),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
184 DECLARE_VREG(OV0_FOUR_TAP_COEF_2),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
185 DECLARE_VREG(OV0_FOUR_TAP_COEF_3),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
186 DECLARE_VREG(OV0_FOUR_TAP_COEF_4),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
187 DECLARE_VREG(OV0_FLAG_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
188 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
189 DECLARE_VREG(OV0_COLOUR_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
190 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
191 DECLARE_VREG(OV0_SLICE_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
192 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
193 DECLARE_VREG(OV0_VID_KEY_CLR),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
194 DECLARE_VREG(OV0_VID_KEY_MSK),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
195 DECLARE_VREG(OV0_GRAPHICS_KEY_CLR),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
196 DECLARE_VREG(OV0_GRAPHICS_KEY_MSK),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
197 DECLARE_VREG(OV0_KEY_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
198 DECLARE_VREG(OV0_TEST),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
199 DECLARE_VREG(OV0_LIN_TRANS_A),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
200 DECLARE_VREG(OV0_LIN_TRANS_B),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
201 DECLARE_VREG(OV0_LIN_TRANS_C),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
202 DECLARE_VREG(OV0_LIN_TRANS_D),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
203 DECLARE_VREG(OV0_LIN_TRANS_E),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
204 DECLARE_VREG(OV0_LIN_TRANS_F),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
205 DECLARE_VREG(OV0_GAMMA_0_F),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
206 DECLARE_VREG(OV0_GAMMA_10_1F),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
207 DECLARE_VREG(OV0_GAMMA_20_3F),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
208 DECLARE_VREG(OV0_GAMMA_40_7F),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
209 DECLARE_VREG(OV0_GAMMA_380_3BF),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
210 DECLARE_VREG(OV0_GAMMA_3C0_3FF),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
211 DECLARE_VREG(SUBPIC_CNTL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
212 DECLARE_VREG(SUBPIC_DEFCOLCON),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
213 DECLARE_VREG(SUBPIC_Y_X_START),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
214 DECLARE_VREG(SUBPIC_Y_X_END),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
215 DECLARE_VREG(SUBPIC_V_INC),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
216 DECLARE_VREG(SUBPIC_H_INC),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
217 DECLARE_VREG(SUBPIC_BUF0_OFFSET),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
218 DECLARE_VREG(SUBPIC_BUF1_OFFSET),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
219 DECLARE_VREG(SUBPIC_LC0_OFFSET),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
220 DECLARE_VREG(SUBPIC_LC1_OFFSET),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
221 DECLARE_VREG(SUBPIC_PITCH),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
222 DECLARE_VREG(SUBPIC_BTN_HLI_COLCON),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
223 DECLARE_VREG(SUBPIC_BTN_HLI_Y_X_START),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
224 DECLARE_VREG(SUBPIC_BTN_HLI_Y_X_END),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
225 DECLARE_VREG(SUBPIC_PALETTE_INDEX),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
226 DECLARE_VREG(SUBPIC_PALETTE_DATA),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
227 DECLARE_VREG(SUBPIC_H_ACCUM_INIT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
228 DECLARE_VREG(SUBPIC_V_ACCUM_INIT),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
229 DECLARE_VREG(IDCT_RUNS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
230 DECLARE_VREG(IDCT_LEVELS),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
231 DECLARE_VREG(IDCT_AUTH_CONTROL),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
232 DECLARE_VREG(IDCT_AUTH),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
233 DECLARE_VREG(IDCT_CONTROL),
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
234 #ifdef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
235 DECLARE_VREG(BM_FRAME_BUF_OFFSET),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
236 DECLARE_VREG(BM_SYSTEM_MEM_ADDR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
237 DECLARE_VREG(BM_COMMAND),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
238 DECLARE_VREG(BM_STATUS),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
239 DECLARE_VREG(BM_QUEUE_STATUS),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
240 DECLARE_VREG(BM_QUEUE_FREE_STATUS),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
241 DECLARE_VREG(BM_CHUNK_0_VAL),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
242 DECLARE_VREG(BM_CHUNK_1_VAL),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
243 DECLARE_VREG(BM_VIP0_BUF),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
244 DECLARE_VREG(BM_VIP0_ACTIVE),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
245 DECLARE_VREG(BM_VIP1_BUF),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
246 DECLARE_VREG(BM_VIP1_ACTIVE),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
247 DECLARE_VREG(BM_VIP2_BUF),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
248 DECLARE_VREG(BM_VIP2_ACTIVE),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
249 DECLARE_VREG(BM_VIP3_BUF),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
250 DECLARE_VREG(BM_VIP3_ACTIVE),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
251 DECLARE_VREG(BM_VIDCAP_BUF0),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
252 DECLARE_VREG(BM_VIDCAP_BUF1),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
253 DECLARE_VREG(BM_VIDCAP_BUF2),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
254 DECLARE_VREG(BM_VIDCAP_ACTIVE),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
255 DECLARE_VREG(BM_GUI),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
256 DECLARE_VREG(BM_ABORT)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
257 #else
25316
ea301dc982fa Dump the ati radeon DISP_MERGE_CNTL register to ease the
ben
parents: 25273
diff changeset
258 DECLARE_VREG(DISP_MERGE_CNTL),
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
259 DECLARE_VREG(DMA_GUI_TABLE_ADDR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
260 DECLARE_VREG(DMA_GUI_SRC_ADDR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
261 DECLARE_VREG(DMA_GUI_DST_ADDR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
262 DECLARE_VREG(DMA_GUI_COMMAND),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
263 DECLARE_VREG(DMA_GUI_STATUS),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
264 DECLARE_VREG(DMA_GUI_ACT_DSCRPTR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
265 DECLARE_VREG(DMA_VID_SRC_ADDR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
266 DECLARE_VREG(DMA_VID_DST_ADDR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
267 DECLARE_VREG(DMA_VID_COMMAND),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
268 DECLARE_VREG(DMA_VID_STATUS),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
269 DECLARE_VREG(DMA_VID_ACT_DSCRPTR),
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
270 #endif
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
271 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
272
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
273 #define R_FAMILY 0x000000FF
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
274 #define R_100 0x00000001
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
275 #define R_120 0x00000002
25272
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
276 #define R_150 0x00000004
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
277 #define R_200 0x00000008
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
278 #define R_250 0x00000010
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
279 #define R_280 0x00000020
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
280 #define R_300 0x00000040
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
281 #define R_350 0x00000080
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
282 #define R_370 0x00000100
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
283 #define R_380 0x00000200
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
284 #define R_420 0x00000400
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
285 #define R_430 0x00000800
21bd7360eb03 sync with vidix.sf.net r318: resolve bitfield collision in vidix radeon driver (patch by Guillaume Lecerf)
ben
parents: 23652
diff changeset
286 #define R_480 0x00001000
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
287 #define R_OVL_SHIFT 0x01000000
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
288 #define R_INTEGRATED 0x02000000
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
289 #define R_PCIE 0x04000000
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
290
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
291 typedef struct ati_card_ids_s
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
292 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
293 unsigned short id;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
294 unsigned flags;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
295 }ati_card_ids_t;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
296
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
297 static const ati_card_ids_t ati_card_ids[] =
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
298 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
299 #ifdef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
300 /*
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
301 This driver should be compatible with Rage128 (pro) chips.
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
302 (include adaptive deinterlacing!!!).
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
303 Moreover: the same logic can be used with Mach64 chips.
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
304 (I mean: mach64xx, 3d rage, 3d rage IIc, 3D rage pro, 3d rage mobility).
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
305 but they are incompatible by i/o ports. So if enthusiasts will want
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
306 then they can redefine OUTREG and INREG macros and redefine OV0_*
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
307 constants. Also it seems that mach64 chips supports only: YUY2, YV12, UYVY
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
308 fourccs (422 and 420 formats only).
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
309 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
310 /* Rage128 Pro GL */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
311 { DEVICE_ATI_RAGE_128_PA_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
312 { DEVICE_ATI_RAGE_128_PB_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
313 { DEVICE_ATI_RAGE_128_PC_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
314 { DEVICE_ATI_RAGE_128_PD_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
315 { DEVICE_ATI_RAGE_128_PE_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
316 { DEVICE_ATI_RAGE_128_PF_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
317 /* Rage128 Pro VR */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
318 { DEVICE_ATI_RAGE_128_PG_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
319 { DEVICE_ATI_RAGE_128_PH_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
320 { DEVICE_ATI_RAGE_128_PI_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
321 { DEVICE_ATI_RAGE_128_PJ_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
322 { DEVICE_ATI_RAGE_128_PK_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
323 { DEVICE_ATI_RAGE_128_PL_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
324 { DEVICE_ATI_RAGE_128_PM_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
325 { DEVICE_ATI_RAGE_128_PN_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
326 { DEVICE_ATI_RAGE_128_PO_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
327 { DEVICE_ATI_RAGE_128_PP_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
328 { DEVICE_ATI_RAGE_128_PQ_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
329 { DEVICE_ATI_RAGE_128_PR_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
330 { DEVICE_ATI_RAGE_128_PS_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
331 { DEVICE_ATI_RAGE_128_PT_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
332 { DEVICE_ATI_RAGE_128_PU_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
333 { DEVICE_ATI_RAGE_128_PV_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
334 { DEVICE_ATI_RAGE_128_PW_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
335 { DEVICE_ATI_RAGE_128_PX_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
336 /* Rage128 GL */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
337 { DEVICE_ATI_RAGE_128_RE_SG, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
338 { DEVICE_ATI_RAGE_128_RF_SG, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
339 { DEVICE_ATI_RAGE_128_RG, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
340 { DEVICE_ATI_RAGE_128_RK_VR, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
341 { DEVICE_ATI_RAGE_128_RL_VR, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
342 { DEVICE_ATI_RAGE_128_SE_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
343 { DEVICE_ATI_RAGE_128_SF_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
344 { DEVICE_ATI_RAGE_128_SG_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
345 { DEVICE_ATI_RAGE_128_SH, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
346 { DEVICE_ATI_RAGE_128_SK_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
347 { DEVICE_ATI_RAGE_128_SL_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
348 { DEVICE_ATI_RAGE_128_SM_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
349 { DEVICE_ATI_RAGE_128_4X, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
350 { DEVICE_ATI_RAGE_128_PRO, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
351 { DEVICE_ATI_RAGE_128_PRO2, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
352 { DEVICE_ATI_RAGE_128_PRO3, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
353 /* these seem to be based on rage 128 instead of mach64 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
354 { DEVICE_ATI_RAGE_MOBILITY_M3, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
355 { DEVICE_ATI_RAGE_MOBILITY_M32, 0 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
356 #else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
357 /* Radeon1 (indeed: Rage 256 Pro ;) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
358 { DEVICE_ATI_RADEON_R100_QD, R_100|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
359 { DEVICE_ATI_RADEON_R100_QE, R_100|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
360 { DEVICE_ATI_RADEON_R100_QF, R_100|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
361 { DEVICE_ATI_RADEON_R100_QG, R_100|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
362 { DEVICE_ATI_RADEON_IGP_320, R_150|R_OVL_SHIFT|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
363 { DEVICE_ATI_RADEON_MOBILITY_U1, R_150|R_OVL_SHIFT|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
364 { DEVICE_ATI_RADEON_RV100_QY, R_120|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
365 { DEVICE_ATI_RADEON_RV100_QZ, R_120|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
366 { DEVICE_ATI_RADEON_MOBILITY_M7, R_150|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
367 { DEVICE_ATI_RADEON_RV200_LX, R_150|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
368 { DEVICE_ATI_RADEON_MOBILITY_M6, R_120|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
369 { DEVICE_ATI_RADEON_MOBILITY_M62, R_120|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
370 /* Radeon2 (indeed: Rage 512 Pro ;) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
371 { DEVICE_ATI_R200_BB_RADEON, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
372 { DEVICE_ATI_R200_BC_RADEON, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
373 { DEVICE_ATI_RADEON_R200_QH, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
374 { DEVICE_ATI_RADEON_R200_QI, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
375 { DEVICE_ATI_RADEON_R200_QJ, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
376 { DEVICE_ATI_RADEON_R200_QK, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
377 { DEVICE_ATI_RADEON_R200_QL, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
378 { DEVICE_ATI_RADEON_R200_QM, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
379 { DEVICE_ATI_RADEON_R200_QN, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
380 { DEVICE_ATI_RADEON_R200_QO, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
381 { DEVICE_ATI_RADEON_R200_QH2, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
382 { DEVICE_ATI_RADEON_R200_QI2, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
383 { DEVICE_ATI_RADEON_R200_QJ2, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
384 { DEVICE_ATI_RADEON_R200_QK2, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
385 { DEVICE_ATI_RADEON_R200_QL2, R_200 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
386 { DEVICE_ATI_RADEON_RV200_QW, R_150|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
387 { DEVICE_ATI_RADEON_RV200_QX, R_150|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
388 { DEVICE_ATI_RADEON_IGP330_340_350,R_200|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
389 { DEVICE_ATI_RADEON_IGP_330M_340M_350M,R_200|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
390 { DEVICE_ATI_RADEON_RV250_IG, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
391 { DEVICE_ATI_RADEON_7000_IGP, R_250|R_OVL_SHIFT|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
392 { DEVICE_ATI_RADEON_MOBILITY_7000, R_250|R_OVL_SHIFT|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
393 { DEVICE_ATI_RADEON_RV250_ID, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
394 { DEVICE_ATI_RADEON_RV250_IE, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
395 { DEVICE_ATI_RADEON_RV250_IF, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
396 { DEVICE_ATI_RADEON_RV250_IG, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
397 { DEVICE_ATI_RADEON_R250_LD, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
398 { DEVICE_ATI_RADEON_R250_LE, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
399 { DEVICE_ATI_RADEON_R250_MOBILITY, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
400 { DEVICE_ATI_RADEON_R250_LG, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
401 { DEVICE_ATI_RV250_RADEON_9000, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
402 { DEVICE_ATI_RADEON_RV250_RADEON2, R_250|R_OVL_SHIFT },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
403 { DEVICE_ATI_RV280_RADEON_9200, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
404 { DEVICE_ATI_RV280_RADEON_92002, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
405 { DEVICE_ATI_RV280_RADEON_92003, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
406 { DEVICE_ATI_RV280_RADEON_92004, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
407 { DEVICE_ATI_RV280_RADEON_92005, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
408 { DEVICE_ATI_RV280_RADEON_92006, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
409 { DEVICE_ATI_RV280_RADEON_92007, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
410 { DEVICE_ATI_M9_5C61_RADEON, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
411 { DEVICE_ATI_M9_5C63_RADEON, R_280 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
412 /* Radeon3 (indeed: Rage 1024 Pro ;) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
413 { DEVICE_ATI_R300_AG_FIREGL, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
414 { DEVICE_ATI_RADEON_R300_ND, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
415 { DEVICE_ATI_RADEON_R300_NE, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
416 { DEVICE_ATI_RADEON_R300_NG, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
417 { DEVICE_ATI_R300_AD_RADEON, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
418 { DEVICE_ATI_R300_AE_RADEON, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
419 { DEVICE_ATI_R300_AF_RADEON, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
420 { DEVICE_ATI_RADEON_9100_IGP2, R_300|R_OVL_SHIFT|R_INTEGRATED },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
421 { DEVICE_ATI_RS300M_AGP_RADEON, R_300|R_INTEGRATED },
23124
408e7e8d7121 support for some onboard X200 GPU (patch by rjoco77@kezdionline.ro)
ben
parents: 23065
diff changeset
422 { DEVICE_ATI_RS482_RADEON_XPRESS, R_350|R_INTEGRATED },
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
423 { DEVICE_ATI_R350_AH_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
424 { DEVICE_ATI_R350_AI_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
425 { DEVICE_ATI_R350_AJ_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
426 { DEVICE_ATI_R350_AK_FIRE, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
427 { DEVICE_ATI_RADEON_R350_RADEON2, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
428 { DEVICE_ATI_RADEON_R350_RADEON3, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
429 { DEVICE_ATI_RV350_NJ_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
430 { DEVICE_ATI_R350_NK_FIRE, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
431 { DEVICE_ATI_RV350_AP_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
432 { DEVICE_ATI_RV350_AQ_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
433 { DEVICE_ATI_RV350_AR_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
434 { DEVICE_ATI_RV350_AS_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
435 { DEVICE_ATI_RV350_AT_FIRE, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
436 { DEVICE_ATI_RV350_AU_FIRE, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
437 { DEVICE_ATI_RV350_AV_FIRE, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
438 { DEVICE_ATI_RV350_AW_FIRE, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
439 { DEVICE_ATI_RV350_MOBILITY_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
440 { DEVICE_ATI_RV350_NF_RADEON, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
441 { DEVICE_ATI_RV350_NJ_RADEON, R_300 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
442 { DEVICE_ATI_RV350_AS_RADEON2, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
443 { DEVICE_ATI_M10_NQ_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
444 { DEVICE_ATI_M10_NQ_RADEON2, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
445 { DEVICE_ATI_RV350_MOBILITY_RADEON2, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
446 { DEVICE_ATI_M10_NS_RADEON, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
447 { DEVICE_ATI_M10_NT_FIREGL, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
448 { DEVICE_ATI_M11_NV_FIREGL, R_350 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
449 { DEVICE_ATI_RV370_5B60_RADEON, R_370|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
450 { DEVICE_ATI_RV370_SAPPHIRE_X550, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
451 { DEVICE_ATI_RV370_5B64_FIREGL, R_370|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
452 { DEVICE_ATI_RV370_5B65_FIREGL, R_370|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
453 { DEVICE_ATI_M24_1P_RADEON, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
454 { DEVICE_ATI_M22_RADEON_MOBILITY, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
455 { DEVICE_ATI_M24_1T_FIREGL, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
456 { DEVICE_ATI_M24_RADEON_MOBILITY, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
457 { DEVICE_ATI_RV370_RADEON_X300SE, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
458 { DEVICE_ATI_RV370_SECONDARY_SAPPHIRE, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
459 { DEVICE_ATI_RV370_5B64_FIREGL2, R_370 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
460 { DEVICE_ATI_RV380_0X3E50_RADEON, R_380|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
461 { DEVICE_ATI_RV380_0X3E54_FIREGL, R_380|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
462 { DEVICE_ATI_RV380_RADEON_X600, R_380|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
463 { DEVICE_ATI_RV380_RADEON_X6002, R_380 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
464 { DEVICE_ATI_RV380_RADEON_X6003, R_380 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
465 { DEVICE_ATI_RV410_FIREGL_V5000, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
466 { DEVICE_ATI_RV410_FIREGL_V3300, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
467 { DEVICE_ATI_RV410_RADEON_X700XT, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
468 { DEVICE_ATI_RV410_RADEON_X700, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
469 { DEVICE_ATI_RV410_RADEON_X700SE, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
470 { DEVICE_ATI_RV410_RADEON_X7002, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
471 { DEVICE_ATI_RV410_RADEON_X7003, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
472 { DEVICE_ATI_RV410_RADEON_X7004, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
473 { DEVICE_ATI_RV410_RADEON_X7005, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
474 { DEVICE_ATI_M26_MOBILITY_FIREGL, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
475 { DEVICE_ATI_M26_MOBILITY_FIREGL2, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
476 { DEVICE_ATI_M26_RADEON_MOBILITY, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
477 { DEVICE_ATI_M26_RADEON_MOBILITY2, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
478 { DEVICE_ATI_RADEON_MOBILITY_X700, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
479 { DEVICE_ATI_R420_JH_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
480 { DEVICE_ATI_R420_JI_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
481 { DEVICE_ATI_R420_JJ_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
482 { DEVICE_ATI_R420_JK_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
483 { DEVICE_ATI_R420_JL_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
484 { DEVICE_ATI_R420_JM_FIREGL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
485 { DEVICE_ATI_M18_JN_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
486 { DEVICE_ATI_R420_JP_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
487 { DEVICE_ATI_R420_RADEON_X800, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
488 { DEVICE_ATI_R420_RADEON_X8002, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
489 { DEVICE_ATI_R420_RADEON_X8003, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
490 { DEVICE_ATI_R420_RADEON_X8004, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
491 { DEVICE_ATI_R420_RADEON_X8005, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
492 { DEVICE_ATI_R420_JM_FIREGL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
493 { DEVICE_ATI_R423_5F57_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
494 { DEVICE_ATI_R423_5F57_RADEON2, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
495 { DEVICE_ATI_R423_UH_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
496 { DEVICE_ATI_R423_UI_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
497 { DEVICE_ATI_R423_UJ_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
498 { DEVICE_ATI_R423_UK_RADEON, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
499 { DEVICE_ATI_R423_FIRE_GL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
500 { DEVICE_ATI_R423_UQ_FIREGL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
501 { DEVICE_ATI_R423_UR_FIREGL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
502 { DEVICE_ATI_R423_UT_FIREGL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
503 { DEVICE_ATI_R423_UI_RADEON2, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
504 { DEVICE_ATI_R423GL_SE_ATI_FIREGL, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
505 { DEVICE_ATI_R423_RADEON_X800XT, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
506 { DEVICE_ATI_RADEON_R423_UK, R_420|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
507 { DEVICE_ATI_M28_RADEON_MOBILITY, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
508 { DEVICE_ATI_M28_MOBILITY_FIREGL, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
509 { DEVICE_ATI_MOBILITY_RADEON_X800, R_420 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
510 { DEVICE_ATI_R430_RADEON_X800, R_430|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
511 { DEVICE_ATI_R430_RADEON_X8002, R_430|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
512 { DEVICE_ATI_R430_RADEON_X8003, R_430|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
513 { DEVICE_ATI_R430_RADEON_X8004, R_430|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
514 { DEVICE_ATI_R480_RADEON_X800, R_480 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
515 { DEVICE_ATI_R480_RADEON_X8002, R_480 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
516 { DEVICE_ATI_R480_RADEON_X850XT, R_480 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
517 { DEVICE_ATI_R480_RADEON_X850PRO, R_480 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
518 { DEVICE_ATI_R481_RADEON_X850XT_PE, R_480|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
519 { DEVICE_ATI_R480_RADEON_X850XT2, R_480 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
520 { DEVICE_ATI_R480_RADEON_X850PRO2, R_480 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
521 { DEVICE_ATI_R481_RADEON_X850XT_PE2, R_480|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
522 { DEVICE_ATI_R480_RADEON_X850XT3, R_480|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
523 { DEVICE_ATI_R480_RADEON_X850XT4, R_480|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
524 { DEVICE_ATI_R480_RADEON_X850XT5, R_480|R_PCIE },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
525 { DEVICE_ATI_R480_RADEON_X850XT6, R_480|R_PCIE },
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
526 #endif
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
527 };
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
528
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
529
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
530 static void * radeon_mmio_base = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
531 static void * radeon_mem_base = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
532 static int32_t radeon_overlay_off = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
533 static uint32_t radeon_ram_size = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
534
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
535 #define GETREG(TYPE,PTR,OFFZ) (*((volatile TYPE*)((PTR)+(OFFZ))))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
536 #define SETREG(TYPE,PTR,OFFZ,VAL) (*((volatile TYPE*)((PTR)+(OFFZ))))=VAL
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
537
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
538 #define INREG8(addr) GETREG(uint8_t,(uint8_t *)(radeon_mmio_base),addr)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
539 #define OUTREG8(addr,val) SETREG(uint8_t,(uint8_t *)(radeon_mmio_base),addr,val)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
540 static inline uint32_t INREG (uint32_t addr) {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
541 uint32_t tmp = GETREG(uint32_t,(uint8_t *)(radeon_mmio_base),addr);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
542 return le2me_32(tmp);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
543 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
544 #define OUTREG(addr,val) SETREG(uint32_t,(uint8_t *)(radeon_mmio_base),addr,le2me_32(val))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
545 #define OUTREGP(addr,val,mask) \
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
546 do { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
547 unsigned int _tmp = INREG(addr); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
548 _tmp &= (mask); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
549 _tmp |= (val); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
550 OUTREG(addr, _tmp); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
551 } while (0)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
552
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
553 static __inline__ uint32_t INPLL(uint32_t addr)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
554 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
555 OUTREG8(CLOCK_CNTL_INDEX, addr & 0x0000001f);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
556 return (INREG(CLOCK_CNTL_DATA));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
557 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
558
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
559 #define OUTPLL(addr,val) OUTREG8(CLOCK_CNTL_INDEX, (addr & 0x0000001f) | 0x00000080); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
560 OUTREG(CLOCK_CNTL_DATA, val)
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
561 #define OUTPLLP(addr,val,mask) \
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
562 do { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
563 unsigned int _tmp = INPLL(addr); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
564 _tmp &= (mask); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
565 _tmp |= (val); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
566 OUTPLL(addr, _tmp); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
567 } while (0)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
568
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
569 #ifndef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
570 enum radeon_montype
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
571 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
572 MT_NONE,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
573 MT_CRT, /* CRT-(cathode ray tube) analog monitor. (15-pin VGA connector) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
574 MT_LCD, /* Liquid Crystal Display */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
575 MT_DFP, /* DFP-digital flat panel monitor. (24-pin DVI-I connector) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
576 MT_CTV, /* Composite TV out (not in VE) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
577 MT_STV /* S-Video TV out (probably in VE only) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
578 };
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
579
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
580 typedef struct radeon_info_s
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
581 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
582 int hasCRTC2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
583 int crtDispType;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
584 int dviDispType;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
585 }rinfo_t;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
586
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
587 static rinfo_t rinfo;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
588
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
589 static char * GET_MON_NAME(int type)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
590 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
591 char *pret;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
592 switch(type)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
593 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
594 case MT_NONE: pret = "no"; break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
595 case MT_CRT: pret = "CRT"; break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
596 case MT_DFP: pret = "DFP"; break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
597 case MT_LCD: pret = "LCD"; break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
598 case MT_CTV: pret = "CTV"; break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
599 case MT_STV: pret = "STV"; break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
600 default: pret = "Unknown";
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
601 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
602 return pret;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
603 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
604
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
605 static void radeon_get_moninfo (rinfo_t *rinfo)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
606 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
607 unsigned int tmp;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
608
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
609 tmp = INREG(RADEON_BIOS_4_SCRATCH);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
610
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
611 if (rinfo->hasCRTC2) {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
612 /* primary DVI port */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
613 if (tmp & 0x08)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
614 rinfo->dviDispType = MT_DFP;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
615 else if (tmp & 0x4)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
616 rinfo->dviDispType = MT_LCD;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
617 else if (tmp & 0x200)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
618 rinfo->dviDispType = MT_CRT;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
619 else if (tmp & 0x10)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
620 rinfo->dviDispType = MT_CTV;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
621 else if (tmp & 0x20)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
622 rinfo->dviDispType = MT_STV;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
623
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
624 /* secondary CRT port */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
625 if (tmp & 0x2)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
626 rinfo->crtDispType = MT_CRT;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
627 else if (tmp & 0x800)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
628 rinfo->crtDispType = MT_DFP;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
629 else if (tmp & 0x400)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
630 rinfo->crtDispType = MT_LCD;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
631 else if (tmp & 0x1000)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
632 rinfo->crtDispType = MT_CTV;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
633 else if (tmp & 0x2000)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
634 rinfo->crtDispType = MT_STV;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
635 } else {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
636 rinfo->dviDispType = MT_NONE;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
637
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
638 tmp = INREG(FP_GEN_CNTL);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
639
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
640 if (tmp & FP_EN_TMDS)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
641 rinfo->crtDispType = MT_DFP;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
642 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
643 rinfo->crtDispType = MT_CRT;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
644 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
645 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
646 #endif
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
647
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
648 static uint32_t radeon_vid_get_dbpp( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
649 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
650 uint32_t dbpp,retval;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
651 dbpp = (INREG(CRTC_GEN_CNTL)>>8)& 0xF;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
652 switch(dbpp)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
653 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
654 case DST_8BPP: retval = 8; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
655 case DST_15BPP: retval = 15; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
656 case DST_16BPP: retval = 16; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
657 case DST_24BPP: retval = 24; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
658 default: retval=32; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
659 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
660 return retval;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
661 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
662
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
663 static int radeon_is_dbl_scan( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
664 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
665 return (INREG(CRTC_GEN_CNTL))&CRTC_DBL_SCAN_EN;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
666 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
667
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
668 static int radeon_is_interlace( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
669 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
670 return (INREG(CRTC_GEN_CNTL))&CRTC_INTERLACE_EN;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
671 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
672
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
673 static uint32_t radeon_get_xres( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
674 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
675 uint32_t xres,h_total;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
676 #ifndef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
677 if(rinfo.hasCRTC2 &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
678 (rinfo.dviDispType == MT_CTV || rinfo.dviDispType == MT_STV))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
679 h_total = INREG(CRTC2_H_TOTAL_DISP);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
680 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
681 #endif
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
682 h_total = INREG(CRTC_H_TOTAL_DISP);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
683 xres = (h_total >> 16) & 0xffff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
684 return (xres + 1)*8;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
685 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
686
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
687 static uint32_t radeon_get_yres( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
688 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
689 uint32_t yres,v_total;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
690 #ifndef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
691 if(rinfo.hasCRTC2 &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
692 (rinfo.dviDispType == MT_CTV || rinfo.dviDispType == MT_STV))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
693 v_total = INREG(CRTC2_V_TOTAL_DISP);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
694 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
695 #endif
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
696 v_total = INREG(CRTC_V_TOTAL_DISP);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
697 yres = (v_total >> 16) & 0xffff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
698 return yres + 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
699 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
700
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
701 static void radeon_wait_vsync(void)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
702 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
703 int i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
704
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
705 OUTREG(GEN_INT_STATUS, VSYNC_INT_AK);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
706 for (i = 0; i < 2000000; i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
707 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
708 if (INREG(GEN_INT_STATUS) & VSYNC_INT) break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
709 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
710 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
711
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
712 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
713 static void _radeon_engine_idle(void);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
714 static void _radeon_fifo_wait(unsigned);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
715 #define radeon_engine_idle() _radeon_engine_idle()
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
716 #define radeon_fifo_wait(entries) _radeon_fifo_wait(entries)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
717 /* Flush all dirty data in the Pixel Cache to memory. */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
718 static __inline__ void radeon_engine_flush ( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
719 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
720 unsigned i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
721
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
722 OUTREGP(PC_NGUI_CTLSTAT, PC_FLUSH_ALL, ~PC_FLUSH_ALL);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
723 for (i = 0; i < 2000000; i++) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
724 if (!(INREG(PC_NGUI_CTLSTAT) & PC_BUSY)) break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
725 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
726 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
727
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
728 /* Reset graphics card to known state. */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
729 static void radeon_engine_reset( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
730 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
731 uint32_t clock_cntl_index;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
732 uint32_t mclk_cntl;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
733 uint32_t gen_reset_cntl;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
734
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
735 radeon_engine_flush();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
736
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
737 clock_cntl_index = INREG(CLOCK_CNTL_INDEX);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
738 mclk_cntl = INPLL(MCLK_CNTL);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
739
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
740 OUTPLL(MCLK_CNTL, mclk_cntl | FORCE_GCP | FORCE_PIPE3D_CP);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
741
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
742 gen_reset_cntl = INREG(GEN_RESET_CNTL);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
743
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
744 OUTREG(GEN_RESET_CNTL, gen_reset_cntl | SOFT_RESET_GUI);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
745 INREG(GEN_RESET_CNTL);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
746 OUTREG(GEN_RESET_CNTL,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
747 gen_reset_cntl & (uint32_t)(~SOFT_RESET_GUI));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
748 INREG(GEN_RESET_CNTL);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
749
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
750 OUTPLL(MCLK_CNTL, mclk_cntl);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
751 OUTREG(CLOCK_CNTL_INDEX, clock_cntl_index);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
752 OUTREG(GEN_RESET_CNTL, gen_reset_cntl);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
753 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
754 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
755
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
756 static __inline__ void radeon_engine_flush ( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
757 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
758 int i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
759
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
760 /* initiate flush */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
761 OUTREGP(RB2D_DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL,
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
762 ~RB2D_DC_FLUSH_ALL);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
763
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
764 for (i=0; i < 2000000; i++) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
765 if (!(INREG(RB2D_DSTCACHE_CTLSTAT) & RB2D_DC_BUSY))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
766 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
767 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
768 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
769
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
770 static void _radeon_engine_idle(void);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
771 static void _radeon_fifo_wait(unsigned);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
772 #define radeon_engine_idle() _radeon_engine_idle()
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
773 #define radeon_fifo_wait(entries) _radeon_fifo_wait(entries)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
774
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
775 static void radeon_engine_reset( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
776 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
777 uint32_t clock_cntl_index, mclk_cntl, rbbm_soft_reset;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
778
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
779 radeon_engine_flush ();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
780
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
781 clock_cntl_index = INREG(CLOCK_CNTL_INDEX);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
782 mclk_cntl = INPLL(MCLK_CNTL);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
783
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
784 OUTPLL(MCLK_CNTL, (mclk_cntl |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
785 FORCEON_MCLKA |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
786 FORCEON_MCLKB |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
787 FORCEON_YCLKA |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
788 FORCEON_YCLKB |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
789 FORCEON_MC |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
790 FORCEON_AIC));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
791 rbbm_soft_reset = INREG(RBBM_SOFT_RESET);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
792
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
793 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
794 SOFT_RESET_CP |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
795 SOFT_RESET_HI |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
796 SOFT_RESET_SE |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
797 SOFT_RESET_RE |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
798 SOFT_RESET_PP |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
799 SOFT_RESET_E2 |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
800 SOFT_RESET_RB |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
801 SOFT_RESET_HDP);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
802 INREG(RBBM_SOFT_RESET);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
803 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset & (uint32_t)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
804 ~(SOFT_RESET_CP |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
805 SOFT_RESET_HI |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
806 SOFT_RESET_SE |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
807 SOFT_RESET_RE |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
808 SOFT_RESET_PP |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
809 SOFT_RESET_E2 |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
810 SOFT_RESET_RB |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
811 SOFT_RESET_HDP));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
812 INREG(RBBM_SOFT_RESET);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
813
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
814 OUTPLL(MCLK_CNTL, mclk_cntl);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
815 OUTREG(CLOCK_CNTL_INDEX, clock_cntl_index);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
816 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
817
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
818 return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
819 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
820 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
821 static void radeon_engine_restore( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
822 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
823 #ifndef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
824 int pitch64;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
825 uint32_t xres,yres,bpp;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
826 radeon_fifo_wait(1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
827 xres = radeon_get_xres();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
828 yres = radeon_get_yres();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
829 bpp = radeon_vid_get_dbpp();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
830 /* turn of all automatic flushing - we'll do it all */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
831 OUTREG(RB2D_DSTCACHE_MODE, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
832
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
833 pitch64 = ((xres * (bpp / 8) + 0x3f)) >> 6;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
834
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
835 radeon_fifo_wait(1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
836 OUTREG(DEFAULT_OFFSET, (INREG(DEFAULT_OFFSET) & 0xC0000000) |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
837 (pitch64 << 22));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
838
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
839 radeon_fifo_wait(1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
840 #if defined(WORDS_BIGENDIAN)
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
841 OUTREGP(DP_DATATYPE,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
842 HOST_BIG_ENDIAN_EN, ~HOST_BIG_ENDIAN_EN);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
843 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
844 OUTREGP(DP_DATATYPE, 0, ~HOST_BIG_ENDIAN_EN);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
845 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
846
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
847 radeon_fifo_wait(1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
848 OUTREG(DEFAULT_SC_BOTTOM_RIGHT, (DEFAULT_SC_RIGHT_MAX
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
849 | DEFAULT_SC_BOTTOM_MAX));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
850 radeon_fifo_wait(1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
851 OUTREG(DP_GUI_MASTER_CNTL, (INREG(DP_GUI_MASTER_CNTL)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
852 | GMC_BRUSH_SOLID_COLOR
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
853 | GMC_SRC_DATATYPE_COLOR));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
854
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
855 radeon_fifo_wait(7);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
856 OUTREG(DST_LINE_START, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
857 OUTREG(DST_LINE_END, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
858 OUTREG(DP_BRUSH_FRGD_CLR, 0xffffffff);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
859 OUTREG(DP_BRUSH_BKGD_CLR, 0x00000000);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
860 OUTREG(DP_SRC_FRGD_CLR, 0xffffffff);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
861 OUTREG(DP_SRC_BKGD_CLR, 0x00000000);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
862 OUTREG(DP_WRITE_MASK, 0xffffffff);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
863
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
864 radeon_engine_idle();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
865 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
866 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
867 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
868 static void _radeon_fifo_wait (unsigned entries)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
869 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
870 unsigned i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
871
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
872 for(;;)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
873 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
874 for (i=0; i<2000000; i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
875 if ((INREG(GUI_STAT) & GUI_FIFOCNT_MASK) >= entries)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
876 return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
877 radeon_engine_reset();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
878 radeon_engine_restore();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
879 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
880 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
881
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
882 static void _radeon_engine_idle ( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
883 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
884 unsigned i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
885
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
886 /* ensure FIFO is empty before waiting for idle */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
887 radeon_fifo_wait (64);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
888 for(;;)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
889 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
890 for (i=0; i<2000000; i++) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
891 if ((INREG(GUI_STAT) & GUI_ACTIVE) == 0) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
892 radeon_engine_flush ();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
893 return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
894 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
895 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
896 radeon_engine_reset();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
897 radeon_engine_restore();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
898 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
899 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
900 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
901 static void _radeon_fifo_wait (unsigned entries)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
902 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
903 unsigned i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
904
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
905 for(;;)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
906 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
907 for (i=0; i<2000000; i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
908 if ((INREG(RBBM_STATUS) & RBBM_FIFOCNT_MASK) >= entries)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
909 return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
910 radeon_engine_reset();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
911 radeon_engine_restore();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
912 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
913 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
914 static void _radeon_engine_idle ( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
915 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
916 int i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
917
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
918 /* ensure FIFO is empty before waiting for idle */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
919 radeon_fifo_wait (64);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
920 for(;;)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
921 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
922 for (i=0; i<2000000; i++) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
923 if (((INREG(RBBM_STATUS) & RBBM_ACTIVE)) == 0) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
924 radeon_engine_flush ();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
925 return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
926 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
927 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
928 radeon_engine_reset();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
929 radeon_engine_restore();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
930 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
931 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
932 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
933
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
934 #ifndef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
935 /* Reference color space transform data */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
936 typedef struct tagREF_TRANSFORM
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
937 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
938 float RefLuma;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
939 float RefRCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
940 float RefRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
941 float RefGCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
942 float RefGCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
943 float RefBCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
944 float RefBCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
945 } REF_TRANSFORM;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
946
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
947 /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces */
25718
8eddf6a9af7f Make some radeon vidix driver tables static and const
reimar
parents: 25415
diff changeset
948 static const REF_TRANSFORM trans[2] =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
949 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
950 {1.1678, 0.0, 1.6007, -0.3929, -0.8154, 2.0232, 0.0}, /* BT.601 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
951 {1.1678, 0.0, 1.7980, -0.2139, -0.5345, 2.1186, 0.0} /* BT.709 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
952 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
953 /****************************************************************************
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
954 * SetTransform *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
955 * Function: Calculates and sets color space transform from supplied *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
956 * reference transform, gamma, brightness, contrast, hue and *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
957 * saturation. *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
958 * Inputs: bright - brightness *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
959 * cont - contrast *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
960 * sat - saturation *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
961 * hue - hue *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
962 * red_intensity - intense of red component *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
963 * green_intensity - intense of green component *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
964 * blue_intensity - intense of blue component *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
965 * ref - index to the table of refernce transforms *
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
966 * Outputs: NONE *
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
967 ****************************************************************************/
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
968
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
969 static void radeon_set_transform(float bright, float cont, float sat,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
970 float hue, float red_intensity,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
971 float green_intensity,float blue_intensity,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
972 unsigned ref)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
973 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
974 float OvHueSin, OvHueCos;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
975 float CAdjLuma, CAdjOff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
976 float RedAdj,GreenAdj,BlueAdj;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
977 float CAdjRCb, CAdjRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
978 float CAdjGCb, CAdjGCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
979 float CAdjBCb, CAdjBCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
980 float OvLuma, OvROff, OvGOff, OvBOff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
981 float OvRCb, OvRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
982 float OvGCb, OvGCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
983 float OvBCb, OvBCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
984 float Loff = 64.0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
985 float Coff = 512.0f;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
986
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
987 uint32_t dwOvLuma, dwOvROff, dwOvGOff, dwOvBOff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
988 uint32_t dwOvRCb, dwOvRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
989 uint32_t dwOvGCb, dwOvGCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
990 uint32_t dwOvBCb, dwOvBCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
991
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
992 if (ref >= 2) return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
993
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
994 OvHueSin = sin((double)hue);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
995 OvHueCos = cos((double)hue);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
996
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
997 CAdjLuma = cont * trans[ref].RefLuma;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
998 CAdjOff = cont * trans[ref].RefLuma * bright * 1023.0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
999 RedAdj = cont * trans[ref].RefLuma * red_intensity * 1023.0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1000 GreenAdj = cont * trans[ref].RefLuma * green_intensity * 1023.0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1001 BlueAdj = cont * trans[ref].RefLuma * blue_intensity * 1023.0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1002
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1003 CAdjRCb = sat * -OvHueSin * trans[ref].RefRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1004 CAdjRCr = sat * OvHueCos * trans[ref].RefRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1005 CAdjGCb = sat * (OvHueCos * trans[ref].RefGCb - OvHueSin * trans[ref].RefGCr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1006 CAdjGCr = sat * (OvHueSin * trans[ref].RefGCb + OvHueCos * trans[ref].RefGCr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1007 CAdjBCb = sat * OvHueCos * trans[ref].RefBCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1008 CAdjBCr = sat * OvHueSin * trans[ref].RefBCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1009
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1010 OvLuma = CAdjLuma;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1011 OvRCb = CAdjRCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1012 OvRCr = CAdjRCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1013 OvGCb = CAdjGCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1014 OvGCr = CAdjGCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1015 OvBCb = CAdjBCb;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1016 OvBCr = CAdjBCr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1017 OvROff = RedAdj + CAdjOff -
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1018 OvLuma * Loff - (OvRCb + OvRCr) * Coff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1019 OvGOff = GreenAdj + CAdjOff -
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1020 OvLuma * Loff - (OvGCb + OvGCr) * Coff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1021 OvBOff = BlueAdj + CAdjOff -
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1022 OvLuma * Loff - (OvBCb + OvBCr) * Coff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1023
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1024 dwOvROff = ((int)(OvROff * 2.0)) & 0x1fff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1025 dwOvGOff = (int)(OvGOff * 2.0) & 0x1fff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1026 dwOvBOff = (int)(OvBOff * 2.0) & 0x1fff;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1027 /* Whatever docs say about R200 having 3.8 format instead of 3.11
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1028 as in Radeon is a lie */
23048
7973a6935234 removed useless code from vidix drivers
ben
parents: 23046
diff changeset
1029
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1030 dwOvLuma =(((int)(OvLuma * 2048.0))&0x7fff)<<17;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1031 dwOvRCb = (((int)(OvRCb * 2048.0))&0x7fff)<<1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1032 dwOvRCr = (((int)(OvRCr * 2048.0))&0x7fff)<<17;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1033 dwOvGCb = (((int)(OvGCb * 2048.0))&0x7fff)<<1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1034 dwOvGCr = (((int)(OvGCr * 2048.0))&0x7fff)<<17;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1035 dwOvBCb = (((int)(OvBCb * 2048.0))&0x7fff)<<1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1036 dwOvBCr = (((int)(OvBCr * 2048.0))&0x7fff)<<17;
23048
7973a6935234 removed useless code from vidix drivers
ben
parents: 23046
diff changeset
1037
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1038 OUTREG(OV0_LIN_TRANS_A, dwOvRCb | dwOvLuma);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1039 OUTREG(OV0_LIN_TRANS_B, dwOvROff | dwOvRCr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1040 OUTREG(OV0_LIN_TRANS_C, dwOvGCb | dwOvLuma);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1041 OUTREG(OV0_LIN_TRANS_D, dwOvGOff | dwOvGCr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1042 OUTREG(OV0_LIN_TRANS_E, dwOvBCb | dwOvLuma);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1043 OUTREG(OV0_LIN_TRANS_F, dwOvBOff | dwOvBCr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1044 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1045
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1046 /* Gamma curve definition */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1047 typedef struct
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1048 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1049 unsigned int gammaReg;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1050 unsigned int gammaSlope;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1051 unsigned int gammaOffset;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1052 }GAMMA_SETTINGS;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1053
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1054 /* Recommended gamma curve parameters */
25718
8eddf6a9af7f Make some radeon vidix driver tables static and const
reimar
parents: 25415
diff changeset
1055 static const GAMMA_SETTINGS r200_def_gamma[18] =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1056 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1057 {OV0_GAMMA_0_F, 0x100, 0x0000},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1058 {OV0_GAMMA_10_1F, 0x100, 0x0020},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1059 {OV0_GAMMA_20_3F, 0x100, 0x0040},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1060 {OV0_GAMMA_40_7F, 0x100, 0x0080},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1061 {OV0_GAMMA_80_BF, 0x100, 0x0100},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1062 {OV0_GAMMA_C0_FF, 0x100, 0x0100},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1063 {OV0_GAMMA_100_13F, 0x100, 0x0200},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1064 {OV0_GAMMA_140_17F, 0x100, 0x0200},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1065 {OV0_GAMMA_180_1BF, 0x100, 0x0300},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1066 {OV0_GAMMA_1C0_1FF, 0x100, 0x0300},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1067 {OV0_GAMMA_200_23F, 0x100, 0x0400},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1068 {OV0_GAMMA_240_27F, 0x100, 0x0400},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1069 {OV0_GAMMA_280_2BF, 0x100, 0x0500},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1070 {OV0_GAMMA_2C0_2FF, 0x100, 0x0500},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1071 {OV0_GAMMA_300_33F, 0x100, 0x0600},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1072 {OV0_GAMMA_340_37F, 0x100, 0x0600},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1073 {OV0_GAMMA_380_3BF, 0x100, 0x0700},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1074 {OV0_GAMMA_3C0_3FF, 0x100, 0x0700}
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1075 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1076
25718
8eddf6a9af7f Make some radeon vidix driver tables static and const
reimar
parents: 25415
diff changeset
1077 static const GAMMA_SETTINGS r100_def_gamma[6] =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1078 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1079 {OV0_GAMMA_0_F, 0x100, 0x0000},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1080 {OV0_GAMMA_10_1F, 0x100, 0x0020},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1081 {OV0_GAMMA_20_3F, 0x100, 0x0040},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1082 {OV0_GAMMA_40_7F, 0x100, 0x0080},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1083 {OV0_GAMMA_380_3BF, 0x100, 0x0100},
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1084 {OV0_GAMMA_3C0_3FF, 0x100, 0x0100}
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1085 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1086
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1087 static void make_default_gamma_correction( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1088 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1089 size_t i;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1090 if((besr.chip_flags & R_100)==R_100||
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1091 (besr.chip_flags & R_120)==R_120||
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1092 (besr.chip_flags & R_150)==R_150){
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1093 OUTREG(OV0_LIN_TRANS_A, 0x12A00000);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1094 OUTREG(OV0_LIN_TRANS_B, 0x199018FE);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1095 OUTREG(OV0_LIN_TRANS_C, 0x12A0F9B0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1096 OUTREG(OV0_LIN_TRANS_D, 0xF2F0043B);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1097 OUTREG(OV0_LIN_TRANS_E, 0x12A02050);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1098 OUTREG(OV0_LIN_TRANS_F, 0x0000174E);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1099 for(i=0; i<6; i++){
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1100 OUTREG(r100_def_gamma[i].gammaReg,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1101 (r100_def_gamma[i].gammaSlope<<16) |
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1102 r100_def_gamma[i].gammaOffset);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1103 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1104 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1105 else{
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1106 OUTREG(OV0_LIN_TRANS_A, 0x12a20000);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1107 OUTREG(OV0_LIN_TRANS_B, 0x198a190e);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1108 OUTREG(OV0_LIN_TRANS_C, 0x12a2f9da);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1109 OUTREG(OV0_LIN_TRANS_D, 0xf2fe0442);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1110 OUTREG(OV0_LIN_TRANS_E, 0x12a22046);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1111 OUTREG(OV0_LIN_TRANS_F, 0x175f);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1112 /* Default Gamma,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1113 Of 18 segments for gamma cure, all segments in R200 are programmable,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1114 while only lower 4 and upper 2 segments are programmable in Radeon*/
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1115 for(i=0; i<18; i++){
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1116 OUTREG(r200_def_gamma[i].gammaReg,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1117 (r200_def_gamma[i].gammaSlope<<16) |
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1118 r200_def_gamma[i].gammaOffset);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1119 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1120 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1121 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1122 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1123
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1124 static void radeon_vid_make_default(void)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1125 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1126 #ifdef RAGE128
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1127 besr.saturation = 0x0F;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1128 besr.brightness = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1129 OUTREG(OV0_COLOUR_CNTL,0x000F0F00UL); /* Default brihgtness and saturation for Rage128 */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1130 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1131 make_default_gamma_correction();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1132 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1133 besr.deinterlace_pattern = 0x900AAAAA;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1134 OUTREG(OV0_DEINTERLACE_PATTERN,besr.deinterlace_pattern);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1135 besr.deinterlace_on=1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1136 besr.double_buff=1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1137 besr.ckey_on=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1138 besr.graphics_key_msk=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1139 besr.graphics_key_clr=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1140 besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1141 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1142
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1143 static int find_chip(unsigned chip_id)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1144 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1145 unsigned i;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1146 for(i = 0;i < sizeof(ati_card_ids)/sizeof(ati_card_ids_t);i++)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1147 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1148 if(chip_id == ati_card_ids[i].id) return i;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1149 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1150 return -1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1151 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1152
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1153 static pciinfo_t pci_info;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1154 static int probed=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1155
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
1156 static vidix_capability_t def_cap =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1157 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1158 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1159 "BES driver for Rage128 cards",
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1160 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1161 "BES driver for Radeon cards",
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1162 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1163 "Nick Kurshev",
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1164 TYPE_OUTPUT | TYPE_FX,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1165 { 0, 0, 0, 0 },
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1166 2048,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1167 2048,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1168 4,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1169 4,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1170 -1,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1171 FLAG_UPSCALER | FLAG_DOWNSCALER | FLAG_EQUALIZER,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1172 VENDOR_ATI,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1173 0,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1174 { 0, 0, 0, 0}
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1175 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1176
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1177 #if !defined(RAGE128) && defined(HAVE_X11)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1178 static void probe_fireGL_driver(void) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1179 Display *dp = XOpenDisplay ((void*)0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1180 int n = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1181 char **extlist;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1182 if (dp==NULL) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1183 return;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1184 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1185 extlist = XListExtensions (dp, &n);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1186 XCloseDisplay (dp);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1187 if (extlist) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1188 int i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1189 int ext_fgl = 0, ext_fglrx = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1190 for (i = 0; i < n; i++) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1191 if (!strcmp(extlist[i], "ATIFGLEXTENSION")) ext_fgl = 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1192 if (!strcmp(extlist[i], "ATIFGLRXDRI")) ext_fglrx = 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1193 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1194 if (ext_fgl) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1195 printf(RADEON_MSG" ATI FireGl driver detected");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1196 firegl_shift = 0x500000;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1197 if (!ext_fglrx) {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1198 printf(", but DRI seems not to be activated\n");
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1199 printf(RADEON_MSG" Output may not work correctly, check your DRI configration!");
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1200 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1201 printf("\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1202 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1203 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1204 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1205 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1206
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1207 static int radeon_probe(int verbose, int force)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1208 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1209 pciinfo_t lst[MAX_PCI_DEVICES];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1210 unsigned i,num_pci;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1211 int err;
25859
e8af7338a462 Fix illegal identifiers, names starting with __ are reserved for the system.
diego
parents: 25718
diff changeset
1212 verbosity = verbose;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1213 err = pci_scan(lst,&num_pci);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1214 if(err)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1215 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1216 printf(RADEON_MSG" Error occurred during pci scan: %s\n",strerror(err));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1217 return err;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1218 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1219 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1220 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1221 err = ENXIO;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1222 for(i=0;i<num_pci;i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1223 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1224 if(lst[i].vendor == VENDOR_ATI)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1225 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1226 int idx;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1227 const char *dname;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1228 idx = find_chip(lst[i].device);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1229 if(idx == -1 && force == PROBE_NORMAL) continue;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1230 dname = pci_device_name(VENDOR_ATI,lst[i].device);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1231 dname = dname ? dname : "Unknown chip";
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1232 printf(RADEON_MSG" Found chip: %s\n",dname);
23167
2ab3eac7f6da synced with upstream vidix, prevented some drivers to work on some configs/archs
ben
parents: 23165
diff changeset
1233 #if 0
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1234 if ((lst[i].command & PCI_COMMAND_IO) == 0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1235 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1236 printf("[radeon] Device is disabled, ignoring\n");
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1237 continue;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1238 }
23167
2ab3eac7f6da synced with upstream vidix, prevented some drivers to work on some configs/archs
ben
parents: 23165
diff changeset
1239 #endif
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1240 memset(&besr,0,sizeof(bes_registers_t));
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1241 if(force > PROBE_NORMAL)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1242 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1243 printf(RADEON_MSG" Driver was forced. Was found %sknown chip\n",idx == -1 ? "un" : "");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1244 if(idx == -1)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1245 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1246 printf(RADEON_MSG" Assuming it as Rage128\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1247 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1248 printf(RADEON_MSG" Assuming it as Radeon1\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1249 #endif
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1250 besr.chip_flags=R_100|R_OVL_SHIFT;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1251 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1252 #if !defined(RAGE128) && defined(HAVE_X11)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1253 probe_fireGL_driver();
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1254 #endif
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1255 if(idx != -1) besr.chip_flags=ati_card_ids[idx].flags;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1256 def_cap.device_id = lst[i].device;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1257 err = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1258 memcpy(&pci_info,&lst[i],sizeof(pciinfo_t));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1259 probed=1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1260 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1261 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1262 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1263 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1264 if(err && verbose) printf(RADEON_MSG" Can't find chip\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1265 return err;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1266 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1267
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1268 typedef struct saved_regs_s
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1269 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1270 uint32_t ov0_vid_key_clr;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1271 uint32_t ov0_vid_key_msk;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1272 uint32_t ov0_graphics_key_clr;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1273 uint32_t ov0_graphics_key_msk;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1274 uint32_t ov0_key_cntl;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1275 uint32_t disp_merge_cntl;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1276 }saved_regs_t;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1277 static saved_regs_t savreg;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1278
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1279 static void save_regs( void )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1280 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1281 radeon_fifo_wait(6);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1282 savreg.ov0_vid_key_clr = INREG(OV0_VID_KEY_CLR);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1283 savreg.ov0_vid_key_msk = INREG(OV0_VID_KEY_MSK);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1284 savreg.ov0_graphics_key_clr = INREG(OV0_GRAPHICS_KEY_CLR);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1285 savreg.ov0_graphics_key_msk = INREG(OV0_GRAPHICS_KEY_MSK);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1286 savreg.ov0_key_cntl = INREG(OV0_KEY_CNTL);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1287 savreg.disp_merge_cntl = INREG(DISP_MERGE_CNTL);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1288 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1289
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1290 static void restore_regs( void )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1291 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1292 radeon_fifo_wait(6);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1293 OUTREG(OV0_VID_KEY_CLR,savreg.ov0_vid_key_clr);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1294 OUTREG(OV0_VID_KEY_MSK,savreg.ov0_vid_key_msk);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1295 OUTREG(OV0_GRAPHICS_KEY_CLR,savreg.ov0_graphics_key_clr);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1296 OUTREG(OV0_GRAPHICS_KEY_MSK,savreg.ov0_graphics_key_msk);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1297 OUTREG(OV0_KEY_CNTL,savreg.ov0_key_cntl);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1298 OUTREG(DISP_MERGE_CNTL,savreg.disp_merge_cntl);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1299 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1300
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1301 static int radeon_init(void)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1302 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1303 int err;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1304
25859
e8af7338a462 Fix illegal identifiers, names starting with __ are reserved for the system.
diego
parents: 25718
diff changeset
1305 if(verbosity > 0) printf("[radeon_vid] version %d\n", VIDIX_VERSION);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1306
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1307 if(!probed)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1308 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1309 printf(RADEON_MSG" Driver was not probed but is being initializing\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1310 return EINTR;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1311 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1312 if((radeon_mmio_base = map_phys_mem(pci_info.base2,0xFFFF))==(void *)-1) return ENOMEM;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1313 radeon_ram_size = INREG(CONFIG_MEMSIZE);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1314 /* mem size is bits [28:0], mask off the rest. Range: from 1Mb up to 512 Mb */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1315 radeon_ram_size &= CONFIG_MEMSIZE_MASK;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1316 #ifdef RADEON
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1317 /* according to XFree86 4.2.0, some production M6's return 0 for 8MB */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1318 if (radeon_ram_size == 0 &&
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1319 (def_cap.device_id == DEVICE_ATI_RADEON_MOBILITY_M6 ||
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1320 def_cap.device_id == DEVICE_ATI_RADEON_MOBILITY_M62))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1321 {
23163
9e97f26e0c2b spelling fix
ben
parents: 23125
diff changeset
1322 printf(RADEON_MSG" Working around buggy Radeon Mobility M6 (0 vs. 8MB ram)\n");
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1323 radeon_ram_size = 8192*1024;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1324 }
23125
48fdbc777870 onboard X200 GPU (shared memory) returns a 0 RAM size (patch by rjoco77@kezdionline.ro)
ben
parents: 23124
diff changeset
1325 else if (radeon_ram_size == 0 &&
48fdbc777870 onboard X200 GPU (shared memory) returns a 0 RAM size (patch by rjoco77@kezdionline.ro)
ben
parents: 23124
diff changeset
1326 (def_cap.device_id == DEVICE_ATI_RS482_RADEON_XPRESS))
48fdbc777870 onboard X200 GPU (shared memory) returns a 0 RAM size (patch by rjoco77@kezdionline.ro)
ben
parents: 23124
diff changeset
1327 {
23164
e9298e9c6a74 accurate X200 memory size detection (patch by rjoco77 at kezdionline dot ro)
ben
parents: 23163
diff changeset
1328 printf(RADEON_MSG" Working around buggy RS482 Radeon Xpress 200 Memory Detection\n");
e9298e9c6a74 accurate X200 memory size detection (patch by rjoco77 at kezdionline dot ro)
ben
parents: 23163
diff changeset
1329 radeon_ram_size = (INREG(CONFIG_MEMSIZE) + 0x100000) << 2;
e9298e9c6a74 accurate X200 memory size detection (patch by rjoco77 at kezdionline dot ro)
ben
parents: 23163
diff changeset
1330 radeon_ram_size &= CONFIG_MEMSIZE_MASK;
23125
48fdbc777870 onboard X200 GPU (shared memory) returns a 0 RAM size (patch by rjoco77@kezdionline.ro)
ben
parents: 23124
diff changeset
1331 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1332 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1333 /* Rage Mobility (rage128) also has memsize bug */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1334 if (radeon_ram_size == 0 &&
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1335 (def_cap.device_id == DEVICE_ATI_RAGE_MOBILITY_M3 ||
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1336 def_cap.device_id == DEVICE_ATI_RAGE_MOBILITY_M32))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1337 {
23165
a04344a97a7e one more spelling fix
ben
parents: 23164
diff changeset
1338 printf(RADEON_MSG" Working around Rage Mobility M3 (0 vs. 8MB ram)\n");
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1339 radeon_ram_size = 8192*1024;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1340 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1341 #endif
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1342 if((radeon_mem_base = map_phys_mem(pci_info.base0,radeon_ram_size))==(void *)-1) return ENOMEM;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1343 radeon_vid_make_default();
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1344 printf(RADEON_MSG" Video memory = %uMb\n",radeon_ram_size/0x100000);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1345 err = mtrr_set_type(pci_info.base0,radeon_ram_size,MTRR_TYPE_WRCOMB);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1346 if(!err) printf(RADEON_MSG" Set write-combining type of video memory\n");
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1347 #ifndef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1348 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1349 memset(&rinfo,0,sizeof(rinfo_t));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1350 if((besr.chip_flags&R_100) != R_100) rinfo.hasCRTC2 = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1351
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1352 radeon_get_moninfo(&rinfo);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1353 if(rinfo.hasCRTC2) {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1354 printf(RADEON_MSG" DVI port has %s monitor connected\n",GET_MON_NAME(rinfo.dviDispType));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1355 printf(RADEON_MSG" CRT port has %s monitor connected\n",GET_MON_NAME(rinfo.crtDispType));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1356 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1357 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1358 printf(RADEON_MSG" CRT port has %s monitor connected\n",GET_MON_NAME(rinfo.crtDispType));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1359 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1360 #endif
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1361 save_regs();
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1362 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1363 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1364
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1365 static void radeon_destroy(void)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1366 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1367 restore_regs();
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1368 unmap_phys_mem(radeon_mem_base,radeon_ram_size);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1369 unmap_phys_mem(radeon_mmio_base,0xFFFF);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1370 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1371
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
1372 static int radeon_get_caps(vidix_capability_t *to)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1373 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1374 memcpy(to,&def_cap,sizeof(vidix_capability_t));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1375 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1376 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1377
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1378 /*
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1379 Full list of fourcc which are supported by Win2K radeon driver:
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1380 YUY2, UYVY, DDES, OGLT, OGL2, OGLS, OGLB, OGNT, OGNZ, OGNS,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1381 IF09, YVU9, IMC4, M2IA, IYUV, VBID, DXT1, DXT2, DXT3, DXT4, DXT5
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1382 */
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1383 typedef struct fourcc_desc_s
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1384 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1385 uint32_t fourcc;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1386 unsigned max_srcw;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1387 }fourcc_desc_t;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1388
25718
8eddf6a9af7f Make some radeon vidix driver tables static and const
reimar
parents: 25415
diff changeset
1389 static const fourcc_desc_t supported_fourcc[] =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1390 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1391 { IMGFMT_Y800, 1567 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1392 { IMGFMT_YVU9, 1567 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1393 { IMGFMT_IF09, 1567 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1394 { IMGFMT_YV12, 1567 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1395 { IMGFMT_I420, 1567 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1396 { IMGFMT_IYUV, 1567 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1397 { IMGFMT_UYVY, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1398 { IMGFMT_YUY2, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1399 { IMGFMT_YVYU, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1400 { IMGFMT_RGB15, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1401 { IMGFMT_BGR15, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1402 { IMGFMT_RGB16, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1403 { IMGFMT_BGR16, 1551 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1404 { IMGFMT_RGB32, 775 },
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1405 { IMGFMT_BGR32, 775 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1406 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1407
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1408 __inline__ static int is_supported_fourcc(uint32_t fourcc)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1409 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1410 unsigned i;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1411 for(i=0;i<sizeof(supported_fourcc)/sizeof(fourcc_desc_t);i++)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1412 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1413 if(fourcc==supported_fourcc[i].fourcc)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1414 return 1;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1415 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1416 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1417 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1418
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
1419 static int radeon_query_fourcc(vidix_fourcc_t *to)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1420 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1421 if(is_supported_fourcc(to->fourcc))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1422 {
23060
91ad6d4d6a54 simplified depth definition
ben
parents: 23048
diff changeset
1423 to->depth = VID_DEPTH_ALL;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1424 to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1425 VID_CAP_BLEND;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1426 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1427 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1428 else to->depth = to->flags = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1429 return ENOSYS;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1430 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1431
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1432 static double H_scale_ratio;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1433 static void radeon_vid_dump_regs( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1434 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1435 size_t i;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1436 printf(RADEON_MSG"*** Begin of DRIVER variables dump ***\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1437 printf(RADEON_MSG"radeon_mmio_base=%p\n",radeon_mmio_base);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1438 printf(RADEON_MSG"radeon_mem_base=%p\n",radeon_mem_base);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1439 printf(RADEON_MSG"radeon_overlay_off=%08X\n",radeon_overlay_off);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1440 printf(RADEON_MSG"radeon_ram_size=%08X\n",radeon_ram_size);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1441 printf(RADEON_MSG"video mode: %ux%u@%u\n",radeon_get_xres(),radeon_get_yres(),radeon_vid_get_dbpp());
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1442 printf(RADEON_MSG"H_scale_ratio=%8.2f\n",H_scale_ratio);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1443 printf(RADEON_MSG"*** Begin of OV0 registers dump ***\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1444 for(i=0;i<sizeof(vregs)/sizeof(video_registers_t);i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1445 printf(RADEON_MSG"%s = %08X\n",vregs[i].sname,INREG(vregs[i].name));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1446 printf(RADEON_MSG"*** End of OV0 registers dump ***\n");
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1447 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1448
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1449 static void radeon_vid_stop_video( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1450 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1451 radeon_engine_idle();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1452 OUTREG(OV0_SCALE_CNTL, SCALER_SOFT_RESET);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1453 OUTREG(OV0_EXCLUSIVE_HORZ, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1454 OUTREG(OV0_AUTO_FLIP_CNTL, 0); /* maybe */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1455 OUTREG(OV0_FILTER_CNTL, FILTER_HARDCODED_COEF);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1456 #ifdef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1457 OUTREG(OV0_KEY_CNTL, GRAPHIC_KEY_FN_NE);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1458 #else
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1459 OUTREG(OV0_KEY_CNTL, GRAPHIC_KEY_FN_EQ);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1460 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1461 OUTREG(OV0_TEST, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1462 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1463
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1464 static void radeon_vid_display_video( void )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1465 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1466 int bes_flags,force_second;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1467 radeon_fifo_wait(2);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1468 OUTREG(OV0_REG_LOAD_CNTL, REG_LD_CTL_LOCK);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1469 radeon_engine_idle();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1470 while(!(INREG(OV0_REG_LOAD_CNTL)&REG_LD_CTL_LOCK_READBACK));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1471 radeon_fifo_wait(15);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1472
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1473 force_second=0;
23048
7973a6935234 removed useless code from vidix drivers
ben
parents: 23046
diff changeset
1474
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1475 /* Shutdown capturing */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1476 OUTREG(FCP_CNTL, FCP_CNTL__GND);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1477 OUTREG(CAP0_TRIG_CNTL, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1478
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1479 OUTREG(VID_BUFFER_CONTROL, (1<<16) | 0x01);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1480 OUTREG(DISP_TEST_DEBUG_CNTL, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1481
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1482 OUTREG(OV0_AUTO_FLIP_CNTL,OV0_AUTO_FLIP_CNTL_SOFT_BUF_ODD);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1483
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1484 if(besr.deinterlace_on) OUTREG(OV0_DEINTERLACE_PATTERN,besr.deinterlace_pattern);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1485 #ifdef RAGE128
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1486 OUTREG(OV0_COLOUR_CNTL, (besr.brightness & 0x7f) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1487 (besr.saturation << 8) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1488 (besr.saturation << 16));
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1489 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1490 radeon_fifo_wait(2);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1491 OUTREG(OV0_GRAPHICS_KEY_MSK, besr.graphics_key_msk);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1492 OUTREG(OV0_GRAPHICS_KEY_CLR, besr.graphics_key_clr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1493 OUTREG(OV0_KEY_CNTL,besr.ckey_cntl);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1494
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1495 OUTREG(OV0_H_INC, besr.h_inc);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1496 OUTREG(OV0_STEP_BY, besr.step_by);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1497 if(force_second)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1498 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1499 OUTREG(OV1_Y_X_START, besr.y_x_start);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1500 OUTREG(OV1_Y_X_END, besr.y_x_end);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1501 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1502 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1503 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1504 OUTREG(OV0_Y_X_START, besr.y_x_start);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1505 OUTREG(OV0_Y_X_END, besr.y_x_end);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1506 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1507 OUTREG(OV0_V_INC, besr.v_inc);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1508 OUTREG(OV0_P1_BLANK_LINES_AT_TOP, besr.p1_blank_lines_at_top);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1509 OUTREG(OV0_P23_BLANK_LINES_AT_TOP, besr.p23_blank_lines_at_top);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1510 OUTREG(OV0_VID_BUF_PITCH0_VALUE, besr.vid_buf_pitch0_value);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1511 OUTREG(OV0_VID_BUF_PITCH1_VALUE, besr.vid_buf_pitch1_value);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1512 OUTREG(OV0_P1_X_START_END, besr.p1_x_start_end);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1513 OUTREG(OV0_P2_X_START_END, besr.p2_x_start_end);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1514 OUTREG(OV0_P3_X_START_END, besr.p3_x_start_end);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1515 #ifdef RADEON
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1516 OUTREG(OV0_BASE_ADDR, besr.base_addr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1517 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1518 OUTREG(OV0_VID_BUF0_BASE_ADRS, besr.vid_buf_base_adrs_y[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1519 OUTREG(OV0_VID_BUF1_BASE_ADRS, besr.vid_buf_base_adrs_v[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1520 OUTREG(OV0_VID_BUF2_BASE_ADRS, besr.vid_buf_base_adrs_u[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1521 radeon_fifo_wait(9);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1522 OUTREG(OV0_VID_BUF3_BASE_ADRS, besr.vid_buf_base_adrs_y[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1523 OUTREG(OV0_VID_BUF4_BASE_ADRS, besr.vid_buf_base_adrs_v[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1524 OUTREG(OV0_VID_BUF5_BASE_ADRS, besr.vid_buf_base_adrs_u[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1525 OUTREG(OV0_P1_V_ACCUM_INIT, besr.p1_v_accum_init);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1526 OUTREG(OV0_P1_H_ACCUM_INIT, besr.p1_h_accum_init);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1527 OUTREG(OV0_P23_H_ACCUM_INIT, besr.p23_h_accum_init);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1528 OUTREG(OV0_P23_V_ACCUM_INIT, besr.p23_v_accum_init);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1529
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1530 bes_flags = SCALER_ENABLE |
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1531 SCALER_SMART_SWITCH |
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1532 SCALER_Y2R_TEMP |
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1533 SCALER_PIX_EXPAND;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1534 if(besr.double_buff) bes_flags |= SCALER_DOUBLE_BUFFER;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1535 if(besr.deinterlace_on) bes_flags |= SCALER_ADAPTIVE_DEINT;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1536 if(besr.horz_pick_nearest) bes_flags |= SCALER_HORZ_PICK_NEAREST;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1537 if(besr.vert_pick_nearest) bes_flags |= SCALER_VERT_PICK_NEAREST;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1538 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1539 bes_flags |= SCALER_BURST_PER_PLANE;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1540 #endif
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1541 bes_flags |= (besr.surf_id << 8) & SCALER_SURFAC_FORMAT;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1542 if(besr.load_prg_start) bes_flags |= SCALER_PRG_LOAD_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1543 if(force_second) bes_flags |= SCALER_USE_OV1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1544 else bes_flags &= ~SCALER_USE_OV1;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1545 OUTREG(OV0_SCALE_CNTL, bes_flags);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1546 radeon_fifo_wait(6);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1547 OUTREG(OV0_FILTER_CNTL,besr.filter_cntl);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1548 OUTREG(OV0_FOUR_TAP_COEF_0,besr.four_tap_coeff[0]);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1549 OUTREG(OV0_FOUR_TAP_COEF_1,besr.four_tap_coeff[1]);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1550 OUTREG(OV0_FOUR_TAP_COEF_2,besr.four_tap_coeff[2]);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1551 OUTREG(OV0_FOUR_TAP_COEF_3,besr.four_tap_coeff[3]);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1552 OUTREG(OV0_FOUR_TAP_COEF_4,besr.four_tap_coeff[4]);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1553 if(besr.swap_uv) OUTREG(OV0_TEST,INREG(OV0_TEST)|OV0_SWAP_UV);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1554 OUTREG(OV0_REG_LOAD_CNTL, 0);
25859
e8af7338a462 Fix illegal identifiers, names starting with __ are reserved for the system.
diego
parents: 25718
diff changeset
1555 if(verbosity > VERBOSE_LEVEL) printf(RADEON_MSG"we wanted: scaler=%08X\n",bes_flags);
e8af7338a462 Fix illegal identifiers, names starting with __ are reserved for the system.
diego
parents: 25718
diff changeset
1556 if(verbosity > VERBOSE_LEVEL) radeon_vid_dump_regs();
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1557 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1558
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1559 /* Goal of this function: hide RGB background and provide black screen around movie.
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1560 Useful in '-vo fbdev:vidix -fs -zoom' mode.
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1561 Reverse effect to colorkey */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1562 #ifdef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1563 static void radeon_vid_exclusive( void )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1564 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1565 /* this function works only with Rage128.
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1566 Radeon should has something the same */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1567 unsigned screenw,screenh;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1568 screenw = radeon_get_xres();
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1569 screenh = radeon_get_yres();
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1570 radeon_fifo_wait(2);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1571 OUTREG(OV0_EXCLUSIVE_VERT,(((screenh-1)<<16)&EXCL_VERT_END_MASK));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1572 OUTREG(OV0_EXCLUSIVE_HORZ,(((screenw/8+1)<<8)&EXCL_HORZ_END_MASK)|EXCL_HORZ_EXCLUSIVE_EN);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1573 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1574
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1575 static void radeon_vid_non_exclusive( void )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1576 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1577 OUTREG(OV0_EXCLUSIVE_HORZ,0);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1578 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1579 #endif
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1580
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1581 static unsigned radeon_query_pitch(unsigned fourcc,const vidix_yuv_t *spitch)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1582 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1583 unsigned pitch,spy,spv,spu;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1584 spy = spv = spu = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1585 switch(spitch->y)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1586 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1587 case 16:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1588 case 32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1589 case 64:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1590 case 128:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1591 case 256: spy = spitch->y; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1592 default: break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1593 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1594 switch(spitch->u)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1595 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1596 case 16:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1597 case 32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1598 case 64:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1599 case 128:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1600 case 256: spu = spitch->u; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1601 default: break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1602 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1603 switch(spitch->v)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1604 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1605 case 16:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1606 case 32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1607 case 64:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1608 case 128:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1609 case 256: spv = spitch->v; break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1610 default: break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1611 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1612 switch(fourcc)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1613 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1614 /* 4:2:0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1615 case IMGFMT_IYUV:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1616 case IMGFMT_YV12:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1617 case IMGFMT_I420:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1618 if(spy > 16 && spu == spy/2 && spv == spy/2) pitch = spy;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1619 else pitch = 32;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1620 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1621 case IMGFMT_IF09:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1622 case IMGFMT_YVU9:
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1623 if(spy >= 64 && spu == spy/4 && spv == spy/4) pitch = spy;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1624 else pitch = 64;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1625 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1626 default:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1627 if(spy >= 16) pitch = spy;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1628 else pitch = 16;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1629 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1630 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1631 return pitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1632 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1633
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1634 static void Calc_H_INC_STEP_BY (
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1635 int fieldvalue_OV0_SURFACE_FORMAT,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1636 double H_scale_ratio,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1637 int DisallowFourTapVertFiltering,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1638 int DisallowFourTapUVVertFiltering,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1639 uint32_t *val_OV0_P1_H_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1640 uint32_t *val_OV0_P1_H_STEP_BY,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1641 uint32_t *val_OV0_P23_H_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1642 uint32_t *val_OV0_P23_H_STEP_BY,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1643 int *P1GroupSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1644 int *P1StepSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1645 int *P23StepSize )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1646 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1647
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1648 double ClocksNeededFor16Pixels;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1649
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1650 switch (fieldvalue_OV0_SURFACE_FORMAT)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1651 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1652 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1653 case 4: /*16BPP (ARGB1555 and RGB565) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1654 /* All colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1655 *P1GroupSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1656 /* We don't support four tap in this mode because G's are split between two bytes. In theory we could support it if */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1657 /* we saved part of the G when fetching the R, and then filter the G, followed by the B in the following cycles. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1658 if (H_scale_ratio>=.5)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1659 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1660 /* We are actually generating two pixels (but 3 colour components) per tick. Thus we don't have to skip */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1661 /* until we reach .5. P1 and P23 are the same. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1662 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1663 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1664 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1665 *val_OV0_P23_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1666 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1667 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1668 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1669 else if (H_scale_ratio>=.25)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1670 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1671 /* Step by two */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1672 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1673 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1674 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1675 *val_OV0_P23_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1676 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1677 *P23StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1678 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1679 else if (H_scale_ratio>=.125)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1680 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1681 /* Step by four */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1682 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1683 *val_OV0_P1_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1684 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1685 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1686 *P1StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1687 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1688 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1689 else if (H_scale_ratio>=.0625)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1690 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1691 /* Step by eight */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1692 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1693 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1694 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1695 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1696 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1697 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1698 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1699 else if (H_scale_ratio>=0.03125)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1700 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1701 /* Step by sixteen */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1702 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1703 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1704 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1705 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1706 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1707 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1708 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1709 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1710 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1711 H_scale_ratio=0.03125;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1712 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1713 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1714 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1715 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1716 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1717 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1718 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1719 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1720 case 6: /*32BPP RGB */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1721 if (H_scale_ratio>=1.5 && !DisallowFourTapVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1722 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1723 /* All colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1724 *P1GroupSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1725 /* With four tap filtering, we can generate two colour components every clock, or two pixels every three */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1726 /* clocks. This means that we will have four tap filtering when scaling 1.5 or more. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1727 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1728 *val_OV0_P1_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1729 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1730 *val_OV0_P23_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1731 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1732 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1733 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1734 else if (H_scale_ratio>=0.75)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1735 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1736 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1737 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1738 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1739 /* With two tap filtering, we can generate four colour components every clock. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1740 /* This means that we will have two tap filtering when scaling 1.0 or more. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1741 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1742 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1743 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1744 *val_OV0_P23_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1745 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1746 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1747 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1748 else if (H_scale_ratio>=0.375)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1749 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1750 /* Step by two. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1751 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1752 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1753 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1754 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1755 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1756 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1757 *val_OV0_P23_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1758 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1759 *P23StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1760 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1761 else if (H_scale_ratio>=0.25)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1762 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1763 /* Step by two. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1764 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1765 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1766 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1767 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1768 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1769 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1770 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1771 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1772 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1773 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1774 else if (H_scale_ratio>=0.1875)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1775 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1776 /* Step by four */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1777 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1778 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1779 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1780 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1781 *val_OV0_P1_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1782 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1783 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1784 *P1StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1785 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1786 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1787 else if (H_scale_ratio>=0.125)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1788 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1789 /* Step by four */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1790 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1791 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1792 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1793 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1794 *val_OV0_P1_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1795 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1796 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1797 *P1StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1798 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1799 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1800 else if (H_scale_ratio>=0.09375)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1801 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1802 /* Step by eight */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1803 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1804 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1805 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1806 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1807 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1808 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1809 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1810 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1811 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1812 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1813 else if (H_scale_ratio>=0.0625)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1814 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1815 /* Step by eight */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1816 /* Four G colour components are fetched at once */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1817 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1818 /* R and B colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1819 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1820 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1821 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1822 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1823 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1824 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1825 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1826 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1827 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1828 H_scale_ratio=0.0625;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1829 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1830 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1831 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1832 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1833 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1834 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1835 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1836 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1837 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1838 case 9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1839 /*ToDo_Active: In mode 9 there is a possibility that HScale ratio may be set to an illegal value, so we have extra conditions in the if statement. For consistancy, these conditions be added to the other modes as well. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1840 /* four tap on both (unless Y is too wide) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1841 if ((H_scale_ratio>=(ClocksNeededFor16Pixels=8+2+2) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1842 ((uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1843 ((uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5)<=0x2000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1844 !DisallowFourTapVertFiltering && !DisallowFourTapUVVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1845 { /*0.75 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1846 /* Colour components are fetched in pairs */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1847 *P1GroupSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1848 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1849 *val_OV0_P1_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1850 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1851 *val_OV0_P23_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1852 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1853 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1854 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1855 /* two tap on Y (because it is too big for four tap), four tap on UV */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1856 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=4+2+2) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1857 ((uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1858 ((uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5)<=0x2000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1859 DisallowFourTapVertFiltering && !DisallowFourTapUVVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1860 { /*0.75 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1861 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1862 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1863 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1864 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1865 *val_OV0_P23_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1866 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1867 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1868 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1869 /* We scale the Y with the four tap filters, but UV's are generated
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1870 with dual two tap configuration. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1871 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=8+1+1) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1872 ((uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1873 ((uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5)<=0x2000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1874 !DisallowFourTapVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1875 { /*0.625 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1876 *P1GroupSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1877 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1878 *val_OV0_P1_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1879 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1880 *val_OV0_P23_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1881 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1882 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1883 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1884 /* We scale the Y, U, and V with the two tap filters */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1885 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=4+1+1) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1886 ((uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1887 ((uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1888 { /*0.375 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1889 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1890 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1891 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1892 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1893 *val_OV0_P23_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1894 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1895 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1896 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1897 /* We scale step the U and V by two to allow more bandwidth for fetching Y's,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1898 thus we won't drop Y's yet. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1899 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=4+.5+.5) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1900 ((uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1901 ((uint16_t)((1/(H_scale_ratio*4*2)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1902 { /*>=0.3125 and >.333333~ */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1903 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1904 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1905 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1906 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1907 *val_OV0_P23_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1908 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1909 *P23StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1910 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1911 /* We step the Y, U, and V by two. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1912 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=2+.5+.5) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1913 ((uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1914 ((uint16_t)((1/(H_scale_ratio*4*2)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1915 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1916 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1917 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1918 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1919 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1920 *val_OV0_P23_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1921 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1922 *P23StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1923 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1924 /* We step the Y by two and the U and V by four. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1925 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=2+.25+.25) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1926 ((uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1927 ((uint16_t)((1/(H_scale_ratio*4*4)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1928 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1929 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1930 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1931 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1932 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1933 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1934 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1935 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1936 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1937 /* We step the Y, U, and V by four. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1938 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=1+.25+.25) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1939 ((uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1940 ((uint16_t)((1/(H_scale_ratio*4*4)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1941 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1942 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1943 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1944 *val_OV0_P1_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1945 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1946 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1947 *P1StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1948 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1949 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1950 /* We would like to step the Y by four and the U and V by eight, but we can't mix step by 3 and step by 4 for packed modes */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1951
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1952 /* We step the Y, U, and V by eight. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1953 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=.5+.125+.125) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1954 ((uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1955 ((uint16_t)((1/(H_scale_ratio*4*8)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1956 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1957 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1958 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1959 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1960 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1961 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1962 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1963 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1964 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1965 /* We step the Y by eight and the U and V by sixteen. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1966 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=.5+.0625+.0625) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1967 ((uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1968 ((uint16_t)((1/(H_scale_ratio*4*16)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1969 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1970 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1971 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1972 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1973 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1974 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1975 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1976 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1977 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1978 /* We step the Y, U, and V by sixteen. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1979 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=.25+.0625+.0625) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1980 ((uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5)<=0x3000) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1981 ((uint16_t)((1/(H_scale_ratio*4*16)) * (1<<0xc) + 0.5)<=0x2000))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1982 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1983 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1984 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1985 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1986 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1987 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1988 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1989 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1990 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1991 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1992 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1993 H_scale_ratio=(ClocksNeededFor16Pixels=.25+.0625+.0625) / 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1994 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1995 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1996 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1997 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*4*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1998 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
1999 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2000 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2001 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2002 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2003 case 10:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2004 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2005 case 12:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2006 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2007 case 14: /* YUV12, VYUY422, YUYV422, YOverPkCRCB12, YWovenWithPkCRCB12 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2008 /* We scale the Y, U, and V with the four tap filters */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2009 /* four tap on both (unless Y is too wide) */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2010 if ((H_scale_ratio>=(ClocksNeededFor16Pixels=8+4+4) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2011 !DisallowFourTapVertFiltering && !DisallowFourTapUVVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2012 { /*0.75 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2013 *P1GroupSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2014 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2015 *val_OV0_P1_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2016 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2017 *val_OV0_P23_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2018 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2019 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2020 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2021 /* two tap on Y (because it is too big for four tap), four tap on UV */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2022 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=4+4+4) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2023 DisallowFourTapVertFiltering && !DisallowFourTapUVVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2024 { /*0.75 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2025 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2026 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2027 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2028 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2029 *val_OV0_P23_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2030 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2031 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2032 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2033 /* We scale the Y with the four tap filters, but UV's are generated
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2034 with dual two tap configuration. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2035 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=8+2+2) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2036 !DisallowFourTapVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2037 { /*0.625 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2038 *P1GroupSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2039 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2040 *val_OV0_P1_H_STEP_BY = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2041 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2042 *val_OV0_P23_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2043 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2044 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2045 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2046 /* We scale the Y, U, and V with the two tap filters */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2047 else if (H_scale_ratio>=(ClocksNeededFor16Pixels=4+2+2) / 16.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2048 { /*0.375 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2049 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2050 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2051 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2052 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2053 *val_OV0_P23_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2054 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2055 *P23StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2056 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2057 /* We scale step the U and V by two to allow more bandwidth for
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2058 fetching Y's, thus we won't drop Y's yet. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2059 else if (H_scale_ratio>=(ClocksNeededFor16Pixels=4+1+1) / 16.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2060 { /*0.312 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2061 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2062 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2063 *val_OV0_P1_H_STEP_BY = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2064 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2065 *val_OV0_P23_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2066 *P1StepSize = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2067 *P23StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2068 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2069 /* We step the Y, U, and V by two. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2070 else if (H_scale_ratio>=(ClocksNeededFor16Pixels=2+1+1) / 16.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2071 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2072 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2073 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2074 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2075 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2076 *val_OV0_P23_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2077 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2078 *P23StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2079 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2080 /* We step the Y by two and the U and V by four. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2081 else if (H_scale_ratio>=(ClocksNeededFor16Pixels=2+.5+.5) / 16.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2082 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2083 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2084 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*2)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2085 *val_OV0_P1_H_STEP_BY = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2086 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2087 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2088 *P1StepSize = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2089 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2090 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2091 /* We step the Y, U, and V by four. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2092 else if (H_scale_ratio>=(ClocksNeededFor16Pixels=1+.5+.5) / 16.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2093 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2094 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2095 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2096 *val_OV0_P1_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2097 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2098 *val_OV0_P23_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2099 *P1StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2100 *P23StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2101 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2102 /* We step the Y by four and the U and V by eight. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2103 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=1+.25+.25) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2104 (fieldvalue_OV0_SURFACE_FORMAT==10))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2105 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2106 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2107 /* Can't mix step by 3 and step by 4 for packed modes */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2108 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*4)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2109 *val_OV0_P1_H_STEP_BY = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2110 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2111 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2112 *P1StepSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2113 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2114 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2115 /* We step the Y, U, and V by eight. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2116 else if (H_scale_ratio>=(ClocksNeededFor16Pixels=.5+.25+.25) / 16.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2117 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2118 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2119 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2120 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2121 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2122 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2123 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2124 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2125 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2126 /* We step the Y by eight and the U and V by sixteen. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2127 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=.5+.125+.125) / 16.0) && (fieldvalue_OV0_SURFACE_FORMAT==10))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2128 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2129 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2130 /* Step by 5 not supported for packed modes */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2131 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2132 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2133 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2134 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2135 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2136 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2137 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2138 /* We step the Y, U, and V by sixteen. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2139 else if ((H_scale_ratio>=(ClocksNeededFor16Pixels=.25+.125+.125) / 16.0) &&
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2140 (fieldvalue_OV0_SURFACE_FORMAT==10))
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2141 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2142 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2143 /* Step by 5 not supported for packed modes */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2144 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2145 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2146 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2147 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2148 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2149 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2150 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2151 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2152 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2153 if (fieldvalue_OV0_SURFACE_FORMAT==10)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2154 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2155 H_scale_ratio=(ClocksNeededFor16Pixels=.25+.125+.125) / 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2156 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2157 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2158 *val_OV0_P1_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2159 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*16)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2160 *val_OV0_P23_H_STEP_BY = 5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2161 *P1StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2162 *P23StepSize = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2163 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2164 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2165 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2166 H_scale_ratio=(ClocksNeededFor16Pixels=.5+.25+.25) / 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2167 *P1GroupSize = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2168 *val_OV0_P1_H_INC = (uint16_t)((1/(H_scale_ratio*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2169 *val_OV0_P1_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2170 *val_OV0_P23_H_INC = (uint16_t)((1/(H_scale_ratio*2*8)) * (1<<0xc) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2171 *val_OV0_P23_H_STEP_BY = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2172 *P1StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2173 *P23StepSize = 8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2174 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2175 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2176 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2177 default: break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2178
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2179 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2180 besr.h_inc = (*(val_OV0_P1_H_INC)&0x3fff) | ((*(val_OV0_P23_H_INC)&0x3fff)<<16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2181 besr.step_by = (*(val_OV0_P1_H_STEP_BY)&0x7) | ((*(val_OV0_P23_H_STEP_BY)&0x7)<<8);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2182 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2183
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2184 /* ********************************************************* */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2185 /* ** Setup Black Bordering */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2186 /* ********************************************************* */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2187
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2188 static void ComputeBorders( vidix_playback_t *config, int VertUVSubSample )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2189 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2190 double tempBLANK_LINES_AT_TOP;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2191 unsigned TopLine,BottomLine,SourceLinesUsed,TopUVLine,BottomUVLine,SourceUVLinesUsed;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2192 uint32_t val_OV0_P1_ACTIVE_LINES_M1,val_OV0_P1_BLNK_LN_AT_TOP_M1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2193 uint32_t val_OV0_P23_ACTIVE_LINES_M1,val_OV0_P23_BLNK_LN_AT_TOP_M1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2194
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2195 if (floor(config->src.y)<0) {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2196 tempBLANK_LINES_AT_TOP = -floor(config->src.y);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2197 TopLine = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2198 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2199 else {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2200 tempBLANK_LINES_AT_TOP = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2201 TopLine = (int)floor(config->src.y);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2202 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2203 /* Round rSrcBottom up and subtract one */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2204 if (ceil(config->src.y+config->src.h) > config->src.h)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2205 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2206 BottomLine = config->src.h - 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2207 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2208 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2209 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2210 BottomLine = (int)ceil(config->src.y+config->src.h) - 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2211 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2212
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2213 if (BottomLine >= TopLine)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2214 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2215 SourceLinesUsed = BottomLine - TopLine + 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2216 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2217 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2218 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2219 /*CYCACC_ASSERT(0, "SourceLinesUsed less than or equal to zero.") */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2220 SourceLinesUsed = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2221 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2222
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2223 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2224 int SourceHeightInPixels;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2225 SourceHeightInPixels = BottomLine - TopLine + 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2226 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2227
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2228 val_OV0_P1_ACTIVE_LINES_M1 = SourceLinesUsed - 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2229 val_OV0_P1_BLNK_LN_AT_TOP_M1 = ((int)tempBLANK_LINES_AT_TOP-1) & 0xfff;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2230
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2231 TopUVLine = ((int)(config->src.y/VertUVSubSample) < 0) ? 0: (int)(config->src.y/VertUVSubSample); /* Round rSrcTop down */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2232 BottomUVLine = (ceil(((config->src.y+config->src.h)/VertUVSubSample)) > (config->src.h/VertUVSubSample))
23065
f1a5b0eb87cd u_int -> unsigned int, fixes MinGW compilation (patch by Xuebin Wu)
ben
parents: 23064
diff changeset
2233 ? (config->src.h/VertUVSubSample)-1 : (unsigned int)ceil(((config->src.y+config->src.h)/VertUVSubSample))-1;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2234
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2235 if (BottomUVLine >= TopUVLine)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2236 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2237 SourceUVLinesUsed = BottomUVLine - TopUVLine + 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2238 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2239 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2240 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2241 /*CYCACC_ASSERT(0, "SourceUVLinesUsed less than or equal to zero.") */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2242 SourceUVLinesUsed = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2243 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2244 val_OV0_P23_ACTIVE_LINES_M1 = SourceUVLinesUsed - 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2245 val_OV0_P23_BLNK_LN_AT_TOP_M1 = ((int)(tempBLANK_LINES_AT_TOP/VertUVSubSample)-1) & 0x7ff;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2246 besr.p1_blank_lines_at_top = (val_OV0_P1_BLNK_LN_AT_TOP_M1 & 0xfff) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2247 ((val_OV0_P1_ACTIVE_LINES_M1 & 0xfff) << 16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2248 besr.p23_blank_lines_at_top = (val_OV0_P23_BLNK_LN_AT_TOP_M1 & 0x7ff) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2249 ((val_OV0_P23_ACTIVE_LINES_M1 & 0x7ff) << 16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2250 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2251
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2252
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2253 static void ComputeXStartEnd(
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2254 int is_400,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2255 uint32_t LeftPixel,uint32_t LeftUVPixel,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2256 uint32_t MemWordsInBytes,uint32_t BytesPerPixel,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2257 uint32_t SourceWidthInPixels, uint32_t P1StepSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2258 uint32_t BytesPerUVPixel,uint32_t SourceUVWidthInPixels,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2259 uint32_t P23StepSize, uint32_t *p1_x_start, uint32_t *p2_x_start )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2260 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2261 uint32_t val_OV0_P1_X_START,val_OV0_P2_X_START,val_OV0_P3_X_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2262 uint32_t val_OV0_P1_X_END,val_OV0_P2_X_END,val_OV0_P3_X_END;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2263 /* ToDo_Active: At the moment we are not using iOV0_VID_BUF?_START_PIX, but instead // are using iOV0_P?_X_START and iOV0_P?_X_END. We should use "start pix" and // "width" to derive the start and end. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2264
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2265 val_OV0_P1_X_START = (int)LeftPixel % (MemWordsInBytes/BytesPerPixel);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2266 val_OV0_P1_X_END = (int)((val_OV0_P1_X_START + SourceWidthInPixels - 1) / P1StepSize) * P1StepSize;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2267
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2268 val_OV0_P2_X_START = val_OV0_P2_X_END = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2269 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2270 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2271 case 9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2272 case 10:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2273 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2274 case 14: /* ToDo_Active: The driver must insure that the initial value is */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2275 /* a multiple of a power of two when decimating */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2276 val_OV0_P2_X_START = (int)LeftUVPixel %
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2277 (MemWordsInBytes/BytesPerUVPixel);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2278 val_OV0_P2_X_END = (int)((val_OV0_P2_X_START +
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2279 SourceUVWidthInPixels - 1) / P23StepSize) * P23StepSize;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2280 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2281 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2282 case 12: val_OV0_P2_X_START = (int)LeftUVPixel % (MemWordsInBytes/(BytesPerPixel*2));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2283 val_OV0_P2_X_END = (int)((val_OV0_P2_X_START + SourceUVWidthInPixels - 1) / P23StepSize) * P23StepSize;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2284 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2285 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2286 case 4: val_OV0_P2_X_START = val_OV0_P1_X_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2287 /* This value is needed only to allow proper setting of */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2288 /* val_OV0_PRESHIFT_P23_TO */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2289 /* val_OV0_P2_X_END = 0; */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2290 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2291 case 6: val_OV0_P2_X_START = (int)LeftPixel % (MemWordsInBytes/BytesPerPixel);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2292 val_OV0_P2_X_END = (int)((val_OV0_P1_X_START + SourceWidthInPixels - 1) / P23StepSize) * P23StepSize;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2293 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2294 default: /* insert debug statement here. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2295 RADEON_ASSERT("unknown fourcc\n");
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2296 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2297 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2298 val_OV0_P3_X_START = val_OV0_P2_X_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2299 val_OV0_P3_X_END = val_OV0_P2_X_END;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2300
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2301 besr.p1_x_start_end = (val_OV0_P1_X_END&0x7ff) | ((val_OV0_P1_X_START&0x7ff)<<16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2302 besr.p2_x_start_end = (val_OV0_P2_X_END&0x7ff) | ((val_OV0_P2_X_START&0x7ff)<<16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2303 besr.p3_x_start_end = (val_OV0_P3_X_END&0x7ff) | ((val_OV0_P3_X_START&0x7ff)<<16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2304 if(is_400)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2305 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2306 besr.p2_x_start_end = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2307 besr.p3_x_start_end = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2308 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2309 *p1_x_start = val_OV0_P1_X_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2310 *p2_x_start = val_OV0_P2_X_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2311 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2312
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2313 static void ComputeAccumInit(
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2314 uint32_t val_OV0_P1_X_START,uint32_t val_OV0_P2_X_START,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2315 uint32_t val_OV0_P1_H_INC,uint32_t val_OV0_P23_H_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2316 uint32_t val_OV0_P1_H_STEP_BY,uint32_t val_OV0_P23_H_STEP_BY,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2317 uint32_t CRT_V_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2318 uint32_t P1GroupSize, uint32_t P23GroupSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2319 uint32_t val_OV0_P1_MAX_LN_IN_PER_LN_OUT,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2320 uint32_t val_OV0_P23_MAX_LN_IN_PER_LN_OUT)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2321 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2322 uint32_t val_OV0_P1_H_ACCUM_INIT,val_OV0_PRESHIFT_P1_TO;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2323 uint32_t val_OV0_P23_H_ACCUM_INIT,val_OV0_PRESHIFT_P23_TO;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2324 uint32_t val_OV0_P1_V_ACCUM_INIT,val_OV0_P23_V_ACCUM_INIT;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2325 /* 2.5 puts the kernal 50% of the way between the source pixel that is off screen */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2326 /* and the first on-screen source pixel. "(float)valOV0_P?_H_INC / (1<<0xc)" is */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2327 /* the distance (in source pixel coordinates) to the center of the first */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2328 /* destination pixel. Need to add additional pixels depending on how many pixels */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2329 /* are fetched at a time and how many pixels in a set are masked. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2330 /* P23 values are always fetched in groups of two or four. If the start */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2331 /* pixel does not fall on the boundary, then we need to shift preshift for */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2332 /* some additional pixels */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2333
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2334 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2335 double ExtraHalfPixel;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2336 double tempAdditionalShift;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2337 double tempP1HStartPoint;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2338 double tempP23HStartPoint;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2339 double tempP1Init;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2340 double tempP23Init;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2341
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2342 if (besr.horz_pick_nearest) ExtraHalfPixel = 0.5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2343 else ExtraHalfPixel = 0.0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2344 tempAdditionalShift = val_OV0_P1_X_START % P1GroupSize + ExtraHalfPixel;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2345 tempP1HStartPoint = tempAdditionalShift + 2.5 + ((float)val_OV0_P1_H_INC / (1<<0xd));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2346 tempP1Init = (double)((int)(tempP1HStartPoint * (1<<0x5) + 0.5)) / (1<<0x5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2347
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2348 /* P23 values are always fetched in pairs. If the start pixel is odd, then we */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2349 /* need to shift an additional pixel */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2350 /* Note that if the pitch is a multiple of two, and if we store fields using */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2351 /* the traditional planer format where the V plane and the U plane share the */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2352 /* same pitch, then OverlayRegFields->val_OV0_P2_X_START % P23Group */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2353 /* OverlayRegFields->val_OV0_P3_X_START % P23GroupSize. Either way */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2354 /* it is a requirement that the U and V start on the same polarity byte */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2355 /* (even or odd). */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2356 tempAdditionalShift = val_OV0_P2_X_START % P23GroupSize + ExtraHalfPixel;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2357 tempP23HStartPoint = tempAdditionalShift + 2.5 + ((float)val_OV0_P23_H_INC / (1<<0xd));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2358 tempP23Init = (double)((int)(tempP23HStartPoint * (1<<0x5) + 0.5)) / (1 << 0x5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2359 val_OV0_P1_H_ACCUM_INIT = (int)((tempP1Init - (int)tempP1Init) * (1<<0x5));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2360 val_OV0_PRESHIFT_P1_TO = (int)tempP1Init;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2361 val_OV0_P23_H_ACCUM_INIT = (int)((tempP23Init - (int)tempP23Init) * (1<<0x5));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2362 val_OV0_PRESHIFT_P23_TO = (int)tempP23Init;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2363 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2364
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2365 /* ************************************************************** */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2366 /* ** Calculate values for initializing the vertical accumulators */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2367 /* ************************************************************** */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2368
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2369 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2370 double ExtraHalfLine;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2371 double ExtraFullLine;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2372 double tempP1VStartPoint;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2373 double tempP23VStartPoint;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2374
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2375 if (besr.vert_pick_nearest) ExtraHalfLine = 0.5;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2376 else ExtraHalfLine = 0.0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2377
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2378 if (val_OV0_P1_H_STEP_BY==0)ExtraFullLine = 1.0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2379 else ExtraFullLine = 0.0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2380
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2381 tempP1VStartPoint = 1.5 + ExtraFullLine + ExtraHalfLine + ((float)CRT_V_INC / (1<<0xd));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2382 if (tempP1VStartPoint>2.5 + 2*ExtraFullLine)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2383 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2384 tempP1VStartPoint = 2.5 + 2*ExtraFullLine;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2385 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2386 val_OV0_P1_V_ACCUM_INIT = (int)(tempP1VStartPoint * (1<<0x5) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2387
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2388 if (val_OV0_P23_H_STEP_BY==0)ExtraFullLine = 1.0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2389 else ExtraFullLine = 0.0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2390
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2391 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2392 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2393 case 10:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2394 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2395 case 14: tempP23VStartPoint = 1.5 + ExtraFullLine + ExtraHalfLine +
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2396 ((float)CRT_V_INC / (1<<0xe));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2397 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2398 case 9: tempP23VStartPoint = 1.5 + ExtraFullLine + ExtraHalfLine +
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2399 ((float)CRT_V_INC / (1<<0xf));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2400 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2401 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2402 case 4:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2403 case 6:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2404 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2405 case 12: tempP23VStartPoint = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2406 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2407 default: tempP23VStartPoint = 0xFFFF;/* insert debug statement here */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2408 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2409 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2410
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2411 if (tempP23VStartPoint>2.5 + 2*ExtraFullLine)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2412 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2413 tempP23VStartPoint = 2.5 + 2*ExtraFullLine;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2414 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2415
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2416 val_OV0_P23_V_ACCUM_INIT = (int)(tempP23VStartPoint * (1<<0x5) + 0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2417 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2418 besr.p1_h_accum_init = ((val_OV0_P1_H_ACCUM_INIT&0x1f)<<15) |((val_OV0_PRESHIFT_P1_TO&0xf)<<28);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2419 besr.p1_v_accum_init = (val_OV0_P1_MAX_LN_IN_PER_LN_OUT&0x3) |((val_OV0_P1_V_ACCUM_INIT&0x7ff)<<15);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2420 besr.p23_h_accum_init= ((val_OV0_P23_H_ACCUM_INIT&0x1f)<<15) |((val_OV0_PRESHIFT_P23_TO&0xf)<<28);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2421 besr.p23_v_accum_init= (val_OV0_P23_MAX_LN_IN_PER_LN_OUT&0x3)|((val_OV0_P23_V_ACCUM_INIT&0x3ff)<<15);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2422 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2423
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2424 typedef struct RangeAndCoefSet {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2425 double Range;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2426 signed char CoefSet[5][4];
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2427 } RANGEANDCOEFSET;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2428
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2429 /* Filter Setup Routine */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2430 static void FilterSetup ( uint32_t val_OV0_P1_H_INC )
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2431 {
25718
8eddf6a9af7f Make some radeon vidix driver tables static and const
reimar
parents: 25415
diff changeset
2432 static const RANGEANDCOEFSET ArrayOfSets[] = {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2433 {0.25, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2434 {0.26, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2435 {0.27, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2436 {0.28, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2437 {0.29, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2438 {0.30, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2439 {0.31, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2440 {0.32, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2441 {0.33, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2442 {0.34, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2443 {0.35, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2444 {0.36, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2445 {0.37, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2446 {0.38, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2447 {0.39, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2448 {0.40, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2449 {0.41, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2450 {0.42, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2451 {0.43, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2452 {0.44, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2453 {0.45, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2454 {0.46, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2455 {0.47, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2456 {0.48, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2457 {0.49, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2458 {0.50, {{ 7, 16, 9, 0}, { 7, 16, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 3, 13, 13, 3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2459 {0.51, {{ 7, 17, 8, 0}, { 6, 17, 9, 0}, { 5, 15, 11, 1}, { 4, 15, 12, 1}, { 2, 14, 14, 2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2460 {0.52, {{ 7, 17, 8, 0}, { 6, 17, 9, 0}, { 5, 16, 11, 0}, { 3, 15, 13, 1}, { 2, 14, 14, 2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2461 {0.53, {{ 7, 17, 8, 0}, { 6, 17, 9, 0}, { 5, 16, 11, 0}, { 3, 15, 13, 1}, { 2, 14, 14, 2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2462 {0.54, {{ 7, 17, 8, 0}, { 6, 17, 9, 0}, { 4, 17, 11, 0}, { 3, 15, 13, 1}, { 2, 14, 14, 2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2463 {0.55, {{ 7, 18, 7, 0}, { 6, 17, 9, 0}, { 4, 17, 11, 0}, { 3, 15, 13, 1}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2464 {0.56, {{ 7, 18, 7, 0}, { 5, 18, 9, 0}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2465 {0.57, {{ 7, 18, 7, 0}, { 5, 18, 9, 0}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2466 {0.58, {{ 7, 18, 7, 0}, { 5, 18, 9, 0}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2467 {0.59, {{ 7, 18, 7, 0}, { 5, 18, 9, 0}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2468 {0.60, {{ 7, 18, 8, -1}, { 6, 17, 10, -1}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2469 {0.61, {{ 7, 18, 8, -1}, { 6, 17, 10, -1}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2470 {0.62, {{ 7, 18, 8, -1}, { 6, 17, 10, -1}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2471 {0.63, {{ 7, 18, 8, -1}, { 6, 17, 10, -1}, { 4, 17, 11, 0}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2472 {0.64, {{ 7, 18, 8, -1}, { 6, 17, 10, -1}, { 4, 17, 12, -1}, { 2, 17, 13, 0}, { 1, 15, 15, 1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2473 {0.65, {{ 7, 18, 8, -1}, { 6, 17, 10, -1}, { 4, 17, 12, -1}, { 2, 17, 13, 0}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2474 {0.66, {{ 7, 18, 8, -1}, { 6, 18, 10, -2}, { 4, 17, 12, -1}, { 2, 17, 13, 0}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2475 {0.67, {{ 7, 20, 7, -2}, { 5, 19, 10, -2}, { 3, 18, 12, -1}, { 2, 17, 13, 0}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2476 {0.68, {{ 7, 20, 7, -2}, { 5, 19, 10, -2}, { 3, 19, 12, -2}, { 1, 18, 14, -1}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2477 {0.69, {{ 7, 20, 7, -2}, { 5, 19, 10, -2}, { 3, 19, 12, -2}, { 1, 18, 14, -1}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2478 {0.70, {{ 7, 20, 7, -2}, { 5, 20, 9, -2}, { 3, 19, 12, -2}, { 1, 18, 14, -1}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2479 {0.71, {{ 7, 20, 7, -2}, { 5, 20, 9, -2}, { 3, 19, 12, -2}, { 1, 18, 14, -1}, { 0, 16, 16, 0}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2480 {0.72, {{ 7, 20, 7, -2}, { 5, 20, 9, -2}, { 2, 20, 12, -2}, { 0, 19, 15, -2}, {-1, 17, 17, -1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2481 {0.73, {{ 7, 20, 7, -2}, { 4, 21, 9, -2}, { 2, 20, 12, -2}, { 0, 19, 15, -2}, {-1, 17, 17, -1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2482 {0.74, {{ 6, 22, 6, -2}, { 4, 21, 9, -2}, { 2, 20, 12, -2}, { 0, 19, 15, -2}, {-1, 17, 17, -1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2483 {0.75, {{ 6, 22, 6, -2}, { 4, 21, 9, -2}, { 1, 21, 12, -2}, { 0, 19, 15, -2}, {-1, 17, 17, -1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2484 {0.76, {{ 6, 22, 6, -2}, { 4, 21, 9, -2}, { 1, 21, 12, -2}, { 0, 19, 15, -2}, {-1, 17, 17, -1}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2485 {0.77, {{ 6, 22, 6, -2}, { 3, 22, 9, -2}, { 1, 22, 12, -3}, { 0, 19, 15, -2}, {-2, 18, 18, -2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2486 {0.78, {{ 6, 21, 6, -1}, { 3, 22, 9, -2}, { 1, 22, 12, -3}, { 0, 19, 15, -2}, {-2, 18, 18, -2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2487 {0.79, {{ 5, 23, 5, -1}, { 3, 22, 9, -2}, { 0, 23, 12, -3}, {-1, 21, 15, -3}, {-2, 18, 18, -2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2488 {0.80, {{ 5, 23, 5, -1}, { 3, 23, 8, -2}, { 0, 23, 12, -3}, {-1, 21, 15, -3}, {-2, 18, 18, -2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2489 {0.81, {{ 5, 23, 5, -1}, { 2, 24, 8, -2}, { 0, 23, 12, -3}, {-1, 21, 15, -3}, {-2, 18, 18, -2}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2490 {0.82, {{ 5, 23, 5, -1}, { 2, 24, 8, -2}, { 0, 23, 12, -3}, {-1, 21, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2491 {0.83, {{ 5, 23, 5, -1}, { 2, 24, 8, -2}, { 0, 23, 11, -2}, {-2, 22, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2492 {0.84, {{ 4, 25, 4, -1}, { 1, 25, 8, -2}, { 0, 23, 11, -2}, {-2, 22, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2493 {0.85, {{ 4, 25, 4, -1}, { 1, 25, 8, -2}, { 0, 23, 11, -2}, {-2, 22, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2494 {0.86, {{ 4, 24, 4, 0}, { 1, 25, 7, -1}, {-1, 24, 11, -2}, {-2, 22, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2495 {0.87, {{ 4, 24, 4, 0}, { 1, 25, 7, -1}, {-1, 24, 11, -2}, {-2, 22, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2496 {0.88, {{ 3, 26, 3, 0}, { 0, 26, 7, -1}, {-1, 24, 11, -2}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2497 {0.89, {{ 3, 26, 3, 0}, { 0, 26, 7, -1}, {-1, 24, 11, -2}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2498 {0.90, {{ 3, 26, 3, 0}, { 0, 26, 7, -1}, {-2, 25, 11, -2}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2499 {0.91, {{ 3, 26, 3, 0}, { 0, 27, 6, -1}, {-2, 25, 11, -2}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2500 {0.92, {{ 2, 28, 2, 0}, { 0, 27, 6, -1}, {-2, 25, 11, -2}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2501 {0.93, {{ 2, 28, 2, 0}, { 0, 26, 6, 0}, {-2, 25, 10, -1}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2502 {0.94, {{ 2, 28, 2, 0}, { 0, 26, 6, 0}, {-2, 25, 10, -1}, {-3, 23, 15, -3}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2503 {0.95, {{ 1, 30, 1, 0}, {-1, 28, 5, 0}, {-3, 26, 10, -1}, {-3, 23, 14, -2}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2504 {0.96, {{ 1, 30, 1, 0}, {-1, 28, 5, 0}, {-3, 26, 10, -1}, {-3, 23, 14, -2}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2505 {0.97, {{ 1, 30, 1, 0}, {-1, 28, 5, 0}, {-3, 26, 10, -1}, {-3, 23, 14, -2}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2506 {0.98, {{ 1, 30, 1, 0}, {-2, 29, 5, 0}, {-3, 27, 9, -1}, {-3, 23, 14, -2}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2507 {0.99, {{ 0, 32, 0, 0}, {-2, 29, 5, 0}, {-3, 27, 9, -1}, {-4, 24, 14, -2}, {-3, 19, 19, -3}, }},
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2508 {1.00, {{ 0, 32, 0, 0}, {-2, 29, 5, 0}, {-3, 27, 9, -1}, {-4, 24, 14, -2}, {-3, 19, 19, -3}, }}
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2509 };
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2510
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2511 double DSR;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2512
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2513 unsigned ArrayElement;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2514
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2515 DSR = (double)(1<<0xc)/val_OV0_P1_H_INC;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2516 if (DSR<.25) DSR=.25;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2517 if (DSR>1) DSR=1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2518
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2519 ArrayElement = (int)((DSR-0.25) * 100);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2520 besr.four_tap_coeff[0] = (ArrayOfSets[ArrayElement].CoefSet[0][0] & 0xf) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2521 ((ArrayOfSets[ArrayElement].CoefSet[0][1] & 0x7f)<<8) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2522 ((ArrayOfSets[ArrayElement].CoefSet[0][2] & 0x7f)<<16) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2523 ((ArrayOfSets[ArrayElement].CoefSet[0][3] & 0xf)<<24);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2524 besr.four_tap_coeff[1] = (ArrayOfSets[ArrayElement].CoefSet[1][0] & 0xf) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2525 ((ArrayOfSets[ArrayElement].CoefSet[1][1] & 0x7f)<<8) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2526 ((ArrayOfSets[ArrayElement].CoefSet[1][2] & 0x7f)<<16) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2527 ((ArrayOfSets[ArrayElement].CoefSet[1][3] & 0xf)<<24);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2528 besr.four_tap_coeff[2] = (ArrayOfSets[ArrayElement].CoefSet[2][0] & 0xf) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2529 ((ArrayOfSets[ArrayElement].CoefSet[2][1] & 0x7f)<<8) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2530 ((ArrayOfSets[ArrayElement].CoefSet[2][2] & 0x7f)<<16) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2531 ((ArrayOfSets[ArrayElement].CoefSet[2][3] & 0xf)<<24);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2532 besr.four_tap_coeff[3] = (ArrayOfSets[ArrayElement].CoefSet[3][0] & 0xf) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2533 ((ArrayOfSets[ArrayElement].CoefSet[3][1] & 0x7f)<<8) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2534 ((ArrayOfSets[ArrayElement].CoefSet[3][2] & 0x7f)<<16) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2535 ((ArrayOfSets[ArrayElement].CoefSet[3][3] & 0xf)<<24);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2536 besr.four_tap_coeff[4] = (ArrayOfSets[ArrayElement].CoefSet[4][0] & 0xf) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2537 ((ArrayOfSets[ArrayElement].CoefSet[4][1] & 0x7f)<<8) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2538 ((ArrayOfSets[ArrayElement].CoefSet[4][2] & 0x7f)<<16) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2539 ((ArrayOfSets[ArrayElement].CoefSet[4][3] & 0xf)<<24);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2540 /*
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2541 For more details, refer to Microsoft's draft of PC99.
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2542 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2543 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2544
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2545 /* The minimal value of horizontal scale ratio when hard coded coefficients
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2546 are suitable for the best quality. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2547 /* FIXME: Should it be 0.9 for Rage128 ??? */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2548 static const double MinHScaleHard=0.75;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2549
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2550 static int radeon_vid_init_video( vidix_playback_t *config )
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2551 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2552 double V_scale_ratio;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2553 uint32_t i,src_w,src_h,dest_w,dest_h,pitch,left,leftUV,top,h_inc;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2554 uint32_t val_OV0_P1_H_INC=0,val_OV0_P1_H_STEP_BY=0,val_OV0_P23_H_INC=0,val_OV0_P23_H_STEP_BY=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2555 uint32_t val_OV0_P1_X_START,val_OV0_P2_X_START;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2556 uint32_t val_OV0_P1_MAX_LN_IN_PER_LN_OUT,val_OV0_P23_MAX_LN_IN_PER_LN_OUT;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2557 uint32_t CRT_V_INC;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2558 uint32_t BytesPerOctWord,LogMemWordsInBytes,MemWordsInBytes,LogTileWidthInMemWords;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2559 uint32_t TileWidthInMemWords,TileWidthInBytes,LogTileHeight,TileHeight;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2560 uint32_t PageSizeInBytes,OV0LB_Rows;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2561 uint32_t SourceWidthInMemWords,SourceUVWidthInMemWords;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2562 uint32_t SourceWidthInPixels,SourceUVWidthInPixels;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2563 uint32_t RightPixel,RightUVPixel,LeftPixel,LeftUVPixel;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2564 int is_400,is_410,is_420,best_pitch,mpitch;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2565 int horz_repl_factor,interlace_factor;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2566 int BytesPerPixel,BytesPerUVPixel,HorzUVSubSample,VertUVSubSample;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2567 int DisallowFourTapVertFiltering,DisallowFourTapUVVertFiltering;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2568
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2569 radeon_vid_stop_video();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2570 left = config->src.x << 16;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2571 top = config->src.y << 16;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2572 src_h = config->src.h;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2573 src_w = config->src.w;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2574 is_400 = is_410 = is_420 = 0;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2575 if(config->fourcc == IMGFMT_YV12 ||
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2576 config->fourcc == IMGFMT_I420 ||
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2577 config->fourcc == IMGFMT_IYUV) is_420 = 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2578 if(config->fourcc == IMGFMT_YVU9 ||
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2579 config->fourcc == IMGFMT_IF09) is_410 = 1;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2580 if(config->fourcc == IMGFMT_Y800) is_400 = 1;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2581 best_pitch = radeon_query_pitch(config->fourcc,&config->src.pitch);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2582 mpitch = best_pitch-1;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2583 BytesPerOctWord = 16;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2584 LogMemWordsInBytes = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2585 MemWordsInBytes = 1<<LogMemWordsInBytes;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2586 LogTileWidthInMemWords = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2587 TileWidthInMemWords = 1<<LogTileWidthInMemWords;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2588 TileWidthInBytes = 1<<(LogTileWidthInMemWords+LogMemWordsInBytes);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2589 LogTileHeight = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2590 TileHeight = 1<<LogTileHeight;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2591 PageSizeInBytes = 64*MemWordsInBytes;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2592 OV0LB_Rows = 96;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2593 h_inc = 1;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2594 switch(config->fourcc)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2595 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2596 /* 4:0:0*/
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2597 case IMGFMT_Y800:
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2598 /* 4:1:0*/
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2599 case IMGFMT_YVU9:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2600 case IMGFMT_IF09:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2601 /* 4:2:0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2602 case IMGFMT_IYUV:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2603 case IMGFMT_YV12:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2604 case IMGFMT_I420: pitch = (src_w + mpitch) & ~mpitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2605 config->dest.pitch.y =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2606 config->dest.pitch.u =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2607 config->dest.pitch.v = best_pitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2608 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2609 /* RGB 4:4:4:4 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2610 case IMGFMT_RGB32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2611 case IMGFMT_BGR32: pitch = (src_w*4 + mpitch) & ~mpitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2612 config->dest.pitch.y =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2613 config->dest.pitch.u =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2614 config->dest.pitch.v = best_pitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2615 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2616 /* 4:2:2 */
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2617
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2618 default: /* RGB15, RGB16, YVYU, UYVY, YUY2 */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2619 pitch = ((src_w*2) + mpitch) & ~mpitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2620 config->dest.pitch.y =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2621 config->dest.pitch.u =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2622 config->dest.pitch.v = best_pitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2623 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2624 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2625 besr.load_prg_start=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2626 besr.swap_uv=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2627 switch(config->fourcc)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2628 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2629 case IMGFMT_RGB15:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2630 besr.swap_uv=1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2631 case IMGFMT_BGR15: besr.surf_id = SCALER_SOURCE_15BPP>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2632 besr.load_prg_start = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2633 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2634 case IMGFMT_RGB16:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2635 besr.swap_uv=1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2636 case IMGFMT_BGR16: besr.surf_id = SCALER_SOURCE_16BPP>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2637 besr.load_prg_start = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2638 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2639 case IMGFMT_RGB32:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2640 besr.swap_uv=1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2641 case IMGFMT_BGR32: besr.surf_id = SCALER_SOURCE_32BPP>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2642 besr.load_prg_start = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2643 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2644 /* 4:1:0*/
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2645 case IMGFMT_IF09:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2646 case IMGFMT_YVU9: besr.surf_id = SCALER_SOURCE_YUV9>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2647 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2648 /* 4:0:0*/
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2649 case IMGFMT_Y800:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2650 /* 4:2:0 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2651 case IMGFMT_IYUV:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2652 case IMGFMT_I420:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2653 case IMGFMT_YV12: besr.surf_id = SCALER_SOURCE_YUV12>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2654 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2655 /* 4:2:2 */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2656 case IMGFMT_YVYU:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2657 case IMGFMT_UYVY: besr.surf_id = SCALER_SOURCE_YVYU422>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2658 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2659 case IMGFMT_YUY2:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2660 default: besr.surf_id = SCALER_SOURCE_VYUY422>>8;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2661 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2662 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2663 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2664 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2665 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2666 case 4:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2667 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2668 case 12: BytesPerPixel = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2669 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2670 case 6: BytesPerPixel = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2671 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2672 case 9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2673 case 10:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2674 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2675 case 14: BytesPerPixel = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2676 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2677 default: BytesPerPixel = 0;/*insert a debug statement here. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2678 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2679 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2680 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2681 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2682 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2683 case 4: BytesPerUVPixel = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2684 break;/* In RGB modes, the BytesPerUVPixel is don't care */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2685 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2686 case 12: BytesPerUVPixel = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2687 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2688 case 6: BytesPerUVPixel = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2689 break; /* In RGB modes, the BytesPerUVPixel is don't care */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2690 case 9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2691 case 10: BytesPerUVPixel = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2692 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2693 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2694 case 14: BytesPerUVPixel = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2695 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2696 default: BytesPerUVPixel = 0;/* insert a debug statement here. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2697 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2698
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2699 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2700 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2701 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2702 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2703 case 4:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2704 case 6: HorzUVSubSample = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2705 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2706 case 9: HorzUVSubSample = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2707 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2708 case 10:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2709 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2710 case 12:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2711 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2712 case 14: HorzUVSubSample = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2713 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2714 default: HorzUVSubSample = 0;/* insert debug statement here. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2715 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2716 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2717 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2718 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2719 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2720 case 4:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2721 case 6:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2722 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2723 case 12: VertUVSubSample = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2724 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2725 case 9: VertUVSubSample = 4;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2726 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2727 case 10:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2728 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2729 case 14: VertUVSubSample = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2730 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2731 default: VertUVSubSample = 0;/* insert debug statment here. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2732 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2733 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2734 DisallowFourTapVertFiltering = 0; /* Allow it by default */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2735 DisallowFourTapUVVertFiltering = 0; /* Allow it by default */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2736 LeftPixel = config->src.x;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2737 RightPixel = config->src.w-1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2738 if(floor(config->src.x/HorzUVSubSample)<0) LeftUVPixel = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2739 else LeftUVPixel = (int)floor(config->src.x/HorzUVSubSample);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2740 if(ceil((config->src.x+config->src.w)/HorzUVSubSample) > config->src.w/HorzUVSubSample)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2741 RightUVPixel = config->src.w/HorzUVSubSample - 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2742 else RightUVPixel = (int)ceil((config->src.x+config->src.w)/HorzUVSubSample) - 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2743 /* Top, Bottom and Right Crops can be out of range. The driver will program the hardware
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2744 // to create a black border at the top and bottom. This is useful for DVD letterboxing. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2745 SourceWidthInPixels = (int)(config->src.w + 1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2746 SourceUVWidthInPixels = (int)(RightUVPixel - LeftUVPixel + 1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2747
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2748 SourceWidthInMemWords = (int)(ceil(RightPixel*BytesPerPixel / MemWordsInBytes) -
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2749 floor(LeftPixel*BytesPerPixel / MemWordsInBytes) + 1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2750 /* SourceUVWidthInMemWords means Source_U_or_V_or_UV_WidthInMemWords depending on whether the UV is packed together of not. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2751 SourceUVWidthInMemWords = (int)(ceil(RightUVPixel*BytesPerUVPixel /
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2752 MemWordsInBytes) - floor(LeftUVPixel*BytesPerUVPixel /
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2753 MemWordsInBytes) + 1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2754
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2755 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2756 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2757 case 9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2758 case 10: if ((ceil(SourceWidthInMemWords/2)-1) * 2 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2759 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2760 RADEON_ASSERT("ceil(SourceWidthInMemWords/2)-1) * 2 > OV0LB_Rows-1\n");
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2761 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2762 else if ((SourceWidthInMemWords-1) * 2 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2763 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2764 DisallowFourTapVertFiltering = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2765 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2766
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2767 if ((ceil(SourceUVWidthInMemWords/2)-1) * 4 + 1 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2768 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2769 /*CYCACC_ASSERT(0, "Image U plane width spans more octwords than supported by hardware.") */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2770 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2771 else if ((SourceUVWidthInMemWords-1) * 4 + 1 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2772 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2773 DisallowFourTapUVVertFiltering = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2774 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2775
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2776 if ((ceil(SourceUVWidthInMemWords/2)-1) * 4 + 3 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2777 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2778 /*CYCACC_ASSERT(0, "Image V plane width spans more octwords than supported by hardware.") */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2779 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2780 else if ((SourceUVWidthInMemWords-1) * 4 + 3 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2781 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2782 DisallowFourTapUVVertFiltering = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2783 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2784 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2785 case 13:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2786 case 14: if ((ceil(SourceWidthInMemWords/2)-1) * 2 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2787 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2788 RADEON_ASSERT("ceil(SourceWidthInMemWords/2)-1) * 2 > OV0LB_Rows-1\n");
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2789 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2790 else if ((SourceWidthInMemWords-1) * 2 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2791 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2792 DisallowFourTapVertFiltering = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2793 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2794
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2795 if ((ceil(SourceUVWidthInMemWords/2)-1) * 2 + 1 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2796 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2797 /*CYCACC_ASSERT(0, "Image UV plane width spans more octwords than supported by hardware.") */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2798 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2799 else if ((SourceUVWidthInMemWords-1) * 2 + 1 > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2800 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2801 DisallowFourTapUVVertFiltering = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2802 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2803 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2804 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2805 case 4:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2806 case 6:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2807 case 11:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2808 case 12: if ((ceil(SourceWidthInMemWords/2)-1) > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2809 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2810 RADEON_ASSERT("(ceil(SourceWidthInMemWords/2)-1) > OV0LB_Rows-1\n")
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2811 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2812 else if ((SourceWidthInMemWords-1) > OV0LB_Rows-1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2813 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2814 DisallowFourTapVertFiltering = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2815 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2816 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2817 default: /* insert debug statement here. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2818 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2819 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2820 dest_w = config->dest.w;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2821 dest_h = config->dest.h;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2822 if(radeon_is_dbl_scan()) dest_h *= 2;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2823 besr.dest_bpp = radeon_vid_get_dbpp();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2824 besr.fourcc = config->fourcc;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2825 if(radeon_is_interlace()) interlace_factor = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2826 else interlace_factor = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2827 /* TODO: must be checked in doublescan mode!!! */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2828 if((besr.chip_flags&R_INTEGRATED)==R_INTEGRATED)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2829 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2830 /* Force the overlay clock on for integrated chips */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2831 OUTPLL(VCLK_ECP_CNTL, (INPLL(VCLK_ECP_CNTL) | (1<<18)));
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2832 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2833 horz_repl_factor = 1 << (uint32_t)((INPLL(VCLK_ECP_CNTL) & 0x300) >> 8);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2834 H_scale_ratio = (double)ceil(((double)dest_w+1)/horz_repl_factor)/src_w;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2835 V_scale_ratio = (double)(dest_h+1)/src_h;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2836 if(H_scale_ratio < 0.5 && V_scale_ratio < 0.5)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2837 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2838 val_OV0_P1_MAX_LN_IN_PER_LN_OUT = 3;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2839 val_OV0_P23_MAX_LN_IN_PER_LN_OUT = 2;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2840 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2841 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2842 if(H_scale_ratio < 1 && V_scale_ratio < 1)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2843 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2844 val_OV0_P1_MAX_LN_IN_PER_LN_OUT = 2;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2845 val_OV0_P23_MAX_LN_IN_PER_LN_OUT = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2846 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2847 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2848 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2849 val_OV0_P1_MAX_LN_IN_PER_LN_OUT = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2850 val_OV0_P23_MAX_LN_IN_PER_LN_OUT = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2851 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2852 /* N.B.: Indeed it has 6.12 format but shifted on 8 to the left!!! */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2853 besr.v_inc = (uint16_t)((1./V_scale_ratio)*(1<<12)*interlace_factor+0.5);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2854 CRT_V_INC = besr.v_inc/interlace_factor;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2855 besr.v_inc <<= 8;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2856 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2857 int ThereIsTwoTapVerticalFiltering,DoNotUseMostRecentlyFetchedLine;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2858 int P1GroupSize = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2859 int P23GroupSize;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2860 int P1StepSize = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2861 int P23StepSize = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2862
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2863 Calc_H_INC_STEP_BY(
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2864 besr.surf_id,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2865 H_scale_ratio,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2866 DisallowFourTapVertFiltering,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2867 DisallowFourTapUVVertFiltering,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2868 &val_OV0_P1_H_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2869 &val_OV0_P1_H_STEP_BY,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2870 &val_OV0_P23_H_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2871 &val_OV0_P23_H_STEP_BY,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2872 &P1GroupSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2873 &P1StepSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2874 &P23StepSize);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2875
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2876 if(H_scale_ratio > MinHScaleHard)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2877 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2878 h_inc = (src_w << 12) / dest_w;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2879 besr.step_by = 0x0101;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2880 switch (besr.surf_id)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2881 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2882 case 3:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2883 case 4:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2884 case 6:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2885 besr.h_inc = (h_inc)|(h_inc<<16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2886 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2887 case 9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2888 besr.h_inc = h_inc | ((h_inc >> 2) << 16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2889 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2890 default:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2891 besr.h_inc = h_inc | ((h_inc >> 1) << 16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2892 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2893 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2894 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2895
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2896 P23GroupSize = 2; /* Current vaue for all modes */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2897
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2898 besr.horz_pick_nearest=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2899 DoNotUseMostRecentlyFetchedLine=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2900 ThereIsTwoTapVerticalFiltering = (val_OV0_P1_H_STEP_BY!=0) || (val_OV0_P23_H_STEP_BY!=0);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2901 if (ThereIsTwoTapVerticalFiltering && DoNotUseMostRecentlyFetchedLine)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2902 besr.vert_pick_nearest = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2903 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2904 besr.vert_pick_nearest = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2905
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2906 ComputeXStartEnd(is_400,LeftPixel,LeftUVPixel,MemWordsInBytes,BytesPerPixel,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2907 SourceWidthInPixels,P1StepSize,BytesPerUVPixel,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2908 SourceUVWidthInPixels,P23StepSize,&val_OV0_P1_X_START,&val_OV0_P2_X_START);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2909
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2910 if(H_scale_ratio > MinHScaleHard)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2911 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2912 unsigned tmp;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2913 tmp = (left & 0x0003ffff) + 0x00028000 + (h_inc << 3);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2914 besr.p1_h_accum_init = ((tmp << 4) & 0x000f8000) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2915 ((tmp << 12) & 0xf0000000);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2916
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2917 tmp = (top & 0x0000ffff) + 0x00018000;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2918 besr.p1_v_accum_init = ((tmp << 4) & OV0_P1_V_ACCUM_INIT_MASK)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2919 |(OV0_P1_MAX_LN_IN_PER_LN_OUT & 1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2920 tmp = ((left >> 1) & 0x0001ffff) + 0x00028000 + (h_inc << 2);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2921 besr.p23_h_accum_init = ((tmp << 4) & 0x000f8000) |
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2922 ((tmp << 12) & 0x70000000);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2923
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2924 tmp = ((top >> 1) & 0x0000ffff) + 0x00018000;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2925 besr.p23_v_accum_init = (is_420||is_410) ?
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2926 ((tmp << 4) & OV0_P23_V_ACCUM_INIT_MASK)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2927 |(OV0_P23_MAX_LN_IN_PER_LN_OUT & 1) : 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2928 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2929 else
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2930 ComputeAccumInit( val_OV0_P1_X_START,val_OV0_P2_X_START,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2931 val_OV0_P1_H_INC,val_OV0_P23_H_INC,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2932 val_OV0_P1_H_STEP_BY,val_OV0_P23_H_STEP_BY,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2933 CRT_V_INC,P1GroupSize,P23GroupSize,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2934 val_OV0_P1_MAX_LN_IN_PER_LN_OUT,
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2935 val_OV0_P23_MAX_LN_IN_PER_LN_OUT);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2936 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2937
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2938 /* keep everything in 16.16 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2939 besr.base_addr = INREG(DISPLAY_BASE_ADDR);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2940 config->offsets[0] = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2941 for(i=1;i<besr.vid_nbufs;i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2942 config->offsets[i] = config->offsets[i-1]+config->frame_size;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2943 if(is_420 || is_410 || is_400)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2944 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2945 uint32_t d1line,d2line,d3line;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2946 d1line = top*pitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2947 if(is_420)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2948 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2949 d2line = src_h*pitch+(d1line>>2);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2950 d3line = d2line+((src_h*pitch)>>2);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2951 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2952 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2953 if(is_410)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2954 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2955 d2line = src_h*pitch+(d1line>>4);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2956 d3line = d2line+((src_h*pitch)>>4);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2957 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2958 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2959 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2960 d2line = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2961 d3line = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2962 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2963 d1line += (left >> 16) & ~15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2964 if(is_420)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2965 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2966 d2line += (left >> 17) & ~15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2967 d3line += (left >> 17) & ~15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2968 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
2969 else /* is_410 */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2970 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2971 d2line += (left >> 18) & ~15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2972 d3line += (left >> 18) & ~15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2973 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2974 config->offset.y = d1line & VIF_BUF0_BASE_ADRS_MASK;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2975 if(is_400)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2976 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2977 config->offset.v = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2978 config->offset.u = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2979 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2980 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2981 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2982 config->offset.v = d2line & VIF_BUF1_BASE_ADRS_MASK;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2983 config->offset.u = d3line & VIF_BUF2_BASE_ADRS_MASK;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2984 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2985 for(i=0;i<besr.vid_nbufs;i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2986 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2987 besr.vid_buf_base_adrs_y[i]=((radeon_overlay_off+config->offsets[i]+config->offset.y)&VIF_BUF0_BASE_ADRS_MASK);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2988 if(is_400)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2989 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2990 besr.vid_buf_base_adrs_v[i]=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2991 besr.vid_buf_base_adrs_u[i]=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2992 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2993 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2994 {
23652
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
2995 if (besr.fourcc == IMGFMT_I420 || besr.fourcc == IMGFMT_IYUV)
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
2996 {
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
2997 besr.vid_buf_base_adrs_u[i]=((radeon_overlay_off+config->offsets[i]+config->offset.v)&VIF_BUF1_BASE_ADRS_MASK)|VIF_BUF1_PITCH_SEL;
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
2998 besr.vid_buf_base_adrs_v[i]=((radeon_overlay_off+config->offsets[i]+config->offset.u)&VIF_BUF2_BASE_ADRS_MASK)|VIF_BUF2_PITCH_SEL;
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
2999 }
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
3000 else
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
3001 {
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
3002 besr.vid_buf_base_adrs_v[i]=((radeon_overlay_off+config->offsets[i]+config->offset.v)&VIF_BUF1_BASE_ADRS_MASK)|VIF_BUF1_PITCH_SEL;
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
3003 besr.vid_buf_base_adrs_u[i]=((radeon_overlay_off+config->offsets[i]+config->offset.u)&VIF_BUF2_BASE_ADRS_MASK)|VIF_BUF2_PITCH_SEL;
82443ed07f23 fix Radeon/Rage128 vidix with I420 colorspace (U/V were inverted)
ben
parents: 23167
diff changeset
3004 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3005 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3006 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3007 config->offset.y = ((besr.vid_buf_base_adrs_y[0])&VIF_BUF0_BASE_ADRS_MASK) - radeon_overlay_off;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3008 if(is_400)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3009 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3010 config->offset.v = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3011 config->offset.u = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3012 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3013 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3014 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3015 config->offset.v = ((besr.vid_buf_base_adrs_v[0])&VIF_BUF1_BASE_ADRS_MASK) - radeon_overlay_off;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3016 config->offset.u = ((besr.vid_buf_base_adrs_u[0])&VIF_BUF2_BASE_ADRS_MASK) - radeon_overlay_off;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3017 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3018 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3019 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3020 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3021 config->offset.y = config->offset.u = config->offset.v = ((left & ~7) << 1)&VIF_BUF0_BASE_ADRS_MASK;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3022 for(i=0;i<besr.vid_nbufs;i++)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3023 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3024 besr.vid_buf_base_adrs_y[i] =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3025 besr.vid_buf_base_adrs_u[i] =
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3026 besr.vid_buf_base_adrs_v[i] = radeon_overlay_off + config->offsets[i] + config->offset.y;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3027 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3028 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3029 leftUV = (left >> (is_410?18:17)) & 15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3030 left = (left >> 16) & 15;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3031 besr.y_x_start = (config->dest.x+X_ADJUST) | (config->dest.y << 16);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3032 besr.y_x_end = (config->dest.x + dest_w+X_ADJUST) | ((config->dest.y + dest_h) << 16);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3033 ComputeBorders(config,VertUVSubSample);
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3034 besr.vid_buf_pitch0_value = pitch;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3035 besr.vid_buf_pitch1_value = is_410 ? pitch>>2 : is_420 ? pitch>>1 : pitch;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3036 /* ********************************************************* */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3037 /* ** Calculate programmable coefficients as needed */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3038 /* ********************************************************* */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3039
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3040 /* ToDo_Active: When in pick nearest mode, we need to program the filter tap zero */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3041 /* coefficients to 0, 32, 0, 0. Or use hard coded coefficients. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3042 if(H_scale_ratio > MinHScaleHard) besr.filter_cntl |= FILTER_HARDCODED_COEF;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3043 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3044 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3045 FilterSetup (val_OV0_P1_H_INC);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3046 /* ToDo_Active: Must add the smarts into the driver to decide what type of filtering it */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3047 /* would like to do. For now, we let the test application decide. */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3048 besr.filter_cntl = FILTER_PROGRAMMABLE_COEF;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3049 if(DisallowFourTapVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3050 besr.filter_cntl |= FILTER_HARD_SCALE_VERT_Y;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3051 if(DisallowFourTapUVVertFiltering)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3052 besr.filter_cntl |= FILTER_HARD_SCALE_VERT_UV;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3053 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3054 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3055 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3056
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3057 static void radeon_compute_framesize(vidix_playback_t *info)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3058 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3059 unsigned pitch,awidth,dbpp;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3060 pitch = radeon_query_pitch(info->fourcc,&info->src.pitch);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3061 dbpp = radeon_vid_get_dbpp();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3062 switch(info->fourcc)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3063 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3064 case IMGFMT_Y800:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3065 awidth = (info->src.w + (pitch-1)) & ~(pitch-1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3066 info->frame_size = awidth*info->src.h;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3067 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3068 case IMGFMT_YVU9:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3069 case IMGFMT_IF09:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3070 awidth = (info->src.w + (pitch-1)) & ~(pitch-1);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3071 info->frame_size = awidth*(info->src.h+info->src.h/8);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3072 break;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3073 case IMGFMT_I420:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3074 case IMGFMT_YV12:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3075 case IMGFMT_IYUV:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3076 awidth = (info->src.w + (pitch-1)) & ~(pitch-1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3077 info->frame_size = awidth*(info->src.h+info->src.h/2);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3078 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3079 case IMGFMT_RGB32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3080 case IMGFMT_BGR32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3081 awidth = (info->src.w*4 + (pitch-1)) & ~(pitch-1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3082 info->frame_size = awidth*info->src.h;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3083 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3084 /* YUY2 YVYU, RGB15, RGB16 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3085 default:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3086 awidth = (info->src.w*2 + (pitch-1)) & ~(pitch-1);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3087 info->frame_size = awidth*info->src.h;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3088 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3089 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3090 info->frame_size = (info->frame_size+4095)&~4095;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3091 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3092
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3093 static int radeon_config_playback(vidix_playback_t *info)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3094 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3095 unsigned rgb_size,nfr;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3096 uint32_t radeon_video_size;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3097 if(!is_supported_fourcc(info->fourcc)) return ENOSYS;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3098 if(info->num_frames>VID_PLAY_MAXFRAMES) info->num_frames=VID_PLAY_MAXFRAMES;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3099 if(info->num_frames==1) besr.double_buff=0;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3100 else besr.double_buff=1;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3101 radeon_compute_framesize(info);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3102
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3103 rgb_size = radeon_get_xres()*radeon_get_yres()*((radeon_vid_get_dbpp()+7)/8);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3104 nfr = info->num_frames;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3105 radeon_video_size = radeon_ram_size;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3106 for(;nfr>0; nfr--)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3107 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3108 radeon_overlay_off = radeon_video_size - info->frame_size*nfr;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3109 #if !defined (RAGE128) && defined(HAVE_X11)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3110 radeon_overlay_off -= firegl_shift;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3111 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3112 radeon_overlay_off &= 0xffff0000;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3113 if(radeon_overlay_off >= (int)rgb_size ) break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3114 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3115 if(nfr <= 3)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3116 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3117 nfr = info->num_frames;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3118 for(;nfr>0; nfr--)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3119 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3120 radeon_overlay_off = radeon_video_size - info->frame_size*nfr;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3121 #if !defined (RAGE128) && defined(HAVE_X11)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3122 radeon_overlay_off -= firegl_shift;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3123 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3124 radeon_overlay_off &= 0xffff0000;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3125 if(radeon_overlay_off > 0) break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3126 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3127 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3128 if(nfr <= 0) return EINVAL;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3129 info->num_frames = nfr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3130 besr.vid_nbufs = info->num_frames;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3131 info->dga_addr = (char *)radeon_mem_base + radeon_overlay_off;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3132 radeon_vid_init_video(info);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3133 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3134 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3135
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3136 static int radeon_playback_on(void)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3137 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3138 #ifdef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3139 unsigned dw,dh;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3140 #endif
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3141 radeon_vid_display_video();
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3142 #ifdef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3143 dh = (besr.y_x_end >> 16) - (besr.y_x_start >> 16);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3144 dw = (besr.y_x_end & 0xFFFF) - (besr.y_x_start & 0xFFFF);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3145 if(dw == radeon_get_xres() || dh == radeon_get_yres()) radeon_vid_exclusive();
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3146 else radeon_vid_non_exclusive();
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3147 #endif
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3148 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3149 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3150
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3151 static int radeon_playback_off(void)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3152 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3153 radeon_vid_stop_video();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3154 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3155 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3156
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3157 static int radeon_frame_select(unsigned frame)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3158 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3159 uint32_t off[6];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3160 int prev_frame= (frame-1+besr.vid_nbufs) % besr.vid_nbufs;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3161 /*
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3162 buf3-5 always should point onto second buffer for better
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3163 deinterlacing and TV-in
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3164 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3165 if(!besr.double_buff) return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3166 if(frame > besr.vid_nbufs) frame = besr.vid_nbufs-1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3167 if(prev_frame > (int)besr.vid_nbufs) prev_frame = besr.vid_nbufs-1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3168 off[0] = besr.vid_buf_base_adrs_y[frame];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3169 off[1] = besr.vid_buf_base_adrs_v[frame];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3170 off[2] = besr.vid_buf_base_adrs_u[frame];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3171 off[3] = besr.vid_buf_base_adrs_y[prev_frame];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3172 off[4] = besr.vid_buf_base_adrs_v[prev_frame];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3173 off[5] = besr.vid_buf_base_adrs_u[prev_frame];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3174 radeon_fifo_wait(8);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3175 OUTREG(OV0_REG_LOAD_CNTL, REG_LD_CTL_LOCK);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3176 radeon_engine_idle();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3177 while(!(INREG(OV0_REG_LOAD_CNTL)&REG_LD_CTL_LOCK_READBACK));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3178 OUTREG(OV0_VID_BUF0_BASE_ADRS, off[0]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3179 OUTREG(OV0_VID_BUF1_BASE_ADRS, off[1]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3180 OUTREG(OV0_VID_BUF2_BASE_ADRS, off[2]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3181 OUTREG(OV0_VID_BUF3_BASE_ADRS, off[3]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3182 OUTREG(OV0_VID_BUF4_BASE_ADRS, off[4]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3183 OUTREG(OV0_VID_BUF5_BASE_ADRS, off[5]);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3184 OUTREG(OV0_REG_LOAD_CNTL, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3185 if(besr.vid_nbufs == 2) radeon_wait_vsync();
25859
e8af7338a462 Fix illegal identifiers, names starting with __ are reserved for the system.
diego
parents: 25718
diff changeset
3186 if(verbosity > VERBOSE_LEVEL) radeon_vid_dump_regs();
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3187 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3188 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3189
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3190 static vidix_video_eq_t equal =
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3191 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3192 VEQ_CAP_BRIGHTNESS | VEQ_CAP_SATURATION
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3193 #ifndef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3194 | VEQ_CAP_CONTRAST | VEQ_CAP_HUE | VEQ_CAP_RGB_INTENSITY
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3195 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3196 ,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3197 0, 0, 0, 0, 0, 0, 0, 0 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3198
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3199 static int radeon_get_eq(vidix_video_eq_t * eq)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3200 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3201 memcpy(eq,&equal,sizeof(vidix_video_eq_t));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3202 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3203 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3204
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3205 #ifndef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3206 #define RTFSaturation(a) (1.0 + ((a)*1.0)/1000.0)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3207 #define RTFBrightness(a) (((a)*1.0)/2000.0)
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3208 #define RTFIntensity(a) (((a)*1.0)/2000.0)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3209 #define RTFContrast(a) (1.0 + ((a)*1.0)/1000.0)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3210 #define RTFHue(a) (((a)*3.1416)/1000.0)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3211 #define RTFCheckParam(a) {if((a)<-1000) (a)=-1000; if((a)>1000) (a)=1000;}
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3212 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3213
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3214 static int radeon_set_eq(const vidix_video_eq_t * eq)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3215 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3216 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3217 int br,sat;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3218 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3219 int itu_space;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3220 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3221 if(eq->cap & VEQ_CAP_BRIGHTNESS) equal.brightness = eq->brightness;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3222 if(eq->cap & VEQ_CAP_CONTRAST) equal.contrast = eq->contrast;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3223 if(eq->cap & VEQ_CAP_SATURATION) equal.saturation = eq->saturation;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3224 if(eq->cap & VEQ_CAP_HUE) equal.hue = eq->hue;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3225 if(eq->cap & VEQ_CAP_RGB_INTENSITY)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3226 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3227 equal.red_intensity = eq->red_intensity;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3228 equal.green_intensity = eq->green_intensity;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3229 equal.blue_intensity = eq->blue_intensity;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3230 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3231 equal.flags = eq->flags;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3232 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3233 br = equal.brightness * 64 / 1000;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3234 if(br < -64) br = -64; if(br > 63) br = 63;
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3235 sat = (equal.saturation*31 + 31000) / 2000;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3236 if(sat < 0) sat = 0; if(sat > 31) sat = 31;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3237 OUTREG(OV0_COLOUR_CNTL, (br & 0x7f) | (sat << 8) | (sat << 16));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3238 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3239 itu_space = equal.flags == VEQ_FLG_ITU_R_BT_709 ? 1 : 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3240 RTFCheckParam(equal.brightness);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3241 RTFCheckParam(equal.saturation);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3242 RTFCheckParam(equal.contrast);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3243 RTFCheckParam(equal.hue);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3244 RTFCheckParam(equal.red_intensity);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3245 RTFCheckParam(equal.green_intensity);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3246 RTFCheckParam(equal.blue_intensity);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3247 radeon_set_transform(RTFBrightness(equal.brightness),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3248 RTFContrast(equal.contrast),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3249 RTFSaturation(equal.saturation),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3250 RTFHue(equal.hue),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3251 RTFIntensity(equal.red_intensity),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3252 RTFIntensity(equal.green_intensity),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3253 RTFIntensity(equal.blue_intensity),
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3254 itu_space);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3255 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3256 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3257 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3258
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3259 static int radeon_playback_set_deint(const vidix_deinterlace_t * info)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3260 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3261 unsigned sflg;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3262 switch(info->flags)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3263 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3264 default:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3265 case CFG_NON_INTERLACED:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3266 besr.deinterlace_on = 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3267 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3268 case CFG_EVEN_ODD_INTERLACING:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3269 case CFG_INTERLACED:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3270 besr.deinterlace_on = 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3271 besr.deinterlace_pattern = 0x900AAAAA;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3272 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3273 case CFG_ODD_EVEN_INTERLACING:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3274 besr.deinterlace_on = 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3275 besr.deinterlace_pattern = 0x00055555;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3276 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3277 case CFG_UNIQUE_INTERLACING:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3278 besr.deinterlace_on = 1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3279 besr.deinterlace_pattern = info->deinterlace_pattern;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3280 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3281 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3282 OUTREG(OV0_REG_LOAD_CNTL, REG_LD_CTL_LOCK);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3283 radeon_engine_idle();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3284 while(!(INREG(OV0_REG_LOAD_CNTL)&REG_LD_CTL_LOCK_READBACK));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3285 radeon_fifo_wait(15);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3286 sflg = INREG(OV0_SCALE_CNTL);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3287 if(besr.deinterlace_on)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3288 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3289 OUTREG(OV0_SCALE_CNTL,sflg | SCALER_ADAPTIVE_DEINT);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3290 OUTREG(OV0_DEINTERLACE_PATTERN,besr.deinterlace_pattern);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3291 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3292 else OUTREG(OV0_SCALE_CNTL,sflg & (~SCALER_ADAPTIVE_DEINT));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3293 OUTREG(OV0_REG_LOAD_CNTL, 0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3294 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3295 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3296
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3297 static int radeon_playback_get_deint(vidix_deinterlace_t * info)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3298 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3299 if(!besr.deinterlace_on) info->flags = CFG_NON_INTERLACED;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3300 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3301 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3302 info->flags = CFG_UNIQUE_INTERLACING;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3303 info->deinterlace_pattern = besr.deinterlace_pattern;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3304 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3305 return 0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3306 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3307
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3308
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3309 /* Graphic keys */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3310 static vidix_grkey_t radeon_grkey;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3311
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3312 static int set_gr_key( void )
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3313 {
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3314 int result = 0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3315
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3316 besr.merge_cntl = 0xff000000 | /* overlay alpha */
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3317 0x00ff0000; /* graphic alpha */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3318 if(radeon_grkey.ckey.op == CKEY_TRUE)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3319 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3320 int dbpp=radeon_vid_get_dbpp();
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3321 besr.ckey_on=1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3322
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3323 switch(dbpp)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3324 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3325 case 15:
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3326 #ifndef RAGE128
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3327 if((besr.chip_flags&R_100)!=R_100)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3328 besr.graphics_key_clr=
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3329 ((radeon_grkey.ckey.blue &0xF8))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3330 | ((radeon_grkey.ckey.green&0xF8)<<8)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3331 | ((radeon_grkey.ckey.red &0xF8)<<16);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3332 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3333 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3334 besr.graphics_key_clr=
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3335 ((radeon_grkey.ckey.blue &0xF8)>>3)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3336 | ((radeon_grkey.ckey.green&0xF8)<<2)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3337 | ((radeon_grkey.ckey.red &0xF8)<<7);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3338 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3339 case 16:
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3340 #ifndef RAGE128
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3341 /* This test may be too general/specific */
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3342 if((besr.chip_flags&R_100)!=R_100)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3343 besr.graphics_key_clr=
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3344 ((radeon_grkey.ckey.blue &0xF8))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3345 | ((radeon_grkey.ckey.green&0xFC)<<8)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3346 | ((radeon_grkey.ckey.red &0xF8)<<16);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3347 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3348 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3349 besr.graphics_key_clr=
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3350 ((radeon_grkey.ckey.blue &0xF8)>>3)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3351 | ((radeon_grkey.ckey.green&0xFC)<<3)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3352 | ((radeon_grkey.ckey.red &0xF8)<<8);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3353 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3354 case 24:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3355 case 32:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3356 besr.graphics_key_clr=
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3357 ((radeon_grkey.ckey.blue &0xFF))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3358 | ((radeon_grkey.ckey.green&0xFF)<<8)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3359 | ((radeon_grkey.ckey.red &0xFF)<<16);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3360 break;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3361 default:
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3362 besr.ckey_on=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3363 besr.graphics_key_msk=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3364 besr.graphics_key_clr=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3365 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3366 #ifdef RAGE128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3367 besr.graphics_key_msk=(1<<dbpp)-1;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3368 besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_NE|CMP_MIX_AND;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3369 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3370 besr.graphics_key_msk=besr.graphics_key_clr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3371 besr.ckey_cntl = VIDEO_KEY_FN_TRUE|CMP_MIX_AND|GRAPHIC_KEY_FN_EQ;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3372 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3373 }
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3374 else if(radeon_grkey.ckey.op == CKEY_ALPHA)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3375 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3376 int dbpp=radeon_vid_get_dbpp();
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3377 besr.ckey_on=1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3378
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3379 switch(dbpp)
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3380 {
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3381 case 32:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3382 besr.ckey_on=1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3383 besr.graphics_key_msk=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3384 besr.graphics_key_clr=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3385 besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND;
25366
42c182ff5066 register values were already set: simplify
ben
parents: 25317
diff changeset
3386 besr.merge_cntl |= 0x00000001; /* DISP_ALPHA_MODE_PER_PIXEL */
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3387 break;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3388 default:
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3389 besr.ckey_on=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3390 besr.graphics_key_msk=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3391 besr.graphics_key_clr=0;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3392 besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3393 result = 1;
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3394 }
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3395 }
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3396 else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3397 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3398 besr.ckey_on=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3399 besr.graphics_key_msk=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3400 besr.graphics_key_clr=0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3401 besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND;
25415
a0a6541b1944 r25345 patched the wrong line.
ben
parents: 25366
diff changeset
3402 besr.merge_cntl |= 0x00000100; /* DISP_RGB_OFFSET_EN */
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3403 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3404 radeon_fifo_wait(3);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3405 OUTREG(OV0_GRAPHICS_KEY_MSK, besr.graphics_key_msk);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3406 OUTREG(OV0_GRAPHICS_KEY_CLR, besr.graphics_key_clr);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3407 OUTREG(OV0_KEY_CNTL,besr.ckey_cntl);
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3408 OUTREG(DISP_MERGE_CNTL, besr.merge_cntl);
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3409 return result;
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3410 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3411
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3412 static int radeon_get_gkey(vidix_grkey_t *grkey)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3413 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3414 memcpy(grkey, &radeon_grkey, sizeof(vidix_grkey_t));
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3415 return(0);
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3416 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3417
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3418 static int radeon_set_gkey(const vidix_grkey_t *grkey)
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3419 {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3420 memcpy(&radeon_grkey, grkey, sizeof(vidix_grkey_t));
23044
7d693457f85e updated the ati vidix driver with the one from upstream vidix, it now supports much more GPUs (including all Radeon > 9600 and X series)
ben
parents: 22905
diff changeset
3421 return (set_gr_key());
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3422 }
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3423
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3424 #ifdef RAGE128
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3425 VDXDriver rage128_drv = {
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3426 "rage128",
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3427 #else
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3428 VDXDriver radeon_drv = {
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3429 "radeon",
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3430 #endif
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3431 NULL,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3432
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3433 .probe = radeon_probe,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3434 .get_caps = radeon_get_caps,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3435 .query_fourcc = radeon_query_fourcc,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3436 .init = radeon_init,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3437 .destroy = radeon_destroy,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3438 .config_playback = radeon_config_playback,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3439 .playback_on = radeon_playback_on,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3440 .playback_off = radeon_playback_off,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3441 .frame_sel = radeon_frame_select,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3442 .get_eq = radeon_get_eq,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3443 .set_eq = radeon_set_eq,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3444 .get_deint = radeon_playback_get_deint,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3445 .set_deint = radeon_playback_set_deint,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3446 .get_gkey = radeon_get_gkey,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3447 .set_gkey = radeon_set_gkey,
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 22850
diff changeset
3448 };