summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-05-06 12:40:12 -0700
committerEric Anholt <eric@anholt.net>2011-05-09 22:56:42 -0700
commit79e59fb2a047b1e733a7b0dee608db3311391725 (patch)
tree31e0a69db52f599911c14439e64227765d0b76e3
parent792738adfc5164d30358f045875dfc9b199a46da (diff)
Add support for Ivybridge chipset.
This gets display and 2D blit acceleration up and running. No Render acceleration is provided yet.
-rw-r--r--src/i965_render.c4
-rw-r--r--src/intel_batchbuffer.c4
-rw-r--r--src/intel_driver.h9
-rw-r--r--src/intel_module.c16
4 files changed, 32 insertions, 1 deletions
diff --git a/src/i965_render.c b/src/i965_render.c
index bfcd3f21..b76107d0 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -182,6 +182,10 @@ i965_check_composite(int op,
182 int width, int height) 182 int width, int height)
183{ 183{
184 ScrnInfoPtr scrn = xf86Screens[dest_picture->pDrawable->pScreen->myNum]; 184 ScrnInfoPtr scrn = xf86Screens[dest_picture->pDrawable->pScreen->myNum];
185 intel_screen_private *intel = intel_get_screen_private(scrn);
186
187 if (IS_GEN7(intel))
188 return FALSE;
185 189
186 /* Check for unsupported compositing operations. */ 190 /* Check for unsupported compositing operations. */
187 if (op >= sizeof(i965_blend_op) / sizeof(i965_blend_op[0])) { 191 if (op >= sizeof(i965_blend_op) / sizeof(i965_blend_op[0])) {
diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c
index 95eca434..d0a41aa3 100644
--- a/src/intel_batchbuffer.c
+++ b/src/intel_batchbuffer.c
@@ -211,7 +211,9 @@ void intel_batch_submit(ScrnInfoPtr scrn)
211 ret = drm_intel_bo_mrb_exec(intel->batch_bo, 211 ret = drm_intel_bo_mrb_exec(intel->batch_bo,
212 intel->batch_used*4, 212 intel->batch_used*4,
213 NULL, 0, 0xffffffff, 213 NULL, 0, 0xffffffff,
214 IS_GEN6(intel) ? intel->current_batch: I915_EXEC_DEFAULT); 214 (HAS_BLT(intel) ?
215 intel->current_batch:
216 I915_EXEC_DEFAULT));
215 } 217 }
216 218
217 if (ret != 0) { 219 if (ret != 0) {
diff --git a/src/intel_driver.h b/src/intel_driver.h
index 2e721771..4a584fef 100644
--- a/src/intel_driver.h
+++ b/src/intel_driver.h
@@ -184,6 +184,13 @@
184#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126 184#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126
185#define PCI_CHIP_SANDYBRIDGE_BRIDGE_S 0x0108 /* Server */ 185#define PCI_CHIP_SANDYBRIDGE_BRIDGE_S 0x0108 /* Server */
186#define PCI_CHIP_SANDYBRIDGE_S_GT 0x010A 186#define PCI_CHIP_SANDYBRIDGE_S_GT 0x010A
187
188#define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156
189#define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166
190#define PCI_CHIP_IVYBRIDGE_D_GT1 0x0152
191#define PCI_CHIP_IVYBRIDGE_D_GT2 0x0162
192#define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a
193
187#endif 194#endif
188 195
189#define I85X_CAPID 0x44 196#define I85X_CAPID 0x44
@@ -209,6 +216,7 @@
209#define IS_GEN4(intel) IS_GENx(intel, 4) 216#define IS_GEN4(intel) IS_GENx(intel, 4)
210#define IS_GEN5(intel) IS_GENx(intel, 5) 217#define IS_GEN5(intel) IS_GENx(intel, 5)
211#define IS_GEN6(intel) IS_GENx(intel, 6) 218#define IS_GEN6(intel) IS_GENx(intel, 6)
219#define IS_GEN7(intel) IS_GENx(intel, 7)
212 220
213/* Some chips have specific errata (or limits) that we need to workaround. */ 221/* Some chips have specific errata (or limits) that we need to workaround. */
214#define IS_I830(intel) (DEVICE_ID((intel)->PciInfo) == PCI_CHIP_I830_M) 222#define IS_I830(intel) (DEVICE_ID((intel)->PciInfo) == PCI_CHIP_I830_M)
@@ -222,6 +230,7 @@
222 230
223/* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */ 231/* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */
224#define SUPPORTS_YTILING(pI810) (INTEL_INFO(intel)->gen >= 40) 232#define SUPPORTS_YTILING(pI810) (INTEL_INFO(intel)->gen >= 40)
233#define HAS_BLT(pI810) (INTEL_INFO(intel)->gen >= 60)
225 234
226extern SymTabRec *intel_chipsets; 235extern SymTabRec *intel_chipsets;
227 236
diff --git a/src/intel_module.c b/src/intel_module.c
index 6cf59514..6aeaeeb1 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -73,6 +73,10 @@ static const struct intel_device_info intel_sandybridge_info = {
73 .gen = 60, 73 .gen = 60,
74}; 74};
75 75
76static const struct intel_device_info intel_ivybridge_info = {
77 .gen = 70,
78};
79
76static const SymTabRec _intel_chipsets[] = { 80static const SymTabRec _intel_chipsets[] = {
77 {PCI_CHIP_I810, "i810"}, 81 {PCI_CHIP_I810, "i810"},
78 {PCI_CHIP_I810_DC100, "i810-dc100"}, 82 {PCI_CHIP_I810_DC100, "i810-dc100"},
@@ -116,6 +120,11 @@ static const SymTabRec _intel_chipsets[] = {
116 {PCI_CHIP_SANDYBRIDGE_M_GT2, "Sandybridge" }, 120 {PCI_CHIP_SANDYBRIDGE_M_GT2, "Sandybridge" },
117 {PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, "Sandybridge" }, 121 {PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, "Sandybridge" },
118 {PCI_CHIP_SANDYBRIDGE_S_GT, "Sandybridge" }, 122 {PCI_CHIP_SANDYBRIDGE_S_GT, "Sandybridge" },
123 {PCI_CHIP_IVYBRIDGE_M_GT1, "Ivybridge Mobile GT1" },
124 {PCI_CHIP_IVYBRIDGE_M_GT2, "Ivybridge Mobile GT2" },
125 {PCI_CHIP_IVYBRIDGE_D_GT1, "Ivybridge Desktop GT1" },
126 {PCI_CHIP_IVYBRIDGE_D_GT2, "Ivybridge Desktop GT2" },
127 {PCI_CHIP_IVYBRIDGE_S_GT1, "Ivybridge Server GT1" },
119 {-1, NULL} 128 {-1, NULL}
120}; 129};
121SymTabRec *intel_chipsets = (SymTabRec *) _intel_chipsets; 130SymTabRec *intel_chipsets = (SymTabRec *) _intel_chipsets;
@@ -173,6 +182,13 @@ static const struct pci_id_match intel_device_match[] = {
173 INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, &intel_sandybridge_info ), 182 INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS, &intel_sandybridge_info ),
174 INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_S_GT, &intel_sandybridge_info ), 183 INTEL_DEVICE_MATCH (PCI_CHIP_SANDYBRIDGE_S_GT, &intel_sandybridge_info ),
175 184
185
186 INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_M_GT1, &intel_ivybridge_info ),
187 INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_M_GT2, &intel_ivybridge_info ),
188 INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_D_GT1, &intel_ivybridge_info ),
189 INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_D_GT2, &intel_ivybridge_info ),
190 INTEL_DEVICE_MATCH (PCI_CHIP_IVYBRIDGE_S_GT1, &intel_ivybridge_info ),
191
176 { 0, 0, 0 }, 192 { 0, 0, 0 },
177}; 193};
178 194