summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2013-09-16 18:43:50 +0200
committerLucas Stach <l.stach@pengutronix.de>2013-09-17 08:45:20 +0200
commit25c330264aa0357f4ecd836164de882f69d945f3 (patch)
tree88577e4783d03fd91ac6117c1e4e23365d7a38c3
parent1514af4a469ab592e394f3bff88fbb11d155d02e (diff)
downloadlinux-25c330264aa0357f4ecd836164de882f69d945f3.tar.gz
WIP: store pointer to DRM device in adreno_gpu
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_gpu.c4
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_gpu.h1
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_ringbuffer.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 59c5fd6..c0bf75b 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -112,7 +112,6 @@ uint32_t adreno_last_fence(struct adreno_gpu *gpu)
void adreno_recover(struct adreno_gpu *gpu)
{
- struct drm_device *dev = gpu->base.dev;
int ret;
gpu->funcs->pm_suspend(gpu);
@@ -126,7 +125,7 @@ void adreno_recover(struct adreno_gpu *gpu)
gpu->funcs->pm_resume(gpu);
ret = gpu->funcs->hw_init(gpu);
if (ret) {
- dev_err(dev->dev, "gpu hw init failed: %d\n", ret);
+ dev_err(gpu->drm->dev, "gpu hw init failed: %d\n", ret);
/* hmm, oh well? */
}
}
@@ -295,6 +294,7 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
DBG("Found GPU: %s (%u.%u.%u.%u)", gpu->info->name,
rev.core, rev.major, rev.minor, rev.patchid);
+ gpu->drm = drm;
gpu->funcs = funcs;
gpu->gem = gem;
gpu->rev = rev;
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index d4aa796..8d7f26e 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -48,6 +48,7 @@ struct adreno_rbmemptrs {
struct adreno_gpu {
struct msm_gpu base;
struct platform_device *pdev;
+ struct drm_device *drm;
struct adreno_rev rev;
const struct adreno_info *info;
uint32_t revn; /* numeric revision name */
diff --git a/drivers/gpu/drm/msm/adreno/adreno_ringbuffer.c b/drivers/gpu/drm/msm/adreno/adreno_ringbuffer.c
index eea65f6..3d68bc8 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_ringbuffer.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_ringbuffer.c
@@ -16,7 +16,6 @@
*/
#include "adreno/adreno_gpu.h"
-#include "msm_gpu.h"
struct adreno_ringbuffer *adreno_ringbuffer_new(struct adreno_gpu *gpu, int size)
{