Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45511
b: refs/heads/master
c: 35d6270
h: refs/heads/master
i:
  45509: 01e82f8
  45507: 699c84a
  45503: 63a865e
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 15, 2007
1 parent e417788 commit b17f529
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c430ca1e16b2b4b30f567806c73e270caea8db1d
refs/heads/master: 35d6270b806562b37279d3970fa477aaeb372829
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,15 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
char *p,*s,*basep;
struct page *pg;
u8 chr,r,g,b,color;
unsigned long flags;
spinlock_t spinlock;

spin_lock_init(&spinlock);

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

/* We will just duplicate the second pixel at the packet */
Expand Down Expand Up @@ -376,6 +381,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,

end:
kunmap_atomic(basep, KM_BOUNCE_READ);
spin_unlock_irqrestore(&spinlock,flags);

}
static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
{
Expand Down

0 comments on commit b17f529

Please sign in to comment.