OSDN Git Service

minigbm: run clang-format
authorGurchetan Singh <gurchetansingh@chromium.org>
Mon, 17 Sep 2018 23:58:16 +0000 (16:58 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Tue, 18 Sep 2018 21:03:55 +0000 (14:03 -0700)
Change-Id: I9b5c3db33bd0c7914a214e2181d655aec84632c5
Reviewed-on: https://chromium-review.googlesource.com/1229436
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
cros_gralloc/gralloc0/gralloc0.cc
gbm.c
helpers.c
i915.c

index b645b3f..df1f62c 100644 (file)
@@ -300,10 +300,10 @@ static int gralloc0_lock_async(struct gralloc_module_t const *module, buffer_han
        uint32_t map_flags;
        uint8_t *addr[DRV_MAX_PLANES];
        auto mod = (struct gralloc0_module const *)module;
-       struct rectangle rect = {.x = static_cast<uint32_t>(l),
-                                .y = static_cast<uint32_t>(t),
-                                .width = static_cast<uint32_t>(w),
-                                .height = static_cast<uint32_t>(h) };
+       struct rectangle rect = { .x = static_cast<uint32_t>(l),
+                                 .y = static_cast<uint32_t>(t),
+                                 .width = static_cast<uint32_t>(w),
+                                 .height = static_cast<uint32_t>(h) };
 
        auto hnd = cros_gralloc_convert_handle(handle);
        if (!hnd) {
@@ -342,10 +342,10 @@ static int gralloc0_lock_async_ycbcr(struct gralloc_module_t const *module, buff
        uint32_t map_flags;
        uint8_t *addr[DRV_MAX_PLANES] = { nullptr, nullptr, nullptr, nullptr };
        auto mod = (struct gralloc0_module const *)module;
-       struct rectangle rect = {.x = static_cast<uint32_t>(l),
-                                .y = static_cast<uint32_t>(t),
-                                .width = static_cast<uint32_t>(w),
-                                .height = static_cast<uint32_t>(h) };
+       struct rectangle rect = { .x = static_cast<uint32_t>(l),
+                                 .y = static_cast<uint32_t>(t),
+                                 .width = static_cast<uint32_t>(w),
+                                 .height = static_cast<uint32_t>(h) };
 
        auto hnd = cros_gralloc_convert_handle(handle);
        if (!hnd) {
diff --git a/gbm.c b/gbm.c
index e265e36..dd6013c 100644 (file)
--- a/gbm.c
+++ b/gbm.c
@@ -229,7 +229,7 @@ PUBLIC void *gbm_bo_map(struct gbm_bo *bo, uint32_t x, uint32_t y, uint32_t widt
        void *addr;
        off_t offset;
        uint32_t map_flags;
-       struct rectangle rect = {.x = x, .y = y, .width = width, .height = height };
+       struct rectangle rect = { .x = x, .y = y, .width = width, .height = height };
        if (!bo || width == 0 || height == 0 || !stride || !map_data)
                return NULL;
 
@@ -318,9 +318,9 @@ PUBLIC union gbm_bo_handle gbm_bo_get_plane_handle(struct gbm_bo *bo, size_t pla
        return gbm_bo_get_handle_for_plane(bo, plane);
 }
 
-PUBLIC union gbm_bo_handle gbm_bo_get_handle_for_plane(struct gbm_bobo, size_t plane)
+PUBLIC union gbm_bo_handle gbm_bo_get_handle_for_plane(struct gbm_bo *bo, size_t plane)
 {
-  return (union gbm_bo_handle)drv_bo_get_plane_handle(bo->bo, plane).u64;
+       return (union gbm_bo_handle)drv_bo_get_plane_handle(bo->bo, plane).u64;
 }
 
 PUBLIC int gbm_bo_get_plane_fd(struct gbm_bo *bo, size_t plane)
index b780ff6..de4541f 100644 (file)
--- a/helpers.c
+++ b/helpers.c
@@ -497,9 +497,9 @@ void drv_add_combinations(struct driver *drv, const uint32_t *formats, uint32_t
        uint32_t i;
 
        for (i = 0; i < num_formats; i++) {
-               struct combination combo = {.format = formats[i],
-                                           .metadata = *metadata,
-                                           .use_flags = use_flags };
+               struct combination combo = { .format = formats[i],
+                                            .metadata = *metadata,
+                                            .use_flags = use_flags };
 
                drv_array_append(drv->combos, &combo);
        }
@@ -593,9 +593,9 @@ struct drv_array *drv_query_kms(struct driver *drv)
                        }
 
                        if (!found) {
-                               struct kms_item item = {.format = plane->formats[j],
-                                                       .modifier = DRM_FORMAT_MOD_LINEAR,
-                                                       .use_flags = use_flag };
+                               struct kms_item item = { .format = plane->formats[j],
+                                                        .modifier = DRM_FORMAT_MOD_LINEAR,
+                                                        .use_flags = use_flag };
 
                                drv_array_append(kms_items, &item);
                        }
diff --git a/i915.c b/i915.c
index 0d1668e..3f62638 100644 (file)
--- a/i915.c
+++ b/i915.c
@@ -154,13 +154,13 @@ static int i915_add_combinations(struct driver *drv)
        render_use_flags &= ~BO_USE_SW_WRITE_OFTEN;
        render_use_flags &= ~BO_USE_SW_READ_OFTEN;
        render_use_flags &= ~BO_USE_LINEAR;
-        render_use_flags &= ~BO_USE_PROTECTED;
+       render_use_flags &= ~BO_USE_PROTECTED;
 
        texture_use_flags &= ~BO_USE_RENDERSCRIPT;
        texture_use_flags &= ~BO_USE_SW_WRITE_OFTEN;
        texture_use_flags &= ~BO_USE_SW_READ_OFTEN;
        texture_use_flags &= ~BO_USE_LINEAR;
-        texture_use_flags &= ~BO_USE_PROTECTED;
+       texture_use_flags &= ~BO_USE_PROTECTED;
 
        metadata.tiling = I915_TILING_X;
        metadata.priority = 2;
@@ -421,7 +421,9 @@ static int i915_bo_create_with_modifiers(struct bo *bo, uint32_t width, uint32_t
                                         uint32_t format, const uint64_t *modifiers, uint32_t count)
 {
        static const uint64_t modifier_order[] = {
-               I915_FORMAT_MOD_Y_TILED, I915_FORMAT_MOD_X_TILED, DRM_FORMAT_MOD_LINEAR,
+               I915_FORMAT_MOD_Y_TILED,
+               I915_FORMAT_MOD_X_TILED,
+               DRM_FORMAT_MOD_LINEAR,
        };
        uint64_t modifier;