r300.c (9e9fd65d1fa51d919d54d731be0e66492b5b6c5a) | r300.c (2898c348e5caa50b31b9113726dfa45b2dfc3124) |
---|---|
1/* 2 * Copyright 2008 Advanced Micro Devices, Inc. 3 * Copyright 2008 Red Hat Inc. 4 * Copyright 2009 Jerome Glisse. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 1377 unchanged lines hidden (view full) --- 1386 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 1387 /* 1M ring buffer */ 1388 r = r100_cp_init(rdev, 1024 * 1024); 1389 if (r) { 1390 dev_err(rdev->dev, "failed initializing CP (%d).\n", r); 1391 return r; 1392 } 1393 | 1/* 2 * Copyright 2008 Advanced Micro Devices, Inc. 3 * Copyright 2008 Red Hat Inc. 4 * Copyright 2009 Jerome Glisse. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 1377 unchanged lines hidden (view full) --- 1386 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 1387 /* 1M ring buffer */ 1388 r = r100_cp_init(rdev, 1024 * 1024); 1389 if (r) { 1390 dev_err(rdev->dev, "failed initializing CP (%d).\n", r); 1391 return r; 1392 } 1393 |
1394 r = radeon_ib_pool_start(rdev); 1395 if (r) | 1394 r = radeon_ib_pool_init(rdev); 1395 if (r) { 1396 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); |
1396 return r; | 1397 return r; |
1398 } |
|
1397 1398 r = radeon_ib_ring_tests(rdev); 1399 if (r) 1400 return r; 1401 1402 return 0; 1403} 1404 --- 26 unchanged lines hidden (view full) --- 1431 if (r) { 1432 rdev->accel_working = false; 1433 } 1434 return r; 1435} 1436 1437int r300_suspend(struct radeon_device *rdev) 1438{ | 1399 1400 r = radeon_ib_ring_tests(rdev); 1401 if (r) 1402 return r; 1403 1404 return 0; 1405} 1406 --- 26 unchanged lines hidden (view full) --- 1433 if (r) { 1434 rdev->accel_working = false; 1435 } 1436 return r; 1437} 1438 1439int r300_suspend(struct radeon_device *rdev) 1440{ |
1439 radeon_ib_pool_suspend(rdev); | |
1440 r100_cp_disable(rdev); 1441 radeon_wb_disable(rdev); 1442 r100_irq_disable(rdev); 1443 if (rdev->flags & RADEON_IS_PCIE) 1444 rv370_pcie_gart_disable(rdev); 1445 if (rdev->flags & RADEON_IS_PCI) 1446 r100_pci_gart_disable(rdev); 1447 return 0; 1448} 1449 1450void r300_fini(struct radeon_device *rdev) 1451{ 1452 r100_cp_fini(rdev); 1453 radeon_wb_fini(rdev); | 1441 r100_cp_disable(rdev); 1442 radeon_wb_disable(rdev); 1443 r100_irq_disable(rdev); 1444 if (rdev->flags & RADEON_IS_PCIE) 1445 rv370_pcie_gart_disable(rdev); 1446 if (rdev->flags & RADEON_IS_PCI) 1447 r100_pci_gart_disable(rdev); 1448 return 0; 1449} 1450 1451void r300_fini(struct radeon_device *rdev) 1452{ 1453 r100_cp_fini(rdev); 1454 radeon_wb_fini(rdev); |
1454 r100_ib_fini(rdev); | 1455 radeon_ib_pool_fini(rdev); |
1455 radeon_gem_fini(rdev); 1456 if (rdev->flags & RADEON_IS_PCIE) 1457 rv370_pcie_gart_fini(rdev); 1458 if (rdev->flags & RADEON_IS_PCI) 1459 r100_pci_gart_fini(rdev); 1460 radeon_agp_fini(rdev); 1461 radeon_irq_kms_fini(rdev); 1462 radeon_fence_driver_fini(rdev); --- 70 unchanged lines hidden (view full) --- 1533 } 1534 if (rdev->flags & RADEON_IS_PCI) { 1535 r = r100_pci_gart_init(rdev); 1536 if (r) 1537 return r; 1538 } 1539 r300_set_reg_safe(rdev); 1540 | 1456 radeon_gem_fini(rdev); 1457 if (rdev->flags & RADEON_IS_PCIE) 1458 rv370_pcie_gart_fini(rdev); 1459 if (rdev->flags & RADEON_IS_PCI) 1460 r100_pci_gart_fini(rdev); 1461 radeon_agp_fini(rdev); 1462 radeon_irq_kms_fini(rdev); 1463 radeon_fence_driver_fini(rdev); --- 70 unchanged lines hidden (view full) --- 1534 } 1535 if (rdev->flags & RADEON_IS_PCI) { 1536 r = r100_pci_gart_init(rdev); 1537 if (r) 1538 return r; 1539 } 1540 r300_set_reg_safe(rdev); 1541 |
1541 r = radeon_ib_pool_init(rdev); | |
1542 rdev->accel_working = true; | 1542 rdev->accel_working = true; |
1543 if (r) { 1544 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); 1545 rdev->accel_working = false; 1546 } 1547 | |
1548 r = r300_startup(rdev); 1549 if (r) { 1550 /* Somethings want wront with the accel init stop accel */ 1551 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 1552 r100_cp_fini(rdev); 1553 radeon_wb_fini(rdev); | 1543 r = r300_startup(rdev); 1544 if (r) { 1545 /* Somethings want wront with the accel init stop accel */ 1546 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 1547 r100_cp_fini(rdev); 1548 radeon_wb_fini(rdev); |
1554 r100_ib_fini(rdev); | 1549 radeon_ib_pool_fini(rdev); |
1555 radeon_irq_kms_fini(rdev); 1556 if (rdev->flags & RADEON_IS_PCIE) 1557 rv370_pcie_gart_fini(rdev); 1558 if (rdev->flags & RADEON_IS_PCI) 1559 r100_pci_gart_fini(rdev); 1560 radeon_agp_fini(rdev); 1561 rdev->accel_working = false; 1562 } 1563 return 0; 1564} | 1550 radeon_irq_kms_fini(rdev); 1551 if (rdev->flags & RADEON_IS_PCIE) 1552 rv370_pcie_gart_fini(rdev); 1553 if (rdev->flags & RADEON_IS_PCI) 1554 r100_pci_gart_fini(rdev); 1555 radeon_agp_fini(rdev); 1556 rdev->accel_working = false; 1557 } 1558 return 0; 1559} |