Merge tag 'v2.6.35-rc6' into drm-radeon-next
[sfrench/cifs-2.6.git] / drivers / gpu / drm / radeon / radeon_kms.c
index ab389f89fa8df7fca6af0a3ca9197c0102dc39f4..8931c8e78101fbaa53343b8aeca47ed9e21b57c3 100644 (file)
@@ -49,7 +49,7 @@ int radeon_driver_unload_kms(struct drm_device *dev)
 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 {
        struct radeon_device *rdev;
-       int r;
+       int r, acpi_status;
 
        rdev = kzalloc(sizeof(struct radeon_device), GFP_KERNEL);
        if (rdev == NULL) {
@@ -77,6 +77,12 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
                dev_err(&dev->pdev->dev, "Fatal error during GPU init\n");
                goto out;
        }
+
+       /* Call ACPI methods */
+       acpi_status = radeon_acpi_init(rdev);
+       if (acpi_status)
+               dev_err(&dev->pdev->dev, "Error during ACPI methods call\n");
+
        /* Again modeset_init should fail only on fatal error
         * otherwise it should provide enough functionalities
         * for shadowfb to run
@@ -142,6 +148,18 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
        case RADEON_INFO_ACCEL_WORKING2:
                value = rdev->accel_working;
                break;
+       case RADEON_INFO_TILING_CONFIG:
+               if (rdev->family >= CHIP_CEDAR)
+                       value = rdev->config.evergreen.tile_config;
+               else if (rdev->family >= CHIP_RV770)
+                       value = rdev->config.rv770.tile_config;
+               else if (rdev->family >= CHIP_R600)
+                       value = rdev->config.r600.tile_config;
+               else {
+                       DRM_DEBUG("tiling config is r6xx+ only!\n");
+                       return -EINVAL;
+               }
+               break;
        default:
                DRM_DEBUG("Invalid request %d\n", info->request);
                return -EINVAL;