Skip to content

Commit

Permalink
drm/msm: Call msm_init_vram before binding the gpu
Browse files Browse the repository at this point in the history
[ Upstream commit d863f0c ]

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 <[email protected]>
Reviewed-by: Brian Masney <[email protected]>
Tested-by: Alexey Minnekhanov <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
opendata26 authored and gregkh committed Jan 19, 2021
1 parent 45f7e13 commit d565c62
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 @@ -444,14 +444,14 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)

drm_mode_config_init(ddev);

/* Bind all our sub-components: */
ret = component_bind_all(dev, ddev);
ret = msm_init_vram(ddev);
if (ret)
goto err_destroy_mdss;

ret = msm_init_vram(ddev);
/* Bind all our sub-components: */
ret = component_bind_all(dev, ddev);
if (ret)
goto err_msm_uninit;
goto err_destroy_mdss;

dma_set_max_seg_size(dev, UINT_MAX);

Expand Down

0 comments on commit d565c62

Please sign in to comment.