drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl

Return the crtc_id, not the counter value.  They are not
necessarily the same.

Cc: Jerome Glisse <glisse@freedesktop.org>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Alex Deucher 2010-07-21 14:05:35 -04:00 коммит произвёл Dave Airlie
Родитель d667865114
Коммит 0baf2d8fe4
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -128,7 +128,8 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
for (i = 0, found = 0; i < rdev->num_crtc; i++) { for (i = 0, found = 0; i < rdev->num_crtc; i++) {
crtc = (struct drm_crtc *)minfo->crtcs[i]; crtc = (struct drm_crtc *)minfo->crtcs[i];
if (crtc && crtc->base.id == value) { if (crtc && crtc->base.id == value) {
value = i; struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
value = radeon_crtc->crtc_id;
found = 1; found = 1;
break; break;
} }