diff options
author | Eric Miao <eric.miao@linaro.org> | 2012-01-12 10:27:36 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2012-01-12 10:27:36 +0800 |
commit | 7ac674d56fec2e9dd144416fd616020aad3170cb (patch) | |
tree | bad3070d766810bd1c10058ae5b54e4de93fae28 /drivers/mxc/amd-gpu/common/gsl_context.c | |
parent | 95df9608d81e4290a7a2657eef99229db2ec9aa6 (diff) | |
parent | 3ffa6554d683f636518844887d5dc259b367e731 (diff) |
Merge branch 'topic/lt-3.2-imx6-ugly' into lt-3.2-imx6
* topic/lt-3.2-imx6-ugly: (129 commits)
imx6q: add clock debugfs support
imx6q-sabrelite: add iomux setup
iomux: add and export mxc_iomux_set_gpr_register()
imx6q: add iomux v3 support
imx6q: add UART2 as debug UART (to be removed)
SAUCE: fix the missing header of <linux/module.h>
SAUCE: fix the removal of mxc_register_device()
SAUCE: mx53_loco: fix gpio_to_irq() being non-constant
SAUCE: fix building errors after rebased to v3.2
LINARO: Add lt-mx5_defconfig
ARM i.MX5: fix system_rev if not set by atag or DT
ENGR00162701 mxc_vout: fix potential deadlock of fb_blank
ENGR00162666 mxc_vout: v4l2 playback blocking issue
ENGR00162665 ipuv3 fb: fix non-interleave format wrong color issue
ENGR00162664 mxc_vout: modify pp bypass condition
ENGR00162663 ipuv3 fb: add vertical flip support
ENGR00162475 ipuv3 fb: fix camera preview failure
ENGR00162360 mxc_vout: fix STREAMOFF and G_CROP issues
ENGR00162358 ipuv3 fb: only check pos when fb is unblank
ENGR00162354 ipuv3 device: correct kthread operation for split task
...
Conflicts:
arch/arm/mach-imx/mach-imx6q.c
arch/arm/plat-mxc/include/mach/mx6q.h
arch/arm/plat-mxc/include/mach/mxc.h
drivers/char/Kconfig
drivers/char/Makefile
drivers/mxc/Kconfig
drivers/mxc/Makefile
drivers/rtc/Kconfig
Diffstat (limited to 'drivers/mxc/amd-gpu/common/gsl_context.c')
-rw-r--r-- | drivers/mxc/amd-gpu/common/gsl_context.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/drivers/mxc/amd-gpu/common/gsl_context.c b/drivers/mxc/amd-gpu/common/gsl_context.c new file mode 100644 index 00000000000..c999247b3af --- /dev/null +++ b/drivers/mxc/amd-gpu/common/gsl_context.c @@ -0,0 +1,74 @@ +/* Copyright (c) 2008-2010, Advanced Micro Devices. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + * + */ + +#include "gsl.h" +#include "gsl_hal.h" +#include "gsl_context.h" + +////////////////////////////////////////////////////////////////////////////// +// functions +////////////////////////////////////////////////////////////////////////////// + +KGSL_API int +kgsl_context_create(gsl_deviceid_t device_id, gsl_context_type_t type, unsigned int *drawctxt_id, gsl_flags_t flags) +{ + gsl_device_t* device = &gsl_driver.device[device_id-1]; + int status; + + GSL_API_MUTEX_LOCK(); + + if (device->ftbl.context_create) + { + status = device->ftbl.context_create(device, type, drawctxt_id, flags); + } + else + { + status = GSL_FAILURE; + } + + GSL_API_MUTEX_UNLOCK(); + + return status; +} + +//---------------------------------------------------------------------------- + +KGSL_API int +kgsl_context_destroy(gsl_deviceid_t device_id, unsigned int drawctxt_id) +{ + gsl_device_t* device = &gsl_driver.device[device_id-1]; + int status; + + GSL_API_MUTEX_LOCK(); + + if (device->ftbl.context_destroy) + { + status = device->ftbl.context_destroy(device, drawctxt_id); + } + else + { + status = GSL_FAILURE; + } + + GSL_API_MUTEX_UNLOCK(); + + return status; +} + +//---------------------------------------------------------------------------- + |