drm/nouveau/kms: Check framebuffer size against bo
authorJames Jones <jajones@nvidia.com>
Mon, 10 Feb 2020 23:15:54 +0000 (15:15 -0800)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:11:15 +0000 (11:11 +1000)
commit4f5746c863db1a98535964009da19c6f7a842c55
treef555c4e6b1bea044aedc0e10269dd3127346ac02
parentc586f30bf74cb580c1748222b05a0bad57d7dcd4
drm/nouveau/kms: Check framebuffer size against bo

Make sure framebuffer dimensions and tiling
parameters will not result in accesses beyond the
end of the GEM buffer they are bound to.

v3: Return EINVAL when creating FB against BO with
    unsupported tiling
v5: Resolved against nouveau_framebuffer cleanup

Signed-off-by: James Jones <jajones@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_display.c