]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/omapdrmtest.git/commitdiff
display: new multiplanar qualifier
authorVincent Stehlé <v-stehle@ti.com>
Mon, 27 Aug 2012 16:31:51 +0000 (18:31 +0200)
committerVincent Stehlé <v-stehle@ti.com>
Mon, 27 Aug 2012 17:06:44 +0000 (19:06 +0200)
Introduce a new "qualifier" on displays and display buffers, to keep track of
whether we have a single buffer for Y/U/V or if we have Y and U/V separated.

KMS display buffers are multiplanar, and X11 display buffers are
non-multiplanar since latest non-multiplanar dri2video in xf86-video-omap.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
util/display-kms.c
util/display-x11.c
util/util.h

index 882117b970a21c16a1524ee63c365e08f835c34c..106582abbdfe72033a046373eee9d5c028e472af 100644 (file)
@@ -118,6 +118,7 @@ alloc_buffer(struct display *disp, uint32_t fourcc, uint32_t w, uint32_t h)
        buf->fourcc = fourcc;
        buf->width = w;
        buf->height = h;
        buf->fourcc = fourcc;
        buf->width = w;
        buf->height = h;
+       buf->multiplanar = true;
 
        buf->nbo = 1;
 
 
        buf->nbo = 1;
 
@@ -542,6 +543,7 @@ disp_kms_open(int argc, char **argv)
 
        disp->width = 0;
        disp->height = 0;
 
        disp->width = 0;
        disp->height = 0;
+       disp->multiplanar = true;
        for (i = 0; i < (int)disp_kms->connectors_count; i++) {
                struct connector *c = &disp_kms->connector[i];
                connector_find_mode(disp, c);
        for (i = 0; i < (int)disp_kms->connectors_count; i++) {
                struct connector *c = &disp_kms->connector[i];
                connector_find_mode(disp, c);
@@ -554,8 +556,8 @@ disp_kms_open(int argc, char **argv)
                }
        }
 
                }
        }
 
-       MSG("using %d connectors, %dx%d display",
-                       disp_kms->connectors_count, disp->width, disp->height);
+       MSG("using %d connectors, %dx%d display, multiplanar: %d",
+                       disp_kms->connectors_count, disp->width, disp->height, disp->multiplanar);
 
        return disp;
 
 
        return disp;
 
index 0144612a909009b327e4090c36d1842150e5b3fa..9553dc6127c35ecba204f10e826031375cbb12fa 100644 (file)
@@ -107,6 +107,7 @@ get_vid_buffers(struct display *disp, uint32_t n,
                buf->fourcc = fourcc;
                buf->width = w;
                buf->height = h;
                buf->fourcc = fourcc;
                buf->width = w;
                buf->height = h;
+               buf->multiplanar = false;
 
                for (j = 0; dri2bufs[i].names[j]; j++) {
                        buf->bo[j] = omap_bo_from_name(disp->dev, dri2bufs[i].names[j]);
 
                for (j = 0; dri2bufs[i].names[j]; j++) {
                        buf->bo[j] = omap_bo_from_name(disp->dev, dri2bufs[i].names[j]);
@@ -303,6 +304,7 @@ disp_x11_open(int argc, char **argv)
        disp->get_vid_buffers = get_vid_buffers;
        disp->post_buffer = post_buffer;
        disp->post_vid_buffer = post_vid_buffer;
        disp->get_vid_buffers = get_vid_buffers;
        disp->post_buffer = post_buffer;
        disp->post_vid_buffer = post_vid_buffer;
+       disp->multiplanar = false;
 
        /* note: set args to NULL after we've parsed them so other modules know
         * that it is already parsed (since the arg parsing is decentralized)
 
        /* note: set args to NULL after we've parsed them so other modules know
         * that it is already parsed (since the arg parsing is decentralized)
index 363ad72c1ecb7051d1a465aad7fdcc6b6cfb0115..28a345adeefe3202c3ab88dbb6e5f5d14ed35c87 100644 (file)
@@ -54,6 +54,7 @@ struct buffer {
        struct omap_bo *bo[4];
        uint32_t pitches[4];
        struct list unlocked;
        struct omap_bo *bo[4];
        uint32_t pitches[4];
        struct list unlocked;
+       bool multiplanar;       /* True when Y and U/V are in separate buffers. */
 };
 
 /* State variables, used to maintain the playback rate. */
 };
 
 /* State variables, used to maintain the playback rate. */
@@ -77,6 +78,8 @@ struct display {
        int (*post_buffer)(struct display *disp, struct buffer *buf);
        int (*post_vid_buffer)(struct display *disp, struct buffer *buf,
                        uint32_t x, uint32_t y, uint32_t w, uint32_t h);
        int (*post_buffer)(struct display *disp, struct buffer *buf);
        int (*post_vid_buffer)(struct display *disp, struct buffer *buf,
                        uint32_t x, uint32_t y, uint32_t w, uint32_t h);
+
+       bool multiplanar;       /* True when Y and U/V are in separate buffers. */
 };
 
 /* Print display related help */
 };
 
 /* Print display related help */