gbm: Add GBM_BO_USE_LINEAR flag
authorFlora Cui <flora.cui@amd.com>
Tue, 24 Mar 2015 10:34:29 +0000 (18:34 +0800)
committerMichel Dänzer <michel@daenzer.net>
Thu, 16 Apr 2015 06:49:15 +0000 (15:49 +0900)
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gbm/backends/dri/gbm_dri.c
src/gbm/main/gbm.h

index c5136723162e67a2cdf1c81c3ff9f581f02c2330..62bdf891d57c928afce250b009b3d5b052910ae1 100644 (file)
@@ -858,6 +858,8 @@ gbm_dri_bo_create(struct gbm_device *gbm,
       dri_use |= __DRI_IMAGE_USE_SCANOUT;
    if (usage & GBM_BO_USE_CURSOR)
       dri_use |= __DRI_IMAGE_USE_CURSOR;
       dri_use |= __DRI_IMAGE_USE_SCANOUT;
    if (usage & GBM_BO_USE_CURSOR)
       dri_use |= __DRI_IMAGE_USE_CURSOR;
+   if (usage & GBM_BO_USE_LINEAR)
+      dri_use |= __DRI_IMAGE_USE_LINEAR;
 
    /* Gallium drivers requires shared in order to get the handle/stride */
    dri_use |= __DRI_IMAGE_USE_SHARE;
 
    /* Gallium drivers requires shared in order to get the handle/stride */
    dri_use |= __DRI_IMAGE_USE_SHARE;
index 7b23c2609f9034e61199e796b5d0b7f5ff15a08a..2708e50a45ca3fa8be19cb21036641ce9e4f30c7 100644 (file)
@@ -209,6 +209,10 @@ enum gbm_bo_flags {
     * with GBM_BO_USE_CURSOR. but may not work for other combinations.
     */
    GBM_BO_USE_WRITE    = (1 << 3),
     * with GBM_BO_USE_CURSOR. but may not work for other combinations.
     */
    GBM_BO_USE_WRITE    = (1 << 3),
+   /**
+    * Buffer is linear, i.e. not tiled.
+    */
+   GBM_BO_USE_LINEAR = (1 << 4),
 };
 
 int
 };
 
 int