diff options
author | Rob Clark <robdclark@gmail.com> | 2014-09-05 13:30:27 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-09-10 11:19:08 -0400 |
commit | e2550b7a7d8f2030cfea43343eb3fccc3a8e8167 (patch) | |
tree | db048e044c8c6fe5e0984d2e7067adea5e31e268 /drivers/gpu/drm/msm/msm_drv.c | |
parent | bfd28b136298f37ef2e10494d3a0bfb4dcbaa7b9 (diff) | |
download | op-kernel-dev-e2550b7a7d8f2030cfea43343eb3fccc3a8e8167.zip op-kernel-dev-e2550b7a7d8f2030cfea43343eb3fccc3a8e8167.tar.gz |
drm/msm/adreno: move decision about what gpu to to load
Move this into into adreno_device, and decide based on gpu revision
rather than just assuming a3xx.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 7008900..307d52d 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -315,39 +315,12 @@ static void load_gpu(struct drm_device *dev) { static DEFINE_MUTEX(init_lock); struct msm_drm_private *priv = dev->dev_private; - struct msm_gpu *gpu; mutex_lock(&init_lock); - if (priv->gpu) - goto out; - - gpu = a3xx_gpu_init(dev); - if (IS_ERR(gpu)) { - dev_warn(dev->dev, "failed to load a3xx gpu\n"); - gpu = NULL; - /* not fatal */ - } - - if (gpu) { - int ret; - mutex_lock(&dev->struct_mutex); - gpu->funcs->pm_resume(gpu); - mutex_unlock(&dev->struct_mutex); - ret = gpu->funcs->hw_init(gpu); - if (ret) { - dev_err(dev->dev, "gpu hw init failed: %d\n", ret); - gpu->funcs->destroy(gpu); - gpu = NULL; - } else { - /* give inactive pm a chance to kick in: */ - msm_gpu_retire(gpu); - } - } - - priv->gpu = gpu; + if (!priv->gpu) + priv->gpu = adreno_load_gpu(dev); -out: mutex_unlock(&init_lock); } |