diff options
author | Zhou, Jie <b30303@freescale.com> | 2011-04-01 01:01:27 +0800 |
---|---|---|
committer | Richard Zhao <richard.zhao@freescale.com> | 2011-04-20 10:39:16 +0800 |
commit | 6e9d30e3afd9b8166f3d852aebe848921388e8f8 (patch) | |
tree | cf1e04eaaba3d58e2b74c4c0ca70d3a9a15348ad /drivers/mxc/amd-gpu | |
parent | 4e9c53d2f84a4f5bfa632d51c2e89158f956610c (diff) |
ENGR00141400 GPU: Improve GPU clock gating
seperate interrupt handling and clk_enable for Z160 and Z430
Signed-off-by: Zhou, Jie <b30303@freescale.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Diffstat (limited to 'drivers/mxc/amd-gpu')
-rw-r--r-- | drivers/mxc/amd-gpu/common/gsl_intrmgr.c | 18 | ||||
-rw-r--r-- | drivers/mxc/amd-gpu/include/api/gsl_klibapi.h | 2 | ||||
-rw-r--r-- | drivers/mxc/amd-gpu/platform/hal/linux/gsl_kmod.c | 4 | ||||
-rw-r--r-- | drivers/mxc/amd-gpu/platform/hal/linux/misc.c | 4 |
4 files changed, 9 insertions, 19 deletions
diff --git a/drivers/mxc/amd-gpu/common/gsl_intrmgr.c b/drivers/mxc/amd-gpu/common/gsl_intrmgr.c index ae2eb4a0b864..4ea3bab594d7 100644 --- a/drivers/mxc/amd-gpu/common/gsl_intrmgr.c +++ b/drivers/mxc/amd-gpu/common/gsl_intrmgr.c @@ -84,21 +84,11 @@ kgsl_intr_decode(gsl_device_t *device, gsl_intrblock_t block_id) //---------------------------------------------------------------------------- KGSL_API void -kgsl_intr_isr() +kgsl_intr_isr(gsl_device_t *device) { - gsl_deviceid_t device_id; - gsl_device_t *device; - - // loop through the devices, and call device specific isr - for (device_id = (gsl_deviceid_t)(GSL_DEVICE_ANY + 1); device_id <= GSL_DEVICE_MAX; device_id++) - { - device = &gsl_driver.device[device_id-1]; // device_id is 1 based - - if (device->intr.flags & GSL_FLAGS_INITIALIZED) - { - kgsl_device_active(device); - device->ftbl.intr_isr(device); - } + if (device->intr.flags & GSL_FLAGS_INITIALIZED) { + kgsl_device_active(device); + device->ftbl.intr_isr(device); } } diff --git a/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h b/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h index 3c08545c2b68..c8831840ad12 100644 --- a/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h +++ b/drivers/mxc/amd-gpu/include/api/gsl_klibapi.h @@ -120,7 +120,7 @@ KGSL_API int kgsl_sharedmem_fromhostpointer(gsl_deviceid_t device //////////////////////////////////////////////////////////////////////////// // interrupt API //////////////////////////////////////////////////////////////////////////// -KGSL_API void kgsl_intr_isr(void); +KGSL_API void kgsl_intr_isr(gsl_device_t *device); //////////////////////////////////////////////////////////////////////////// diff --git a/drivers/mxc/amd-gpu/platform/hal/linux/gsl_kmod.c b/drivers/mxc/amd-gpu/platform/hal/linux/gsl_kmod.c index 7d10874ec798..94667d04668b 100644 --- a/drivers/mxc/amd-gpu/platform/hal/linux/gsl_kmod.c +++ b/drivers/mxc/amd-gpu/platform/hal/linux/gsl_kmod.c @@ -751,13 +751,13 @@ static struct class *gsl_kmod_class; static irqreturn_t z160_irq_handler(int irq, void *dev_id) { - kgsl_intr_isr(); + kgsl_intr_isr(&gsl_driver.device[GSL_DEVICE_G12-1]); return IRQ_HANDLED; } static irqreturn_t z430_irq_handler(int irq, void *dev_id) { - kgsl_intr_isr(); + kgsl_intr_isr(&gsl_driver.device[GSL_DEVICE_YAMATO-1]); return IRQ_HANDLED; } diff --git a/drivers/mxc/amd-gpu/platform/hal/linux/misc.c b/drivers/mxc/amd-gpu/platform/hal/linux/misc.c index f91ded3d563b..29086273255b 100644 --- a/drivers/mxc/amd-gpu/platform/hal/linux/misc.c +++ b/drivers/mxc/amd-gpu/platform/hal/linux/misc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -85,7 +85,7 @@ static int _kgsl_device_active(gsl_device_t *dev, int all) } int kgsl_device_active(gsl_device_t *dev) { - return _kgsl_device_active(dev, 1); + return _kgsl_device_active(dev, 0); } static void kgsl_device_inactive(unsigned long data) |