Skip to content

Commit 0baf2d8

Browse files
agd5fairlied
authored andcommitted
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent d667865 commit 0baf2d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/radeon/radeon_kms.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
128128
for (i = 0, found = 0; i < rdev->num_crtc; i++) {
129129
crtc = (struct drm_crtc *)minfo->crtcs[i];
130130
if (crtc && crtc->base.id == value) {
131-
value = i;
131+
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
132+
value = radeon_crtc->crtc_id;
132133
found = 1;
133134
break;
134135
}

0 commit comments

Comments
 (0)