Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39566
b: refs/heads/master
c: 7844d75
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox authored and Mauro Carvalho Chehab committed Oct 14, 2006
1 parent a6a777d commit 1ccaaf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76dc82ab57236105285fd8520895c1404b8b952f
refs/heads/master: 7844d7561307d6f8b0dd18b91f4dc6cff53848b4
12 changes: 6 additions & 6 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,

/* Get first addr pointed to pixel position */
oldpg=get_addr_pos(pos,pages,to_addr);
pg=pfn_to_page(to_addr[oldpg].sg->dma_address >> PAGE_SHIFT);
pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;

/* We will just duplicate the second pixel at the packet */
Expand All @@ -287,7 +287,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
for (color=0;color<4;color++) {
pgpos=get_addr_pos(pos,pages,to_addr);
if (pgpos!=oldpg) {
pg=pfn_to_page(to_addr[pgpos].sg->dma_address >> PAGE_SHIFT);
pg=pfn_to_page(sg_dma_address(to_addr[pgpos].sg) >> PAGE_SHIFT);
kunmap_atomic(basep, KM_BOUNCE_READ);
basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset;
oldpg=pgpos;
Expand Down Expand Up @@ -339,8 +339,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
for (color=0;color<4;color++) {
pgpos=get_addr_pos(pos,pages,to_addr);
if (pgpos!=oldpg) {
pg=pfn_to_page(to_addr[pgpos].
sg->dma_address
pg=pfn_to_page(sg_dma_address(
to_addr[pgpos].sg)
>> PAGE_SHIFT);
kunmap_atomic(basep,
KM_BOUNCE_READ);
Expand Down Expand Up @@ -386,7 +386,7 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
struct timeval ts;

/* Test if DMA mapping is ready */
if (!vb->dma.sglist[0].dma_address)
if (!sg_dma_address(&vb->dma.sglist[0]))
return;

prep_to_addr(to_addr,vb);
Expand Down Expand Up @@ -783,7 +783,7 @@ static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents,
for (i = 0; i < nents; i++ ) {
BUG_ON(!sg[i].page);

sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
sg_dma_address(&sg[i]) = page_to_phys(sg[i].page) + sg[i].offset;
}

return nents;
Expand Down

0 comments on commit 1ccaaf3

Please sign in to comment.