diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2017-02-22 20:48:30 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-03-07 17:05:12 +1000 |
commit | 9e4397579fa4cd5cc411d47815eb805e337d0203 (patch) | |
tree | eb9985d5865f45b44299e76c99a9c01bce09c2df /drivers/gpu/drm/nouveau/include/nvkm | |
parent | 65d9376b74ff651a8d4c6736d32a3bb3aa47bf09 (diff) | |
download | blackbird-obmc-linux-9e4397579fa4cd5cc411d47815eb805e337d0203.tar.gz blackbird-obmc-linux-9e4397579fa4cd5cc411d47815eb805e337d0203.zip |
drm/nouveau/falcon: delay construction of falcons to oneinit()
Reading registers at device construction time can be harmful, as there
is no guarantee the underlying engine will be up, or in its runtime
configuration. Defer register reading to the oneinit() hook and update
users accordingly.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h index 9384dff81494..b04d3a0e82e6 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h @@ -46,8 +46,14 @@ struct nvkm_falcon { struct nvkm_engine engine; }; +/* This constructor must be called from the owner's oneinit() hook and + * *not* its constructor. This is to ensure that DEVINIT has been + * completed, and that the device is correctly enabled before we touch + * falcon registers. + */ int nvkm_falcon_v1_new(struct nvkm_subdev *owner, const char *name, u32 addr, struct nvkm_falcon **); + void nvkm_falcon_del(struct nvkm_falcon **); int nvkm_falcon_get(struct nvkm_falcon *, const struct nvkm_subdev *); void nvkm_falcon_put(struct nvkm_falcon *, const struct nvkm_subdev *); |