summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-04-20 14:42:31 -0700
committerEric Anholt <eric@anholt.net>2009-04-21 15:25:58 -0700
commit1fc93ee184ceefaea9528bb46ae82884c44d9b36 (patch)
tree82d7fac54921106fd277a7524e1b3e9bca945718 /src
parentb2d7928f195f6439ecd140e6280b958b8a1f534b (diff)
Staticize a bunch of functions and variables in the driver.
This cleans up findstatic.pl output for the i830+ code, which resulted in removing some code. The only odd part of this commit is the if (0) i830_sdvo_dump() in i830_sdvo.c -- it tells the compiler that the code is used, without using it since we want the code around while debugging. It's also in a likely place to ask for the dump, so I think it's OK.
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c26
-rw-r--r--src/i2c_vid.h4
-rw-r--r--src/i830.h7
-rw-r--r--src/i830_display.c6
-rw-r--r--src/i830_display.h2
-rw-r--r--src/i830_dri.c2
-rw-r--r--src/i830_driver.c6
-rw-r--r--src/i830_dvo.c4
-rw-r--r--src/i830_hwmc.c2
-rw-r--r--src/i830_hwmc.h1
-rw-r--r--src/i830_memory.c4
-rw-r--r--src/i830_sdvo.c10
-rw-r--r--src/i830_sdvo.h6
-rw-r--r--src/i830_xaa.c4
-rw-r--r--src/i965_render.c2
15 files changed, 37 insertions, 49 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7b97a646..b081a7b3 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -738,19 +738,19 @@ static int subpixel_conv_table[7] = { 0, SubPixelUnknown,
SubPixelVerticalBGR,
SubPixelNone };
-const char *output_names[] = { "None",
- "VGA",
- "DVI",
- "DVI",
- "DVI",
- "Composite",
- "TV",
- "LVDS",
- "CTV",
- "DIN",
- "DP",
- "HDMI",
- "HDMI",
+static const char *output_names[] = { "None",
+ "VGA",
+ "DVI",
+ "DVI",
+ "DVI",
+ "Composite",
+ "TV",
+ "LVDS",
+ "CTV",
+ "DIN",
+ "DP",
+ "HDMI",
+ "HDMI",
};
diff --git a/src/i2c_vid.h b/src/i2c_vid.h
index 6c4e95df..e5d5ec12 100644
--- a/src/i2c_vid.h
+++ b/src/i2c_vid.h
@@ -129,8 +129,4 @@ typedef struct _I830I2CVidOutputRec {
void (*dump_regs)(I2CDevPtr d);
} I830I2CVidOutputRec, *I830I2CVidOutputPtr;
-/* XXX change this name to avoid driver-specific prefix */
-DisplayModePtr
-i830_dvo_get_current_mode (xf86OutputPtr output);
-
#endif
diff --git a/src/i830.h b/src/i830.h
index e5c0ead2..f3bf2507 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -783,7 +783,6 @@ i830_pipe_a_require_deactivate (ScrnInfoPtr scrn);
extern Bool I830Allocate3DMemory(ScrnInfoPtr pScrn, const int flags);
extern void I830SetupMemoryTiling(ScrnInfoPtr pScrn);
extern Bool I830DRIScreenInit(ScreenPtr pScreen);
-extern Bool I830CheckDRIAvailable(ScrnInfoPtr pScrn);
extern Bool I830DRIDoMappings(ScreenPtr pScreen);
extern Bool I830DRIResume(ScreenPtr pScreen);
extern void I830DRICloseScreen(ScreenPtr pScreen);
@@ -834,7 +833,6 @@ void i830_free_3d_memory(ScrnInfoPtr pScrn);
void i830_free_memory(ScrnInfoPtr pScrn, i830_memory *mem);
extern long I830CheckAvailableMemory(ScrnInfoPtr pScrn);
Bool i830_allocate_2d_memory(ScrnInfoPtr pScrn);
-Bool i830_allocate_texture_memory(ScrnInfoPtr pScrn);
Bool i830_allocate_pwrctx(ScrnInfoPtr pScrn);
Bool i830_allocate_3d_memory(ScrnInfoPtr pScrn);
void i830_init_bufmgr(ScrnInfoPtr pScrn);
@@ -842,7 +840,6 @@ void i830_init_bufmgr(ScrnInfoPtr pScrn);
Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
i830_memory **buffer, unsigned long size, int flags);
#endif
-extern void i830_update_front_offset(ScrnInfoPtr pScrn);
extern uint32_t i830_create_new_fb(ScrnInfoPtr pScrn, int width, int height,
int *pitch);
@@ -856,9 +853,6 @@ i830_pad_drawable_width(int width, int cpp);
extern Bool I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg,
char *name);
-/* return a mask of output indices matching outputs against type_mask */
-int i830_output_clones (ScrnInfoPtr pScrn, int type_mask);
-
/* i830_display.c */
Bool
i830PipeHasType (xf86CrtcPtr crtc, int type);
@@ -883,7 +877,6 @@ Bool i830_bind_all_memory(ScrnInfoPtr pScrn);
Bool i830_unbind_all_memory(ScrnInfoPtr pScrn);
unsigned long i830_get_fence_size(I830Ptr pI830, unsigned long size);
unsigned long i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format);
-unsigned long i830_get_fence_alignment(I830Ptr pI830, unsigned long size);
Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
diff --git a/src/i830_display.c b/src/i830_display.c
index 2a16cc37..847dc22d 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -245,6 +245,8 @@ intel_find_pll_i8xx_and_i9xx(const intel_limit_t *, xf86CrtcPtr,
static Bool
intel_find_pll_g4x(const intel_limit_t *, xf86CrtcPtr,
int, int, intel_clock_t *);
+static void
+i830_crtc_load_lut(xf86CrtcPtr crtc);
static const intel_limit_t intel_limits[] = {
{ /* INTEL_LIMIT_I8XX_DVO_DAC */
@@ -1124,7 +1126,7 @@ i830_disable_vga_plane (xf86CrtcPtr crtc)
}
-void
+static void
i830_crtc_enable(xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;
@@ -1926,7 +1928,7 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
/** Loads the palette/gamma unit for the CRTC with the prepared values */
-void
+static void
i830_crtc_load_lut(xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;
diff --git a/src/i830_display.h b/src/i830_display.h
index 0ba196d3..24a2717a 100644
--- a/src/i830_display.h
+++ b/src/i830_display.h
@@ -33,12 +33,10 @@ void i830WaitForVblank(ScrnInfoPtr pScrn);
void i830DescribeOutputConfiguration(ScrnInfoPtr pScrn);
void i830_set_new_crtc_bo(ScrnInfoPtr pScrn);
void i830_crtc_disable(xf86CrtcPtr crtc, Bool disable_pipe);
-void i830_crtc_enable(xf86CrtcPtr crtc);
xf86CrtcPtr i830GetLoadDetectPipe(xf86OutputPtr output, DisplayModePtr mode, int *dpms_mode);
void i830ReleaseLoadDetectPipe(xf86OutputPtr output, int dpms_mode);
void i830_crtc_init(ScrnInfoPtr pScrn, int pipe);
-void i830_crtc_load_lut(xf86CrtcPtr crtc);
DisplayModePtr i830_crtc_mode_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc);
void i830_output_prepare (xf86OutputPtr output);
void i830_output_commit (xf86OutputPtr output);
diff --git a/src/i830_dri.c b/src/i830_dri.c
index e60af098..cbb0db80 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -446,7 +446,7 @@ I830InitVisualConfigs(ScreenPtr pScreen)
return TRUE;
}
-Bool
+static Bool
I830CheckDRIAvailable(ScrnInfoPtr pScrn)
{
/* Hardware 3D rendering only implemented for 16bpp and 32 bpp */
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 905fbeab..16a8a57b 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -217,7 +217,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
#ifdef I830_USE_EXA
-const char *I830exaSymbols[] = {
+static const char *I830exaSymbols[] = {
"exaGetVersion",
"exaDriverInit",
"exaDriverFini",
@@ -801,7 +801,7 @@ I830LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
}
}
-void
+static void
i830_update_front_offset(ScrnInfoPtr pScrn)
{
ScreenPtr pScreen = pScrn->pScreen;
@@ -869,7 +869,7 @@ i830CreateScreenResources(ScreenPtr pScreen)
return TRUE;
}
-int
+static int
i830_output_clones (ScrnInfoPtr pScrn, int type_mask)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn);
diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index 832c7625..a0e80743 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -61,7 +61,7 @@ static const char *ch7017_symbols[] = {
};
/* driver list */
-struct _I830DVODriver i830_dvo_drivers[] =
+static struct _I830DVODriver i830_dvo_drivers[] =
{
{
.type = I830_OUTPUT_DVO_TMDS,
@@ -370,7 +370,7 @@ static const xf86OutputFuncsRec i830_dvo_output_funcs = {
* Other chips with DVO LVDS will need to extend this to deal with the LVDS
* chip being on DVOB/C and having multiple pipes.
*/
-DisplayModePtr
+static DisplayModePtr
i830_dvo_get_current_mode (xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c
index e33a15de..ecefb5b5 100644
--- a/src/i830_hwmc.c
+++ b/src/i830_hwmc.c
@@ -35,7 +35,7 @@
struct intel_xvmc_driver *xvmc_driver;
/* set global current driver for xvmc */
-Bool intel_xvmc_set_driver(struct intel_xvmc_driver *d)
+static Bool intel_xvmc_set_driver(struct intel_xvmc_driver *d)
{
if (xvmc_driver) {
ErrorF("XvMC driver already set!\n");
diff --git a/src/i830_hwmc.h b/src/i830_hwmc.h
index 72208d53..41f64413 100644
--- a/src/i830_hwmc.h
+++ b/src/i830_hwmc.h
@@ -101,7 +101,6 @@ extern struct intel_xvmc_driver *xvmc_driver;
extern struct intel_xvmc_driver i915_xvmc_driver;
extern struct intel_xvmc_driver i965_xvmc_driver;
-extern Bool intel_xvmc_set_driver(struct intel_xvmc_driver *);
extern Bool intel_xvmc_probe(ScrnInfoPtr);
extern Bool intel_xvmc_driver_init(ScreenPtr, XF86VideoAdaptorPtr);
extern Bool intel_xvmc_screen_init(ScreenPtr);
diff --git a/src/i830_memory.c b/src/i830_memory.c
index d3138d94..470734e0 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -185,7 +185,7 @@ i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format)
* On some chips, pitch width has to be a power of two tile width, so
* calculate that here.
*/
-unsigned long
+static unsigned long
i830_get_fence_alignment(I830Ptr pI830, unsigned long size)
{
if (IS_I965G(pI830))
@@ -1608,7 +1608,7 @@ i830_allocate_depthbuffer(ScrnInfoPtr pScrn)
return TRUE;
}
-Bool
+static Bool
i830_allocate_texture_memory(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 29ccd4e5..41e8e59f 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -126,6 +126,9 @@ struct i830_sdvo_priv {
static Atom broadcast_atom;
+static void
+i830_sdvo_dump(ScrnInfoPtr pScrn);
+
/**
* Writes the SDVOB or SDVOC with the given value, but always writes both
* SDVOB and SDVOC to work around apparent hardware issues (according to
@@ -380,7 +383,7 @@ i830_sdvo_read_response(xf86OutputPtr output, void *response, int response_len)
return status;
}
-int
+static int
i830_sdvo_get_pixel_multiplier(DisplayModePtr pMode)
{
if (pMode->Clock >= 100000)
@@ -1178,6 +1181,9 @@ i830_sdvo_mode_set(xf86OutputPtr output, DisplayModePtr mode,
}
i830_sdvo_write_sdvox(output, sdvox);
+
+ if (0)
+ i830_sdvo_dump(pScrn);
}
static void
@@ -1492,7 +1498,7 @@ i830_sdvo_dump_device(xf86OutputPtr output)
i830_sdvo_dump_hdmi_buf(output);
}
-void
+static void
i830_sdvo_dump(ScrnInfoPtr pScrn)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
diff --git a/src/i830_sdvo.h b/src/i830_sdvo.h
index 798a88df..607dc5c1 100644
--- a/src/i830_sdvo.h
+++ b/src/i830_sdvo.h
@@ -27,9 +27,3 @@
Bool
i830_sdvo_init(ScrnInfoPtr pScrn, int output_device);
-
-int
-i830_sdvo_get_pixel_multiplier(DisplayModePtr pMode);
-
-void
-i830_sdvo_dump(ScrnInfoPtr pScrn);
diff --git a/src/i830_xaa.c b/src/i830_xaa.c
index 1f82840d..ede7cc26 100644
--- a/src/i830_xaa.c
+++ b/src/i830_xaa.c
@@ -92,7 +92,7 @@ static void I830SubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn,
static void I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno);
#endif
-void
+static void
i830_xaa_composite(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -712,7 +712,7 @@ I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
* Special case acceleration for Render acceleration of rotation operations
* by xf86Rotate.c
*/
-void
+static void
i830_xaa_composite(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
diff --git a/src/i965_render.c b/src/i965_render.c
index c123a369..5160d95f 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -431,7 +431,7 @@ typedef enum {
#define KERNEL(kernel_enum, kernel, masked) \
[kernel_enum] = {&kernel, sizeof(kernel), masked}
-struct wm_kernel_info {
+static struct wm_kernel_info {
void *data;
unsigned int size;
Bool has_mask;