r600g: more indentation fix + warning silencing + dead code removal
authorJerome Glisse <jglisse@redhat.com>
Fri, 3 Dec 2010 18:06:53 +0000 (13:06 -0500)
committerJerome Glisse <jglisse@redhat.com>
Fri, 3 Dec 2010 18:06:53 +0000 (13:06 -0500)
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/r600.h
src/gallium/drivers/r600/r600_texture.c
src/gallium/winsys/r600/drm/r600_drm.c
src/gallium/winsys/r600/drm/r600_priv.h
src/gallium/winsys/r600/drm/radeon_pciid.c

index 2ab60f3086a99bca57bf6bf6993efac6ff17a88d..aa456d493f7b098bd2f77e4da29d002e5b46347c 100644 (file)
@@ -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
index 1a2fd4e830bfcf0bddacd2869aeff425643b03ad..d4d9b07c0e8a4aba003416a351aa411550f9dfdd 100644 (file)
@@ -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)
index e83cc44290aed59d0a9af74403edd0529780bdfa..8c847122f84f90b77e045ebdcfc9b3bec6f9b411 100644 (file)
@@ -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;
index 9fd77b71c775c562097d47f71fc5a25d6fc9009e..193af984f8ea2b372aedd9067b7c0555badbfac1 100644 (file)
@@ -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);
index 18bddc1a7ab5652d8f4004fa4dd9479f7c58a43b..92560a488ae5637981021e90f52581f95191a2ce 100644 (file)
@@ -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;
-       }
-}