* [PATCH] drm/msm: Call msm_init_vram before binding the gpu
@ 2018-02-03 18:38 Craig Tatlor
0 siblings, 0 replies; only message in thread
From: Craig Tatlor @ 2018-02-03 18:38 UTC (permalink / raw)
Cc: ctatlor97-Re5JQEeQqe8AvxtiuMwx3w, David Airlie,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Rob Clark,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-03 18:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-03 18:38 [PATCH] drm/msm: Call msm_init_vram before binding the gpu Craig Tatlor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).