Skip to content

Commit

Permalink
drm/msm: setup vram after component_bind_all()
Browse files Browse the repository at this point in the history
First of all, we don't want -EPROBE_DEFER when trying to bind children
to cause us to forget to free our vram.  And second we don't want vram
allocation fail to trigger _unbind_all() before _bind_all().

Signed-off-by: Rob Clark <robdclark@gmail.com>
  • Loading branch information
Rob Clark committed May 14, 2015
1 parent ff431fa commit 13f1556
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/msm/msm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,17 @@ static int msm_load(struct drm_device *dev, unsigned long flags)

drm_mode_config_init(dev);

ret = msm_init_vram(dev);
if (ret)
goto fail;

platform_set_drvdata(pdev, dev);

/* Bind all our sub-components: */
ret = component_bind_all(dev->dev, dev);
if (ret)
return ret;

ret = msm_init_vram(dev);
if (ret)
goto fail;

switch (get_mdp_ver(pdev)) {
case 4:
kms = mdp4_kms_init(dev);
Expand Down

0 comments on commit 13f1556

Please sign in to comment.