CHROMIUM: rockchip: support prime import sg table
authorHaixia Shi <hshi@chromium.org>
Fri, 29 Jan 2016 00:23:04 +0000 (16:23 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 7 Dec 2016 06:08:46 +0000 (14:08 +0800)
commit1a1ef00409d9bf09616c657cf5285885a1ce3502
treea72f1a2c01fa7a2199229247f40bce76b552b86f
parent103866399aa294c1946dee13f0689b343590ff98
CHROMIUM: rockchip: support prime import sg table

The prime fd to handle ioctl was not used with rockchip before. Support
was added in order to pass graphics_Gbm and to support potential uses
within Chrome OS (e.g. zero-copy video decode, camera).

Difference from kernel 3.14 implementation:
- prime_import_sg_table passes dma-buf as argument instead of size
- need to handle import sg_table for both DMA and IOMMU paths

TEST=test_that graphics_Gbm on kevin
BUG=chrome-os-partner:56526

Reviewed-on: https://chromium-review.googlesource.com/381991
Tested-by: Haixia Shi <hshi@chromium.org>
Commit-Queue: Haixia Shi <hshi@chromium.org>
Trybot-Ready: Haixia Shi <hshi@chromium.org>
Reviewed-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Conflicts:
drivers/gpu/drm/rockchip/rockchip_drm_gem.c

Change-Id: I7aae5b0e227de61ac17adf98996152da8db097d2
Signed-off-by: Randy Li <randy.li@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_drv.c
drivers/gpu/drm/rockchip/rockchip_drm_gem.c
drivers/gpu/drm/rockchip/rockchip_drm_gem.h