summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2015-11-26 14:24:42 +1000
committerBen Skeggs <[email protected]>2015-12-22 13:24:03 +1000
commit6c1bfff66ca6dd9dac11507889ee17987bed31cb (patch)
treea7d13f0e8e06e63c1a9665f3236a78d2cd299e6d
parent1a9ec8e062f597fd4e4905602adc7c2e507c525f (diff)
nouveau: return nouveau_screen from hw-specific creation functions
Kills off a void cast. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h6
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_screen.c4
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_screen.c4
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_screen.c4
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index 1319c3290cf..3a686bd8f6c 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -79,13 +79,13 @@ nouveau_screen_transfer_flags(unsigned pipe)
return flags;
}
-extern struct pipe_screen *
+extern struct nouveau_screen *
nv30_screen_create(struct nouveau_device *);
-extern struct pipe_screen *
+extern struct nouveau_screen *
nv50_screen_create(struct nouveau_device *);
-extern struct pipe_screen *
+extern struct nouveau_screen *
nvc0_screen_create(struct nouveau_device *);
#endif
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 154c3d370f7..ea29811aa46 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -417,7 +417,7 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
return NULL; \
} while(0)
-struct pipe_screen *
+struct nouveau_screen *
nv30_screen_create(struct nouveau_device *dev)
{
struct nv30_screen *screen = CALLOC_STRUCT(nv30_screen);
@@ -693,5 +693,5 @@ nv30_screen_create(struct nouveau_device *dev)
nouveau_pushbuf_kick(push, push->channel);
nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
- return pscreen;
+ return &screen->base;
}
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 94d47368856..e9e56e707f3 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -752,7 +752,7 @@ int nv50_tls_realloc(struct nv50_screen *screen, unsigned tls_space)
return 1;
}
-struct pipe_screen *
+struct nouveau_screen *
nv50_screen_create(struct nouveau_device *dev)
{
struct nv50_screen *screen;
@@ -966,7 +966,7 @@ nv50_screen_create(struct nouveau_device *dev)
nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
- return pscreen;
+ return &screen->base;
fail:
nv50_screen_destroy(pscreen);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index c3bf3997914..b573ada4ba6 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -622,7 +622,7 @@ nvc0_screen_resize_tls_area(struct nvc0_screen *screen,
return NULL; \
} while(0)
-struct pipe_screen *
+struct nouveau_screen *
nvc0_screen_create(struct nouveau_device *dev)
{
struct nvc0_screen *screen;
@@ -1063,7 +1063,7 @@ nvc0_screen_create(struct nouveau_device *dev)
nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
- return pscreen;
+ return &screen->base;
fail:
nvc0_screen_destroy(pscreen);
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index 3ed644edfd8..e117dfcd009 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -58,7 +58,7 @@ PUBLIC struct pipe_screen *
nouveau_drm_screen_create(int fd)
{
struct nouveau_device *dev = NULL;
- struct pipe_screen *(*init)(struct nouveau_device *);
+ struct nouveau_screen *(*init)(struct nouveau_device *);
struct nouveau_screen *screen;
int ret, dupfd = -1;
@@ -116,7 +116,7 @@ nouveau_drm_screen_create(int fd)
goto err;
}
- screen = (struct nouveau_screen*)init(dev);
+ screen = init(dev);
if (!screen)
goto err;