mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 12:14:10 +08:00
winsys/nouveau: Reformat to stop relying on tabs
Also remove .editorconfig as we don't need it anymore. Signed-off-by: Mary Guillemard <mary@mary.zone> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31667>
This commit is contained in:
parent
f9e72b7fcb
commit
4bc2d221c9
@ -1,2 +0,0 @@
|
||||
[*.{c,h}]
|
||||
indent_style = tab
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user