From: Alex Deucher Date: Wed, 21 Jul 2010 18:05:35 +0000 (-0400) Subject: drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl X-Git-Tag: v2.6.35-rc6~2^2~1 X-Git-Url: http://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=0baf2d8fe43fdd81faa30e65ff71785c99c78520 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 Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 6a70c0dc7f9..ab389f89fa8 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -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++) { crtc = (struct drm_crtc *)minfo->crtcs[i]; if (crtc && crtc->base.id == value) { - value = i; + struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); + value = radeon_crtc->crtc_id; found = 1; break; }