lkml.org 
[lkml]   [2018]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drm/msm: Call msm_init_vram before binding the gpu
Date
vram.size is needed when binding a gpu without an iommu and is defined
in msm_init_vram(), so run that before binding it.

Signed-off-by: Craig Tatlor <ctatlor97@gmail.com>
---
drivers/gpu/drm/msm/msm_drv.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index bdf0fe754f7b..82d4126ca017 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -400,6 +400,14 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)

drm_mode_config_init(ddev);

+ ret = msm_init_vram(ddev);
+ if (ret) {
+ msm_mdss_destroy(ddev);
+ kfree(priv);
+ drm_dev_unref(ddev);
+ return ret;
+ }
+
/* Bind all our sub-components: */
ret = component_bind_all(dev, ddev);
if (ret) {
@@ -409,10 +417,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
return ret;
}

- ret = msm_init_vram(ddev);
- if (ret)
- goto fail;
-
msm_gem_shrinker_init(ddev);

switch (get_mdp_ver(pdev)) {
--
2.15.1
\
 
 \ /
  Last update: 2018-02-03 19:41    [W:0.617 / U:0.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site