Revert "dual display fix"
[glsdk/omapdrmtest.git] / util / display-kms.c
index 4265090450711b81dd0e9e36a7e12a7dfb5a0e51..8fc38a1d6820f5160c973618727d563191feb76f 100644 (file)
@@ -337,7 +337,6 @@ post_vid_buffer(struct display *disp, struct buffer *buf,
        struct buffer_kms *buf_kms = to_buffer_kms(buf);
        int ret = 0;
        uint32_t i, j;
        struct buffer_kms *buf_kms = to_buffer_kms(buf);
        int ret = 0;
        uint32_t i, j;
-       int busy_planes = 0;
 
        /* ensure we have the overlay setup: */
        for (i = 0; i < disp_kms->connectors_count; i++) {
 
        /* ensure we have the overlay setup: */
        for (i = 0; i < disp_kms->connectors_count; i++) {
@@ -351,14 +350,13 @@ post_vid_buffer(struct display *disp, struct buffer *buf,
 
                if (! disp_kms->ovr[i]) {
 
 
                if (! disp_kms->ovr[i]) {
 
-                       for (j = 0; j + used_planes < disp_kms->plane_resources->count_planes; j++) {
+                       for (j = 0; j < disp_kms->plane_resources->count_planes; j++) {
                                drmModePlane *ovr = drmModeGetPlane(disp->fd,
                                drmModePlane *ovr = drmModeGetPlane(disp->fd,
-                                               disp_kms->plane_resources->planes[j + busy_planes]);
+                                               disp_kms->plane_resources->planes[j]);
                                if ((ovr->possible_crtcs & (1 << connector->pipe)) &&
                                                !(used_planes & (1 << j))) {
                                        disp_kms->ovr[i] = ovr;
                                        used_planes |= (1 << j);
                                if ((ovr->possible_crtcs & (1 << connector->pipe)) &&
                                                !(used_planes & (1 << j))) {
                                        disp_kms->ovr[i] = ovr;
                                        used_planes |= (1 << j);
-printf("\nused_planes = %d\n", used_planes);
                                        break;
                                }
                        }
                                        break;
                                }
                        }