• Rob Clark's avatar
    drm/msm/adreno: load gpu at probe/bind time · eec874ce
    Rob Clark authored
    Previously, in an effort to defer initializing the gpu until firmware
    was available (ie. rootfs mounted), the gpu was not loaded at when the
    subdevice was bound.  Which resulted that clks/etc were requested in a
    place that devm couldn't really help unwind if something failed.
    
    Instead move request_firmware() to gpu->hw_init() and construct the gpu
    earlier in adreno_bind().  To avoid the rest of the driver needing to
    be aware of a gpu that hasn't managed to load firmware and hw_init()
    yet, stash the gpu ptr in the adreno device's drvdata, and don't set
    priv->gpu() until hw_init() succeeds.
    Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
    eec874ce
msm_drv.c 27.2 KB