From 4bc2d221c996f46bd747c7a79e6a7b5c72535e20 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Wed, 16 Oct 2024 00:05:18 +0200 Subject: [PATCH] winsys/nouveau: Reformat to stop relying on tabs Also remove .editorconfig as we don't need it anymore. Signed-off-by: Mary Guillemard Reviewed-by: Karol Herbst Part-of: --- src/gallium/winsys/nouveau/drm/.editorconfig | 2 - .../winsys/nouveau/drm/nouveau_drm_winsys.c | 115 +++++++++--------- 2 files changed, 57 insertions(+), 60 deletions(-) delete mode 100644 src/gallium/winsys/nouveau/drm/.editorconfig diff --git a/src/gallium/winsys/nouveau/drm/.editorconfig b/src/gallium/winsys/nouveau/drm/.editorconfig deleted file mode 100644 index cc8e11ffd65..00000000000 --- a/src/gallium/winsys/nouveau/drm/.editorconfig +++ /dev/null @@ -1,2 +0,0 @@ -[*.{c,h}] -indent_style = tab diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c index 7aab74572ad..2cffee99436 100644 --- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c @@ -9,83 +9,82 @@ #include "renderonly/renderonly.h" #include "nouveau_drm_public.h" -#include "nouveau/nouveau_winsys.h" #include "nouveau/nouveau_screen.h" +#include "nouveau/nouveau_winsys.h" static struct pipe_screen * nouveau_screen_create(int fd, const struct pipe_screen_config *config, - struct renderonly *ro) + struct renderonly *ro) { - struct nouveau_drm *drm = NULL; - struct nouveau_device *dev = NULL; - struct nouveau_screen *(*init)(struct nouveau_device *); - struct nouveau_screen *screen = NULL; - int ret; + struct nouveau_drm *drm = NULL; + struct nouveau_device *dev = NULL; + struct nouveau_screen *(*init)(struct nouveau_device *); + struct nouveau_screen *screen = NULL; + int ret; - ret = nouveau_drm_new(fd, &drm); - if (ret) - return NULL; + ret = nouveau_drm_new(fd, &drm); + if (ret) + return NULL; - ret = nouveau_device_new(&drm->client, &dev); - if (ret) - goto err_dev_new; + ret = nouveau_device_new(&drm->client, &dev); + if (ret) + goto err_dev_new; - switch (dev->chipset & ~0xf) { - case 0x30: - case 0x40: - case 0x60: - init = nv30_screen_create; - break; - case 0x50: - case 0x80: - case 0x90: - case 0xa0: - init = nv50_screen_create; - break; - case 0xc0: - case 0xd0: - case 0xe0: - case 0xf0: - case 0x100: - case 0x110: - case 0x120: - case 0x130: - case 0x140: - case 0x160: - case 0x170: - case 0x190: - init = nvc0_screen_create; - break; - default: - debug_printf("%s: unknown chipset nv%02x\n", __func__, - dev->chipset); - goto err_screen_create; - } + switch (dev->chipset & ~0xf) { + case 0x30: + case 0x40: + case 0x60: + init = nv30_screen_create; + break; + case 0x50: + case 0x80: + case 0x90: + case 0xa0: + init = nv50_screen_create; + break; + case 0xc0: + case 0xd0: + case 0xe0: + case 0xf0: + case 0x100: + case 0x110: + case 0x120: + case 0x130: + case 0x140: + case 0x160: + case 0x170: + case 0x190: + init = nvc0_screen_create; + break; + default: + debug_printf("%s: unknown chipset nv%02x\n", __func__, dev->chipset); + goto err_screen_create; + } - screen = init(dev); - if (!screen) - goto err_screen_create; + screen = init(dev); + if (!screen) + goto err_screen_create; - if (!screen->base.context_create) - goto err_screen_init; + if (!screen->base.context_create) + goto err_screen_init; - screen->initialized = true; - return &screen->base; + screen->initialized = true; + return &screen->base; err_screen_init: - screen->base.destroy(&screen->base); - return NULL; + screen->base.destroy(&screen->base); + return NULL; err_screen_create: - nouveau_device_del(&dev); + nouveau_device_del(&dev); err_dev_new: - nouveau_drm_del(&drm); - return NULL; + nouveau_drm_del(&drm); + return NULL; } PUBLIC struct pipe_screen * nouveau_drm_screen_create(int fd) { - return u_pipe_screen_lookup_or_create(os_dupfd_cloexec(fd), NULL, NULL, - nouveau_screen_create); + return u_pipe_screen_lookup_or_create(os_dupfd_cloexec(fd), NULL, NULL, + nouveau_screen_create); }