linux-next: manual merge of the drm-intel tree with Linus' tree

From: Stephen Rothwell
Date: Mon Sep 18 2017 - 21:42:46 EST


Hi all,

Today's linux-next merge of the drm-intel tree got a conflict in:

drivers/media/v4l2-core/videobuf2-dma-contig.c

between commit:

5b6f9abe5a49 ("media: vb2: add bidirectional flag in vb2_queue")

from Linus' tree and commit:

c4860ad60564 ("lib/scatterlist: Fix offset type in sg_alloc_table_from_pages")

from the drm-intel tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc drivers/media/v4l2-core/videobuf2-dma-contig.c
index 9f389f36566d,2405077fdc71..000000000000
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@@ -507,9 -507,8 +507,9 @@@ static void *vb2_dc_get_userptr(struct
buf->dev = dev;
buf->dma_dir = dma_dir;

- offset = vaddr & ~PAGE_MASK;
+ offset = lower_32_bits(offset_in_page(vaddr));
- vec = vb2_create_framevec(vaddr, size, dma_dir == DMA_FROM_DEVICE);
+ vec = vb2_create_framevec(vaddr, size, dma_dir == DMA_FROM_DEVICE ||
+ dma_dir == DMA_BIDIRECTIONAL);
if (IS_ERR(vec)) {
ret = PTR_ERR(vec);
goto fail_buf;