summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2013-09-16 12:36:26 +0200
committerLucas Stach <l.stach@pengutronix.de>2013-09-17 08:45:20 +0200
commit5c5c7a90f086aac3f514f80c34e44f80fc32047f (patch)
treea960faf58f7ff198f9038fe83b74f33220f6f3ca
parent25c330264aa0357f4ecd836164de882f69d945f3 (diff)
downloadlinux-5c5c7a90f086aac3f514f80c34e44f80fc32047f.tar.gz
WIP: indirect gpu retire through GEM callback
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/gpu/drm/msm/adreno/a3xx_gpu.c2
-rw-r--r--drivers/gpu/drm/msm/msm_drv.c10
-rw-r--r--include/drm/drm_adreno.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
index faf1e9a..2483a6b 100644
--- a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
@@ -294,7 +294,7 @@ static irqreturn_t a3xx_irq(struct adreno_gpu *gpu)
gpu_write(gpu, REG_A3XX_RBBM_INT_CLEAR_CMD, status);
- msm_gpu_retire(&gpu->base);
+ gpu->gem->gem_retire(gpu->gem->priv);
return IRQ_HANDLED;
}
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 0c6adf4..9f3c45c 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -289,13 +289,21 @@ gem_vaddr(void *gem_priv, struct drm_gem_object *obj)
{
return msm_gem_vaddr(obj);
}
+
+static void
+gem_retire(void *gem_priv)
+{
+ struct msm_gpu *gpu = gem_priv;
+ return msm_gpu_retire(gpu);
+}
static struct adreno_gem msm_gem_funcs = {
.gem_new = gem_new,
.gem_get_iova = gem_get_iova,
.gem_get_iova_locked = gem_get_iova_locked,
.gem_put_iova = gem_put_iova,
.gem_vaddr = gem_vaddr,
- .gem_vaddr_locked = gem_vaddr_locked
+ .gem_vaddr_locked = gem_vaddr_locked,
+ .gem_retire = gem_retire
};
static void load_gpu(struct drm_device *dev)
diff --git a/include/drm/drm_adreno.h b/include/drm/drm_adreno.h
index aa58e5e..cae710c 100644
--- a/include/drm/drm_adreno.h
+++ b/include/drm/drm_adreno.h
@@ -68,6 +68,7 @@ struct adreno_gem {
void (*gem_put_iova)(void *gem_priv, struct drm_gem_object *obj);
void *(*gem_vaddr_locked)(void *gem_priv, struct drm_gem_object *obj);
void *(*gem_vaddr)(void *gem_priv, struct drm_gem_object *obj);
+ void (*gem_retire)(void *gem_priv);
};
const char *adreno_get_name(struct adreno_gpu *gpu);