]> git.baikalelectronics.ru Git - kernel.git/commit
drm/prime: Allow internal imports without import_sg_table
authorTomasz Figa <tfiga@chromium.org>
Fri, 8 May 2015 08:13:45 +0000 (17:13 +0900)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 May 2015 09:02:50 +0000 (11:02 +0200)
commitf2285dfc0554ab66f763456a945d7faefa1cb4d3
tree6f35551441bfdb6f9922424bd894baa0e11281c9
parent01ea16ee95b9c28724281c74d9baa1d6401225d1
drm/prime: Allow internal imports without import_sg_table

Currently drm_gem_prime_import() checks if gem_prime_import_sg_table()
is implemented in DRM driver ops. However it is not necessary for
internal imports (i.e. dma_buf->ops == &drm_gem_prime_dmabuf_ops
and obj->dev == dev), which only increment reference count on respective
GEM objects.

This patch makes the helper check this condition only in case of
external imports fo rwhich importing sg table is indeed needed.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_prime.c