mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 09:40:27 +02:00
drm/msm: Clear aperture ownership outside of fbdev code
Move aperture management out of the fbdev code. It is unrelated and needs to run even if fbdev support has been disabled. Call the helper at the top of msm_drm_init() to take over hardware from other drivers. v2: * bind all subdevices before acquiring device (Dmitri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/530553/ Link: https://lore.kernel.org/r/20230403124538.8497-3-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
25c83fd999
commit
3aa4e828be
2 changed files with 6 additions and 6 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <uapi/linux/sched/types.h>
|
||||
|
||||
#include <drm/drm_aperture.h>
|
||||
#include <drm/drm_bridge.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_file.h>
|
||||
|
|
@ -465,6 +466,11 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
|
|||
if (ret)
|
||||
goto err_deinit_vram;
|
||||
|
||||
/* the fw fb could be anywhere in memory */
|
||||
ret = drm_aperture_remove_framebuffers(false, drv);
|
||||
if (ret)
|
||||
goto err_msm_uninit;
|
||||
|
||||
dma_set_max_seg_size(dev, UINT_MAX);
|
||||
|
||||
msm_gem_shrinker_init(ddev);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
*/
|
||||
|
||||
#include <drm/drm_aperture.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
|
|
@ -154,11 +153,6 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
/* the fw fb could be anywhere in memory */
|
||||
ret = drm_aperture_remove_framebuffers(false, dev->driver);
|
||||
if (ret)
|
||||
goto fini;
|
||||
|
||||
ret = drm_fb_helper_initial_config(helper);
|
||||
if (ret)
|
||||
goto fini;
|
||||
|
|
|
|||
Loading…
Reference in a new issue