drm/nouveau/bios: fix OF loading
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 2 Oct 2015 03:41:21 +0000 (23:41 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 12 Oct 2015 03:54:56 +0000 (13:54 +1000)
commit25d295882a1adfcdaaad85369289677b87c7c8f0
tree3c586938dcc7b2fd9db944db8745f60f72ae5a52
parentf231976c2e8964ceaa9250e57d27c35ff03825c2
drm/nouveau/bios: fix OF loading

Currently OF bios load fails for a few reasons:
 - checksum failure
 - bios size too small
 - no PCIR header
 - bios length not a multiple of 4

In this change, we resolve all of the above by ignoring any checksum
failures (since OF VBIOS tends not to have a checksum), and faking the
PCIR data when loading from OF.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c