OSDN Git Service

minigbm: run clang-format
authorKeiichi Watanabe <keiichiw@chromium.org>
Mon, 13 Aug 2018 07:44:54 +0000 (16:44 +0900)
committerchrome-bot <chrome-bot@chromium.org>
Tue, 14 Aug 2018 09:13:26 +0000 (02:13 -0700)
Though presubmit.sh requires formatting by clang-format, some files
are not formatted.

BUG=None
TEST=compile

Change-Id: I828dd85536cb94dc98cd11e83ec86af53a425070
Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1172241
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
amdgpu.c
cros_gralloc/gralloc0/gralloc0.cc
gbm.c
helpers.c
i915.c

index eea1232..efba3da 100644 (file)
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -145,7 +145,7 @@ static int amdgpu_create_bo(struct bo *bo, uint32_t width, uint32_t height, uint
                return dri_bo_create(bo, width, height, format, use_flags);
 
        stride = drv_stride_from_format(format, width, 0);
-       stride = ALIGN(stride,256);
+       stride = ALIGN(stride, 256);
 
        drv_bo_from_format(bo, stride, height, format);
 
index df1f62c..b645b3f 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 99d993f..e265e36 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;
 
@@ -265,7 +265,7 @@ PUBLIC uint32_t gbm_bo_get_height(struct gbm_bo *bo)
 
 PUBLIC uint32_t gbm_bo_get_stride(struct gbm_bo *bo)
 {
-  return gbm_bo_get_stride_for_plane(bo, 0);
+       return gbm_bo_get_stride_for_plane(bo, 0);
 }
 
 PUBLIC uint32_t gbm_bo_get_stride_or_tiling(struct gbm_bo *bo)
@@ -285,7 +285,7 @@ PUBLIC uint64_t gbm_bo_get_format_modifier(struct gbm_bo *bo)
 
 PUBLIC uint64_t gbm_bo_get_modifier(struct gbm_bo *bo)
 {
-    return gbm_bo_get_plane_format_modifier(bo, 0);
+       return gbm_bo_get_plane_format_modifier(bo, 0);
 }
 
 PUBLIC struct gbm_device *gbm_bo_get_device(struct gbm_bo *bo)
@@ -310,7 +310,7 @@ PUBLIC size_t gbm_bo_get_num_planes(struct gbm_bo *bo)
 
 PUBLIC size_t gbm_bo_get_plane_count(struct gbm_bo *bo)
 {
-    return drv_bo_get_num_planes(bo->bo);
+       return drv_bo_get_num_planes(bo->bo);
 }
 
 PUBLIC union gbm_bo_handle gbm_bo_get_plane_handle(struct gbm_bo *bo, size_t plane)
@@ -335,7 +335,7 @@ PUBLIC uint32_t gbm_bo_get_plane_offset(struct gbm_bo *bo, size_t plane)
 
 PUBLIC uint32_t gbm_bo_get_offset(struct gbm_bo *bo, size_t plane)
 {
-    return drv_bo_get_plane_offset(bo->bo, plane);
+       return drv_bo_get_plane_offset(bo->bo, plane);
 }
 
 PUBLIC uint32_t gbm_bo_get_plane_size(struct gbm_bo *bo, size_t plane)
@@ -350,7 +350,7 @@ PUBLIC uint32_t gbm_bo_get_plane_stride(struct gbm_bo *bo, size_t plane)
 
 PUBLIC uint32_t gbm_bo_get_stride_for_plane(struct gbm_bo *bo, size_t plane)
 {
-    return drv_bo_get_plane_stride(bo->bo, plane);
+       return drv_bo_get_plane_stride(bo->bo, plane);
 }
 
 PUBLIC uint64_t gbm_bo_get_plane_format_modifier(struct gbm_bo *bo, size_t plane)
index 463c1b3..be2c403 100644 (file)
--- a/helpers.c
+++ b/helpers.c
@@ -494,9 +494,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);
        }
@@ -590,9 +590,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 a88db6a..e01c0e2 100644 (file)
--- a/i915.c
+++ b/i915.c
@@ -419,9 +419,7 @@ 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;