diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-06-03 19:00:03 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-07 19:34:42 -0400 |
commit | 148a03bc0b0e3ef153d0cade7bc88e9b14edfb7a (patch) | |
tree | ec5cf10676d6f69848952f6a89b475eb664333e2 /drivers/gpu/drm | |
parent | 9b8eb4d14767209c83087063352cd04266ecdfd1 (diff) |
drm/radeon/kms/evergreen: set accel_enabled
This is needed to enable accel in the ddx. However,
due to a bug in older versions of the ddx, it relies
on accel being disabled in order to load properly on
evergreen chips. To maintain compatility, we add a new
get accel param and call that from the ddx. The old one
always returns false for evergreen cards.
[this fixes a regression with older userspaces on newer kernels].
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 9 |
3 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 0440c0939bdd..49c94aef0dda 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -2153,7 +2153,7 @@ int evergreen_init(struct radeon_device *rdev) | |||
2153 | if (r) | 2153 | if (r) |
2154 | return r; | 2154 | return r; |
2155 | 2155 | ||
2156 | rdev->accel_working = false; | 2156 | rdev->accel_working = true; |
2157 | r = evergreen_startup(rdev); | 2157 | r = evergreen_startup(rdev); |
2158 | if (r) { | 2158 | if (r) { |
2159 | dev_err(rdev->dev, "disabling GPU acceleration\n"); | 2159 | dev_err(rdev->dev, "disabling GPU acceleration\n"); |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 902d1731a652..e166fe4d7c30 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -45,9 +45,10 @@ | |||
45 | * - 2.2.0 - add r6xx/r7xx const buffer support | 45 | * - 2.2.0 - add r6xx/r7xx const buffer support |
46 | * - 2.3.0 - add MSPOS + 3D texture + r500 VAP regs | 46 | * - 2.3.0 - add MSPOS + 3D texture + r500 VAP regs |
47 | * - 2.4.0 - add crtc id query | 47 | * - 2.4.0 - add crtc id query |
48 | * - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen | ||
48 | */ | 49 | */ |
49 | #define KMS_DRIVER_MAJOR 2 | 50 | #define KMS_DRIVER_MAJOR 2 |
50 | #define KMS_DRIVER_MINOR 4 | 51 | #define KMS_DRIVER_MINOR 5 |
51 | #define KMS_DRIVER_PATCHLEVEL 0 | 52 | #define KMS_DRIVER_PATCHLEVEL 0 |
52 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 53 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
53 | int radeon_driver_unload_kms(struct drm_device *dev); | 54 | int radeon_driver_unload_kms(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 04068352ccd2..6a70c0dc7f92 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -118,7 +118,11 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
118 | value = rdev->num_z_pipes; | 118 | value = rdev->num_z_pipes; |
119 | break; | 119 | break; |
120 | case RADEON_INFO_ACCEL_WORKING: | 120 | case RADEON_INFO_ACCEL_WORKING: |
121 | value = rdev->accel_working; | 121 | /* xf86-video-ati 6.13.0 relies on this being false for evergreen */ |
122 | if ((rdev->family >= CHIP_CEDAR) && (rdev->family <= CHIP_HEMLOCK)) | ||
123 | value = false; | ||
124 | else | ||
125 | value = rdev->accel_working; | ||
122 | break; | 126 | break; |
123 | case RADEON_INFO_CRTC_FROM_ID: | 127 | case RADEON_INFO_CRTC_FROM_ID: |
124 | for (i = 0, found = 0; i < rdev->num_crtc; i++) { | 128 | for (i = 0, found = 0; i < rdev->num_crtc; i++) { |
@@ -134,6 +138,9 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
134 | return -EINVAL; | 138 | return -EINVAL; |
135 | } | 139 | } |
136 | break; | 140 | break; |
141 | case RADEON_INFO_ACCEL_WORKING2: | ||
142 | value = rdev->accel_working; | ||
143 | break; | ||
137 | default: | 144 | default: |
138 | DRM_DEBUG("Invalid request %d\n", info->request); | 145 | DRM_DEBUG("Invalid request %d\n", info->request); |
139 | return -EINVAL; | 146 | return -EINVAL; |