Skip to contentSkip to conversation

drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl

PATCH New Alex Deucher 1 participant 1 message Jul 21, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/radeon/radeon_kms.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/radeon_kms.c +2 -1
index 9012e6f..8931c8e 100644
@@ -134,7 +134,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;
 			}
Signature · 1 line
1.7.1.1