drm-misc-fixes for v5.6:
- SG fixes for prime, radeon and amdgpu. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAl58tmgACgkQ/lWMcqZw E8NIyBAAoKOKyKwTgzTF+AQvkFsAkRcE5wi7lrJTdbS26susSTstDFOmouHcgfdi gxRHwq2BHUfPDV2qUTp9v5dkQDvH9ZrDVaeuT0vK9f9PT+5EEpiO4mlmpq5o2CpH 5Pn1NAd58vP0BZmLl9MOrJQMKRC7Y7rSAaNXjQu9KfWV1CtqPu/OBm2cbRZC/7Rs nRcWRV2H+MSPzzSeGCA8MpcPvQiVEGtGjm3TFtH5Q4EFuE0ILIvf/cqWGLtiIkh2 QRyE/+bLokuzZc2XerQPf5zxQDCqXc1NPCWXwlAKUUkcIDF3lQ5ewxW6MZ8AExqx Sn84+5z/BMlIqjHptODeZaWXLXgUnt7G0iE5aKVlQ14yKgJOejtq2N05XmzhEcLS H5WiLW9qIdCKH7C8joZFtb6LAPEq48ubJgYO77G02JSYO/UnB7qBnxTgyEL4Sl2O OskTdFTNG4ayVCJkFEgZpU0Xb41H/wIwB1HPcD0QSkHPGmGamIBoy7IoEpfmyWZF vN/Ucw0INJMORzr+/sqNSHPnzNhT1MRorVdWMgk/5zcUWn/KD+pQfQrE72UXQtAy +Q84lkjhCTGOAVINZGbuC3CkfTdNqqrHTM+IqHBGU6oZ75HUb0N4VfeLQeESBoK6 kFEQYtB6EL6GMt7d6Pj+qTFXShh1pdWDIqKW2Kswz5nTGqwWgFo= =wtId -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2020-03-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.6: - SG fixes for prime, radeon and amdgpu. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ef10e822-76dd-125d-ec1f-9a78c5f76bc3@linux.intel.com
This commit is contained in:
commit
5117c363eb
@ -974,7 +974,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm)
|
||||
/* Map SG to device */
|
||||
r = -ENOMEM;
|
||||
nents = dma_map_sg(adev->dev, ttm->sg->sgl, ttm->sg->nents, direction);
|
||||
if (nents != ttm->sg->nents)
|
||||
if (nents == 0)
|
||||
goto release_sg;
|
||||
|
||||
/* convert SG to linear array of pages and dma addresses */
|
||||
|
@ -967,7 +967,7 @@ int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
|
||||
|
||||
index = 0;
|
||||
for_each_sg(sgt->sgl, sg, sgt->nents, count) {
|
||||
len = sg->length;
|
||||
len = sg_dma_len(sg);
|
||||
page = sg_page(sg);
|
||||
addr = sg_dma_address(sg);
|
||||
|
||||
|
@ -528,7 +528,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt *ttm)
|
||||
|
||||
r = -ENOMEM;
|
||||
nents = dma_map_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, direction);
|
||||
if (nents != ttm->sg->nents)
|
||||
if (nents == 0)
|
||||
goto release_sg;
|
||||
|
||||
drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
|
||||
|
Loading…
Reference in New Issue
Block a user