modetest: fix typo
[glsdk/libdrm.git] / tests / modetest / modetest.c
index 819724aeb85b7e488b546725e82ea9563c5a983d..223adc418572c1f03189d9955a1cbaf89cfa0c55 100644 (file)
@@ -770,7 +770,7 @@ set_plane(struct kms_driver *kms, struct connector *c, struct plane *p)
                        kms_bo_get_prop(plane_bo, KMS_HANDLE, &handles[1]);
                        pitches[2] = p->w / 2;
                        offsets[2] = offsets[1] + (p->w * p->h) / 4;
-                       kms_bo_get_prop(plane_bo, KMS_HANDLE, &handles[1]);
+                       kms_bo_get_prop(plane_bo, KMS_HANDLE, &handles[2]);
 
                        fill420(virtual, virtual+offsets[1], virtual+offsets[2],
                                        1, 0, p->w, p->h, pitches[0]);