diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-09-11 18:29:26 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-21 06:39:19 -0400 |
commit | e9b1cc81c2222108d866323c51f482dd6db8d689 (patch) | |
tree | c57efbcc2e43d878ddcac52e4c92589b841613cf /drivers/char/agp/intel-gtt.c | |
parent | 1b263f246639c4777fbf6cfda932ecd1ea4bebb9 (diff) |
intel-gtt: consolidate fake_agp driver structs
They're now all the same.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/char/agp/intel-gtt.c')
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 170 |
1 files changed, 39 insertions, 131 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index abd422c806c5..57dc50488d18 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -1280,99 +1280,7 @@ static const struct agp_bridge_driver intel_810_driver = { | |||
1280 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 1280 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
1281 | }; | 1281 | }; |
1282 | 1282 | ||
1283 | static const struct agp_bridge_driver intel_830_driver = { | 1283 | static const struct agp_bridge_driver intel_fake_agp_driver = { |
1284 | .owner = THIS_MODULE, | ||
1285 | .size_type = FIXED_APER_SIZE, | ||
1286 | .aperture_sizes = intel_fake_agp_sizes, | ||
1287 | .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes), | ||
1288 | .configure = intel_fake_agp_configure, | ||
1289 | .fetch_size = intel_fake_agp_fetch_size, | ||
1290 | .cleanup = intel_gtt_cleanup, | ||
1291 | .agp_enable = intel_fake_agp_enable, | ||
1292 | .cache_flush = global_cache_flush, | ||
1293 | .create_gatt_table = intel_fake_agp_create_gatt_table, | ||
1294 | .free_gatt_table = intel_fake_agp_free_gatt_table, | ||
1295 | .insert_memory = intel_fake_agp_insert_entries, | ||
1296 | .remove_memory = intel_fake_agp_remove_entries, | ||
1297 | .alloc_by_type = intel_fake_agp_alloc_by_type, | ||
1298 | .free_by_type = intel_i810_free_by_type, | ||
1299 | .agp_alloc_page = agp_generic_alloc_page, | ||
1300 | .agp_alloc_pages = agp_generic_alloc_pages, | ||
1301 | .agp_destroy_page = agp_generic_destroy_page, | ||
1302 | .agp_destroy_pages = agp_generic_destroy_pages, | ||
1303 | .chipset_flush = intel_fake_agp_chipset_flush, | ||
1304 | }; | ||
1305 | |||
1306 | static const struct agp_bridge_driver intel_915_driver = { | ||
1307 | .owner = THIS_MODULE, | ||
1308 | .size_type = FIXED_APER_SIZE, | ||
1309 | .aperture_sizes = intel_fake_agp_sizes, | ||
1310 | .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes), | ||
1311 | .configure = intel_fake_agp_configure, | ||
1312 | .fetch_size = intel_fake_agp_fetch_size, | ||
1313 | .cleanup = intel_gtt_cleanup, | ||
1314 | .agp_enable = intel_fake_agp_enable, | ||
1315 | .cache_flush = global_cache_flush, | ||
1316 | .create_gatt_table = intel_fake_agp_create_gatt_table, | ||
1317 | .free_gatt_table = intel_fake_agp_free_gatt_table, | ||
1318 | .insert_memory = intel_fake_agp_insert_entries, | ||
1319 | .remove_memory = intel_fake_agp_remove_entries, | ||
1320 | .alloc_by_type = intel_fake_agp_alloc_by_type, | ||
1321 | .free_by_type = intel_i810_free_by_type, | ||
1322 | .agp_alloc_page = agp_generic_alloc_page, | ||
1323 | .agp_alloc_pages = agp_generic_alloc_pages, | ||
1324 | .agp_destroy_page = agp_generic_destroy_page, | ||
1325 | .agp_destroy_pages = agp_generic_destroy_pages, | ||
1326 | .chipset_flush = intel_fake_agp_chipset_flush, | ||
1327 | }; | ||
1328 | |||
1329 | static const struct agp_bridge_driver intel_i965_driver = { | ||
1330 | .owner = THIS_MODULE, | ||
1331 | .size_type = FIXED_APER_SIZE, | ||
1332 | .aperture_sizes = intel_fake_agp_sizes, | ||
1333 | .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes), | ||
1334 | .configure = intel_fake_agp_configure, | ||
1335 | .fetch_size = intel_fake_agp_fetch_size, | ||
1336 | .cleanup = intel_gtt_cleanup, | ||
1337 | .agp_enable = intel_fake_agp_enable, | ||
1338 | .cache_flush = global_cache_flush, | ||
1339 | .create_gatt_table = intel_fake_agp_create_gatt_table, | ||
1340 | .free_gatt_table = intel_fake_agp_free_gatt_table, | ||
1341 | .insert_memory = intel_fake_agp_insert_entries, | ||
1342 | .remove_memory = intel_fake_agp_remove_entries, | ||
1343 | .alloc_by_type = intel_fake_agp_alloc_by_type, | ||
1344 | .free_by_type = intel_i810_free_by_type, | ||
1345 | .agp_alloc_page = agp_generic_alloc_page, | ||
1346 | .agp_alloc_pages = agp_generic_alloc_pages, | ||
1347 | .agp_destroy_page = agp_generic_destroy_page, | ||
1348 | .agp_destroy_pages = agp_generic_destroy_pages, | ||
1349 | .chipset_flush = intel_fake_agp_chipset_flush, | ||
1350 | }; | ||
1351 | |||
1352 | static const struct agp_bridge_driver intel_gen6_driver = { | ||
1353 | .owner = THIS_MODULE, | ||
1354 | .size_type = FIXED_APER_SIZE, | ||
1355 | .aperture_sizes = intel_fake_agp_sizes, | ||
1356 | .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes), | ||
1357 | .configure = intel_fake_agp_configure, | ||
1358 | .fetch_size = intel_fake_agp_fetch_size, | ||
1359 | .cleanup = intel_gtt_cleanup, | ||
1360 | .agp_enable = intel_fake_agp_enable, | ||
1361 | .cache_flush = global_cache_flush, | ||
1362 | .create_gatt_table = intel_fake_agp_create_gatt_table, | ||
1363 | .free_gatt_table = intel_fake_agp_free_gatt_table, | ||
1364 | .insert_memory = intel_fake_agp_insert_entries, | ||
1365 | .remove_memory = intel_fake_agp_remove_entries, | ||
1366 | .alloc_by_type = intel_fake_agp_alloc_by_type, | ||
1367 | .free_by_type = intel_i810_free_by_type, | ||
1368 | .agp_alloc_page = agp_generic_alloc_page, | ||
1369 | .agp_alloc_pages = agp_generic_alloc_pages, | ||
1370 | .agp_destroy_page = agp_generic_destroy_page, | ||
1371 | .agp_destroy_pages = agp_generic_destroy_pages, | ||
1372 | .chipset_flush = intel_fake_agp_chipset_flush, | ||
1373 | }; | ||
1374 | |||
1375 | static const struct agp_bridge_driver intel_g33_driver = { | ||
1376 | .owner = THIS_MODULE, | 1284 | .owner = THIS_MODULE, |
1377 | .size_type = FIXED_APER_SIZE, | 1285 | .size_type = FIXED_APER_SIZE, |
1378 | .aperture_sizes = intel_fake_agp_sizes, | 1286 | .aperture_sizes = intel_fake_agp_sizes, |
@@ -1478,81 +1386,81 @@ static const struct intel_gtt_driver_description { | |||
1478 | { PCI_DEVICE_ID_INTEL_82815_CGC, "i815", &intel_810_driver, | 1386 | { PCI_DEVICE_ID_INTEL_82815_CGC, "i815", &intel_810_driver, |
1479 | &i81x_gtt_driver}, | 1387 | &i81x_gtt_driver}, |
1480 | { PCI_DEVICE_ID_INTEL_82830_CGC, "830M", | 1388 | { PCI_DEVICE_ID_INTEL_82830_CGC, "830M", |
1481 | &intel_830_driver , &i8xx_gtt_driver}, | 1389 | &intel_fake_agp_driver, &i8xx_gtt_driver}, |
1482 | { PCI_DEVICE_ID_INTEL_82845G_IG, "830M", | 1390 | { PCI_DEVICE_ID_INTEL_82845G_IG, "830M", |
1483 | &intel_830_driver , &i8xx_gtt_driver}, | 1391 | &intel_fake_agp_driver, &i8xx_gtt_driver}, |
1484 | { PCI_DEVICE_ID_INTEL_82854_IG, "854", | 1392 | { PCI_DEVICE_ID_INTEL_82854_IG, "854", |
1485 | &intel_830_driver , &i8xx_gtt_driver}, | 1393 | &intel_fake_agp_driver, &i8xx_gtt_driver}, |
1486 | { PCI_DEVICE_ID_INTEL_82855GM_IG, "855GM", | 1394 | { PCI_DEVICE_ID_INTEL_82855GM_IG, "855GM", |
1487 | &intel_830_driver , &i8xx_gtt_driver}, | 1395 | &intel_fake_agp_driver, &i8xx_gtt_driver}, |
1488 | { PCI_DEVICE_ID_INTEL_82865_IG, "865", | 1396 | { PCI_DEVICE_ID_INTEL_82865_IG, "865", |
1489 | &intel_830_driver , &i8xx_gtt_driver}, | 1397 | &intel_fake_agp_driver, &i8xx_gtt_driver}, |
1490 | { PCI_DEVICE_ID_INTEL_E7221_IG, "E7221 (i915)", | 1398 | { PCI_DEVICE_ID_INTEL_E7221_IG, "E7221 (i915)", |
1491 | &intel_915_driver , &i915_gtt_driver }, | 1399 | &intel_fake_agp_driver, &i915_gtt_driver }, |
1492 | { PCI_DEVICE_ID_INTEL_82915G_IG, "915G", | 1400 | { PCI_DEVICE_ID_INTEL_82915G_IG, "915G", |
1493 | &intel_915_driver , &i915_gtt_driver }, | 1401 | &intel_fake_agp_driver, &i915_gtt_driver }, |
1494 | { PCI_DEVICE_ID_INTEL_82915GM_IG, "915GM", | 1402 | { PCI_DEVICE_ID_INTEL_82915GM_IG, "915GM", |
1495 | &intel_915_driver , &i915_gtt_driver }, | 1403 | &intel_fake_agp_driver, &i915_gtt_driver }, |
1496 | { PCI_DEVICE_ID_INTEL_82945G_IG, "945G", | 1404 | { PCI_DEVICE_ID_INTEL_82945G_IG, "945G", |
1497 | &intel_915_driver , &i915_gtt_driver }, | 1405 | &intel_fake_agp_driver, &i915_gtt_driver }, |
1498 | { PCI_DEVICE_ID_INTEL_82945GM_IG, "945GM", | 1406 | { PCI_DEVICE_ID_INTEL_82945GM_IG, "945GM", |
1499 | &intel_915_driver , &i915_gtt_driver }, | 1407 | &intel_fake_agp_driver, &i915_gtt_driver }, |
1500 | { PCI_DEVICE_ID_INTEL_82945GME_IG, "945GME", | 1408 | { PCI_DEVICE_ID_INTEL_82945GME_IG, "945GME", |
1501 | &intel_915_driver , &i915_gtt_driver }, | 1409 | &intel_fake_agp_driver, &i915_gtt_driver }, |
1502 | { PCI_DEVICE_ID_INTEL_82946GZ_IG, "946GZ", | 1410 | { PCI_DEVICE_ID_INTEL_82946GZ_IG, "946GZ", |
1503 | &intel_i965_driver , &i965_gtt_driver }, | 1411 | &intel_fake_agp_driver, &i965_gtt_driver }, |
1504 | { PCI_DEVICE_ID_INTEL_82G35_IG, "G35", | 1412 | { PCI_DEVICE_ID_INTEL_82G35_IG, "G35", |
1505 | &intel_i965_driver , &i965_gtt_driver }, | 1413 | &intel_fake_agp_driver, &i965_gtt_driver }, |
1506 | { PCI_DEVICE_ID_INTEL_82965Q_IG, "965Q", | 1414 | { PCI_DEVICE_ID_INTEL_82965Q_IG, "965Q", |
1507 | &intel_i965_driver , &i965_gtt_driver }, | 1415 | &intel_fake_agp_driver, &i965_gtt_driver }, |
1508 | { PCI_DEVICE_ID_INTEL_82965G_IG, "965G", | 1416 | { PCI_DEVICE_ID_INTEL_82965G_IG, "965G", |
1509 | &intel_i965_driver , &i965_gtt_driver }, | 1417 | &intel_fake_agp_driver, &i965_gtt_driver }, |
1510 | { PCI_DEVICE_ID_INTEL_82965GM_IG, "965GM", | 1418 | { PCI_DEVICE_ID_INTEL_82965GM_IG, "965GM", |
1511 | &intel_i965_driver , &i965_gtt_driver }, | 1419 | &intel_fake_agp_driver, &i965_gtt_driver }, |
1512 | { PCI_DEVICE_ID_INTEL_82965GME_IG, "965GME/GLE", | 1420 | { PCI_DEVICE_ID_INTEL_82965GME_IG, "965GME/GLE", |
1513 | &intel_i965_driver , &i965_gtt_driver }, | 1421 | &intel_fake_agp_driver, &i965_gtt_driver }, |
1514 | { PCI_DEVICE_ID_INTEL_G33_IG, "G33", | 1422 | { PCI_DEVICE_ID_INTEL_G33_IG, "G33", |
1515 | &intel_g33_driver , &g33_gtt_driver }, | 1423 | &intel_fake_agp_driver, &g33_gtt_driver }, |
1516 | { PCI_DEVICE_ID_INTEL_Q35_IG, "Q35", | 1424 | { PCI_DEVICE_ID_INTEL_Q35_IG, "Q35", |
1517 | &intel_g33_driver , &g33_gtt_driver }, | 1425 | &intel_fake_agp_driver, &g33_gtt_driver }, |
1518 | { PCI_DEVICE_ID_INTEL_Q33_IG, "Q33", | 1426 | { PCI_DEVICE_ID_INTEL_Q33_IG, "Q33", |
1519 | &intel_g33_driver , &g33_gtt_driver }, | 1427 | &intel_fake_agp_driver, &g33_gtt_driver }, |
1520 | { PCI_DEVICE_ID_INTEL_PINEVIEW_M_IG, "GMA3150", | 1428 | { PCI_DEVICE_ID_INTEL_PINEVIEW_M_IG, "GMA3150", |
1521 | &intel_g33_driver , &pineview_gtt_driver }, | 1429 | &intel_fake_agp_driver, &pineview_gtt_driver }, |
1522 | { PCI_DEVICE_ID_INTEL_PINEVIEW_IG, "GMA3150", | 1430 | { PCI_DEVICE_ID_INTEL_PINEVIEW_IG, "GMA3150", |
1523 | &intel_g33_driver , &pineview_gtt_driver }, | 1431 | &intel_fake_agp_driver, &pineview_gtt_driver }, |
1524 | { PCI_DEVICE_ID_INTEL_GM45_IG, "GM45", | 1432 | { PCI_DEVICE_ID_INTEL_GM45_IG, "GM45", |
1525 | &intel_i965_driver , &g4x_gtt_driver }, | 1433 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1526 | { PCI_DEVICE_ID_INTEL_EAGLELAKE_IG, "Eaglelake", | 1434 | { PCI_DEVICE_ID_INTEL_EAGLELAKE_IG, "Eaglelake", |
1527 | &intel_i965_driver , &g4x_gtt_driver }, | 1435 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1528 | { PCI_DEVICE_ID_INTEL_Q45_IG, "Q45/Q43", | 1436 | { PCI_DEVICE_ID_INTEL_Q45_IG, "Q45/Q43", |
1529 | &intel_i965_driver , &g4x_gtt_driver }, | 1437 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1530 | { PCI_DEVICE_ID_INTEL_G45_IG, "G45/G43", | 1438 | { PCI_DEVICE_ID_INTEL_G45_IG, "G45/G43", |
1531 | &intel_i965_driver , &g4x_gtt_driver }, | 1439 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1532 | { PCI_DEVICE_ID_INTEL_B43_IG, "B43", | 1440 | { PCI_DEVICE_ID_INTEL_B43_IG, "B43", |
1533 | &intel_i965_driver , &g4x_gtt_driver }, | 1441 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1534 | { PCI_DEVICE_ID_INTEL_B43_1_IG, "B43", | 1442 | { PCI_DEVICE_ID_INTEL_B43_1_IG, "B43", |
1535 | &intel_i965_driver , &g4x_gtt_driver }, | 1443 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1536 | { PCI_DEVICE_ID_INTEL_G41_IG, "G41", | 1444 | { PCI_DEVICE_ID_INTEL_G41_IG, "G41", |
1537 | &intel_i965_driver , &g4x_gtt_driver }, | 1445 | &intel_fake_agp_driver, &g4x_gtt_driver }, |
1538 | { PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG, | 1446 | { PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG, |
1539 | "HD Graphics", &intel_i965_driver , &ironlake_gtt_driver }, | 1447 | "HD Graphics", &intel_fake_agp_driver, &ironlake_gtt_driver }, |
1540 | { PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG, | 1448 | { PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG, |
1541 | "HD Graphics", &intel_i965_driver , &ironlake_gtt_driver }, | 1449 | "HD Graphics", &intel_fake_agp_driver, &ironlake_gtt_driver }, |
1542 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_GT1_IG, | 1450 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_GT1_IG, |
1543 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1451 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1544 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_GT2_IG, | 1452 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_GT2_IG, |
1545 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1453 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1546 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_GT2_PLUS_IG, | 1454 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_GT2_PLUS_IG, |
1547 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1455 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1548 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT1_IG, | 1456 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT1_IG, |
1549 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1457 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1550 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT2_IG, | 1458 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT2_IG, |
1551 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1459 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1552 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT2_PLUS_IG, | 1460 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT2_PLUS_IG, |
1553 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1461 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1554 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_IG, | 1462 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_IG, |
1555 | "Sandybridge", &intel_gen6_driver , &sandybridge_gtt_driver }, | 1463 | "Sandybridge", &intel_fake_agp_driver, &sandybridge_gtt_driver }, |
1556 | { 0, NULL, NULL } | 1464 | { 0, NULL, NULL } |
1557 | }; | 1465 | }; |
1558 | 1466 | ||