]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/adreno: load gpu at probe/bind time
authorRob Clark <robdclark@gmail.com>
Mon, 16 Oct 2017 13:22:38 +0000 (09:22 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 28 Oct 2017 15:01:31 +0000 (11:01 -0400)
commit6322c4ed97a5b149d1f1fe67063b7771af544fd2
tree35af7532497223ab4fa94f5120cd29c475c999bf
parentfa7c27dc75939b4e6ec4a72bd5da6ba3263fed22
drm/msm/adreno: load gpu at probe/bind time

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: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a5xx_gpu.c
drivers/gpu/drm/msm/adreno/adreno_device.c
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/msm_drv.c