summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-31 09:02:27 -0700
committerBrian Paul <brianp@vmware.com>2009-12-31 09:02:27 -0700
commit25024d948298a9f3f3210a0b91486f79a3917b0f (patch)
tree5647623b9781193b7ed55c8d9233404938aeb853 /src/gallium/state_trackers/xorg
parentd14beea534dcb2b3ae2ae1f7ee0ba5dcdef3dba3 (diff)
parent195e7657e2f15f7ad8b22042b86bcf33c5bba76b (diff)
Merge branch 'mesa_7_7_branch'
Conflicts: configs/darwin src/gallium/auxiliary/util/u_clear.h src/gallium/state_trackers/xorg/xorg_exa_tgsi.c src/mesa/drivers/dri/i965/brw_draw_upload.c
Diffstat (limited to 'src/gallium/state_trackers/xorg')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c7
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c26
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c4
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa_tgsi.c33
-rw-r--r--src/gallium/state_trackers/xorg/xorg_renderer.c1
5 files changed, 53 insertions, 18 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index c776faa53f..e390ce29ae 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -71,6 +71,8 @@ struct crtc_private
static void
crtc_dpms(xf86CrtcPtr crtc, int mode)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
+
switch (mode) {
case DPMSModeOn:
case DPMSModeStandby:
@@ -147,18 +149,23 @@ crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, CARD16 * blue,
static void *
crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
+
return NULL;
}
static PixmapPtr
crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
+
return NULL;
}
static void
crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
{
+ /* ScrnInfoPtr pScrn = crtc->scrn; */
}
/*
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 8a24aa10a3..4d169a1d14 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -220,6 +220,12 @@ static Bool
drv_init_resource_management(ScrnInfoPtr pScrn)
{
modesettingPtr ms = modesettingPTR(pScrn);
+ /*
+ ScreenPtr pScreen = pScrn->pScreen;
+ PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
+ Bool fbAccessDisabled;
+ CARD8 *fbstart;
+ */
if (ms->screen || ms->kms)
return TRUE;
@@ -249,9 +255,19 @@ static Bool
drv_close_resource_management(ScrnInfoPtr pScrn)
{
modesettingPtr ms = modesettingPTR(pScrn);
+ int i;
- if (ms->screen)
+ if (ms->screen) {
+ assert(ms->ctx == NULL);
+
+ for (i = 0; i < XORG_NR_FENCES; i++) {
+ if (ms->fence[i]) {
+ ms->screen->fence_finish(ms->screen, ms->fence[i], 0);
+ ms->screen->fence_reference(ms->screen, &ms->fence[i], NULL);
+ }
+ }
ms->screen->destroy(ms->screen);
+ }
ms->screen = NULL;
if (ms->api && ms->api->destroy)
@@ -461,7 +477,7 @@ static void drv_block_handler(int i, pointer blockData, pointer pTimeout,
* quite small. Let us get a fair way ahead of hardware before
* throttling.
*/
- for (j = 0; j < XORG_NR_FENCES; j++)
+ for (j = 0; j < XORG_NR_FENCES - 1; j++)
ms->screen->fence_reference(ms->screen,
&ms->fence[j],
ms->fence[j+1]);
@@ -915,6 +931,12 @@ drv_destroy_front_buffer_kms(ScrnInfoPtr pScrn)
ScreenPtr pScreen = pScrn->pScreen;
PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
+ /* XXX Do something with the rootPixmap.
+ * This currently works fine but if we are getting crashes in
+ * the fb functions after VT switches maybe look more into it.
+ */
+ (void)rootPixmap;
+
if (!ms->root_bo)
return TRUE;
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index d5c005ebad..aa68570b9c 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -516,6 +516,7 @@ ExaCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
#endif
debug_assert(priv == exa->copy.dst);
+ (void) priv;
if (exa->copy.use_surface_copy) {
/* XXX: consider exposing >1 box in surface_copy interface.
@@ -1019,6 +1020,9 @@ xorg_exa_close(ScrnInfoPtr pScrn)
if (exa->pipe)
exa->pipe->destroy(exa->pipe);
+ exa->pipe = NULL;
+ /* Since this was shared be proper with the pointer */
+ ms->ctx = NULL;
exaDriverFini(pScrn->pScreen);
xfree(exa);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
index 89b794a09a..bed17caab7 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
@@ -47,22 +47,22 @@ static void
print_fs_traits(int fs_traits)
{
const char *strings[] = {
- "FS_COMPOSITE", /* = 1 << 0 */
- "FS_MASK", /* = 1 << 1 */
- "FS_SOLID_FILL", /* = 1 << 2 */
- "FS_LINGRAD_FILL", /* = 1 << 3 */
- "FS_RADGRAD_FILL", /* = 1 << 4 */
- "FS_CA_FULL", /* = 1 << 5 - src.rgba * mask.rgba */
- "FS_CA_SRCALPHA", /* = 1 << 6 - src.aaaa * mask.rgba */
- "FS_YUV", /* = 1 << 7 */
- "FS_SRC_REPEAT_NONE", /* = 1 << 8 */
- "FS_MASK_REPEAT_NONE",/* = 1 << 9 */
- "FS_SRC_SWIZZLE_RGB", /* = 1 << 10 */
- "FS_MASK_SWIZZLE_RGB",/* = 1 << 11 */
- "FS_SRC_SET_ALPHA", /* = 1 << 12 */
- "FS_MASK_SET_ALPHA", /* = 1 << 13 */
- "FS_SRC_LUMINANCE", /* = 1 << 14 */
- "FS_MASK_LUMINANCE", /* = 1 << 15 */
+ "FS_COMPOSITE", /* = 1 << 0, */
+ "FS_MASK", /* = 1 << 1, */
+ "FS_SOLID_FILL", /* = 1 << 2, */
+ "FS_LINGRAD_FILL", /* = 1 << 3, */
+ "FS_RADGRAD_FILL", /* = 1 << 4, */
+ "FS_CA_FULL", /* = 1 << 5, */ /* src.rgba * mask.rgba */
+ "FS_CA_SRCALPHA", /* = 1 << 6, */ /* src.aaaa * mask.rgba */
+ "FS_YUV", /* = 1 << 7, */
+ "FS_SRC_REPEAT_NONE", /* = 1 << 8, */
+ "FS_MASK_REPEAT_NONE",/* = 1 << 9, */
+ "FS_SRC_SWIZZLE_RGB", /* = 1 << 10, */
+ "FS_MASK_SWIZZLE_RGB",/* = 1 << 11, */
+ "FS_SRC_SET_ALPHA", /* = 1 << 12, */
+ "FS_MASK_SET_ALPHA", /* = 1 << 13, */
+ "FS_SRC_LUMINANCE", /* = 1 << 14, */
+ "FS_MASK_LUMINANCE", /* = 1 << 15, */
};
int i, k;
debug_printf("%s: ", __func__);
@@ -492,6 +492,7 @@ create_fs(struct pipe_context *pipe,
/* it has to be either a fill, a composite op or a yuv conversion */
debug_assert((is_fill ^ is_composite) ^ is_yuv);
+ (void) is_yuv;
out = ureg_DECL_output(ureg,
TGSI_SEMANTIC_COLOR,
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c
index ba15f8a784..d80f341e6c 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -438,6 +438,7 @@ void renderer_copy_prepare(struct xorg_renderer *r,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET,
0));
+ (void) screen;
/* set misc state we care about */