summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-12-03 13:06:53 -0500
committerJerome Glisse <[email protected]>2010-12-03 13:06:53 -0500
commitedda44e0dc72302afa04a767772d5d97ab9d9aa6 (patch)
treef2116cc5605d5ea4f46403308ced23ea0708050e /src/gallium
parent119f00659c03c48cfab0f2770dd6b6fb89af31e4 (diff)
r600g: more indentation fix + warning silencing + dead code removal
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600.h2
-rw-r--r--src/gallium/drivers/r600/r600_texture.c2
-rw-r--r--src/gallium/winsys/r600/drm/r600_drm.c17
-rw-r--r--src/gallium/winsys/r600/drm/r600_priv.h5
-rw-r--r--src/gallium/winsys/r600/drm/radeon_pciid.c79
5 files changed, 14 insertions, 91 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index 2ab60f3086a..aa456d493f7 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -294,4 +294,6 @@ void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, stru
void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
+struct radeon *radeon_decref(struct radeon *radeon);
+
#endif
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 1a2fd4e830b..d4d9b07c0e8 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -170,8 +170,6 @@ static unsigned r600_texture_get_stride(struct pipe_screen *screen,
unsigned level)
{
struct pipe_resource *ptex = &rtex->resource.base.b;
- struct radeon *radeon = (struct radeon *)screen->winsys;
- enum chip_class chipc = r600_get_family_class(radeon);
unsigned width, stride, tile_width;
if (rtex->pitch_override)
diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c
index e83cc44290a..8c847122f84 100644
--- a/src/gallium/winsys/r600/drm/r600_drm.c
+++ b/src/gallium/winsys/r600/drm/r600_drm.c
@@ -40,6 +40,9 @@
#ifndef RADEON_INFO_TILING_CONFIG
#define RADEON_INFO_TILING_CONFIG 0x6
#endif
+
+static struct radeon *radeon_new(int fd, unsigned device);
+
static int radeon_get_device(struct radeon *radeon)
{
struct drm_radeon_info info;
@@ -108,7 +111,7 @@ static int radeon_drm_get_tiling(struct radeon *radeon)
return 0;
}
-struct radeon *radeon_new(int fd, unsigned device)
+static struct radeon *radeon_new(int fd, unsigned device)
{
struct radeon *radeon;
int r;
@@ -249,14 +252,14 @@ struct radeon *radeon_decref(struct radeon *radeon)
return NULL;
}
- if (radeon->cman)
- radeon->cman->destroy(radeon->cman);
+ if (radeon->cman)
+ radeon->cman->destroy(radeon->cman);
- if (radeon->kman)
- radeon->kman->destroy(radeon->kman);
+ if (radeon->kman)
+ radeon->kman->destroy(radeon->kman);
- if (radeon->fd >= 0)
- drmClose(radeon->fd);
+ if (radeon->fd >= 0)
+ drmClose(radeon->fd);
free(radeon);
return NULL;
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index 9fd77b71c77..193af984f8e 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -78,7 +78,7 @@ struct r600_bo {
struct pb_buffer *pb;
unsigned size;
unsigned tiling_flags;
- unsigned kernel_pitch;
+ unsigned kernel_pitch;
unsigned domains;
};
@@ -86,9 +86,6 @@ struct r600_bo {
/* radeon_pciid.c */
unsigned radeon_family_from_device(unsigned device);
-/* r600_drm.c */
-struct radeon *radeon_decref(struct radeon *radeon);
-
/* radeon_bo.c */
struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
unsigned size, unsigned alignment);
diff --git a/src/gallium/winsys/r600/drm/radeon_pciid.c b/src/gallium/winsys/r600/drm/radeon_pciid.c
index 18bddc1a7ab..92560a488ae 100644
--- a/src/gallium/winsys/r600/drm/radeon_pciid.c
+++ b/src/gallium/winsys/r600/drm/radeon_pciid.c
@@ -24,7 +24,7 @@
* Jerome Glisse
*/
#include <stdlib.h>
-#include "r600.h"
+#include "r600_priv.h"
struct pci_id {
unsigned vendor;
@@ -460,80 +460,3 @@ unsigned radeon_family_from_device(unsigned device)
}
return CHIP_UNKNOWN;
}
-
-int radeon_is_family_compatible(unsigned family1, unsigned family2)
-{
- switch (family1) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- switch (family2) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- return 1;
- default:
- return 0;
- }
- break;
- case CHIP_R100:
- case CHIP_RV100:
- case CHIP_RS100:
- case CHIP_RV200:
- case CHIP_RS200:
- case CHIP_R200:
- case CHIP_RV250:
- case CHIP_RS300:
- case CHIP_RV280:
- case CHIP_R300:
- case CHIP_R350:
- case CHIP_RV350:
- case CHIP_RV380:
- case CHIP_R420:
- case CHIP_R423:
- case CHIP_RV410:
- case CHIP_RS400:
- case CHIP_RS480:
- case CHIP_RS600:
- case CHIP_RS690:
- case CHIP_RS740:
- case CHIP_RV515:
- case CHIP_R520:
- case CHIP_RV530:
- case CHIP_RV560:
- case CHIP_RV570:
- case CHIP_R580:
- default:
- return 0;
- }
-}