From bc30f49241c5a7d771c8f1644e751dc63120eddc Mon Sep 17 00:00:00 2001 From: Matt Sealey Date: Tue, 30 Aug 2011 13:33:11 -0500 Subject: [PATCH] gpu: don't clear the Z160 global on context destroy, do it on device close instead (this is part of a Freescale patch ENGR00142363 for WindowsCE but makes a hell of a lot o srense for Linux too) --- drivers/mxc/amd-gpu/common/gsl_g12.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mxc/amd-gpu/common/gsl_g12.c b/drivers/mxc/amd-gpu/common/gsl_g12.c index cac933d586e..d979cd54926 100644 --- a/drivers/mxc/amd-gpu/common/gsl_g12.c +++ b/drivers/mxc/amd-gpu/common/gsl_g12.c @@ -359,6 +359,8 @@ kgsl_g12_close(gsl_device_t *device) drawctx_id = 0; DEBUG_ASSERT(g_z1xx.numcontext == 0); + + memset(&g_z1xx, 0, sizeof(gsl_z1xx_t)); } return (GSL_SUCCESS); @@ -890,7 +892,6 @@ kgsl_g12_context_destroy(gsl_device_t* device, unsigned int drawctxt_id) #ifdef _Z180 kgsl_sharedmem_free0(&g_z1xx.e2, current->tgid); #endif - memset(&g_z1xx,0,sizeof(gsl_z1xx_t)); } return (GSL_SUCCESS); }