If a client passes a handle to a mapped memory to drmModeAddFB, the
ioctl will fail since the gtt mapping code will fail to get its page
list. Fix that by using a reference to the original meminfo instead
of the mapped one.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
DRM_DEBUG("Got Kernel MemInfo for handle %p\n", hKernelMemInfo);
+ psKernelMemInfo = PVRSRVGetSrcMemInfo(psKernelMemInfo);
+
sizes[0] = psKernelMemInfo->ui32AllocSize;
for (i = 1; i < drm_format_num_planes(r->pixel_format); i++) {