Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187164
b: refs/heads/master
c: d40f29b
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed Mar 12, 2010
1 parent bb033f6 commit 520dc6b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 60 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: 0d3580d40cc38bbaf63d0b2756931e0ae241a9ea
refs/heads/master: d40f29bff30a1a50d7ad69bd150c9cda1ce1ba9d
30 changes: 0 additions & 30 deletions trunk/drivers/video/bf54x-lq043fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ struct bfin_bf54xfb_info {
unsigned char *fb_buffer; /* RGB Buffer */

dma_addr_t dma_handle;
int lq043_mmap;
int lq043_open_cnt;
int irq;
spinlock_t lock; /* lock */
Expand Down Expand Up @@ -316,7 +315,6 @@ static int bfin_bf54x_fb_release(struct fb_info *info, int user)
spin_lock(&fbi->lock);

fbi->lq043_open_cnt--;
fbi->lq043_mmap = 0;

if (fbi->lq043_open_cnt <= 0) {

Expand Down Expand Up @@ -374,33 +372,6 @@ static int bfin_bf54x_fb_check_var(struct fb_var_screeninfo *var,
return 0;
}

static int bfin_bf54x_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{

struct bfin_bf54xfb_info *fbi = info->par;

if (fbi->lq043_mmap)
return -1;

spin_lock(&fbi->lock);
fbi->lq043_mmap = 1;
spin_unlock(&fbi->lock);

vma->vm_start = (unsigned long)(fbi->fb_buffer);

vma->vm_end = vma->vm_start + info->fix.smem_len;
/* For those who don't understand how mmap works, go read
* Documentation/nommu-mmap.txt.
* For those that do, you will know that the VM_MAYSHARE flag
* must be set in the vma->vm_flags structure on noMMU
* Other flags can be set, and are documented in
* include/linux/mm.h
*/
vma->vm_flags |= VM_MAYSHARE | VM_SHARED;

return 0;
}

int bfin_bf54x_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
if (nocursor)
Expand Down Expand Up @@ -452,7 +423,6 @@ static struct fb_ops bfin_bf54x_fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_mmap = bfin_bf54x_fb_mmap,
.fb_cursor = bfin_bf54x_fb_cursor,
.fb_setcolreg = bfin_bf54x_fb_setcolreg,
};
Expand Down
29 changes: 0 additions & 29 deletions trunk/drivers/video/bfin-t350mcqb-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ struct bfin_t350mcqbfb_info {
struct device *dev;
unsigned char *fb_buffer; /* RGB Buffer */
dma_addr_t dma_handle;
int lq043_mmap;
int lq043_open_cnt;
int irq;
spinlock_t lock; /* lock */
Expand Down Expand Up @@ -235,7 +234,6 @@ static int bfin_t350mcqb_fb_release(struct fb_info *info, int user)
spin_lock(&fbi->lock);

fbi->lq043_open_cnt--;
fbi->lq043_mmap = 0;

if (fbi->lq043_open_cnt <= 0) {
bfin_t350mcqb_disable_ppi();
Expand Down Expand Up @@ -293,32 +291,6 @@ static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var,
return 0;
}

static int bfin_t350mcqb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct bfin_t350mcqbfb_info *fbi = info->par;

if (fbi->lq043_mmap)
return -1;

spin_lock(&fbi->lock);
fbi->lq043_mmap = 1;
spin_unlock(&fbi->lock);

vma->vm_start = (unsigned long)(fbi->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET);

vma->vm_end = vma->vm_start + info->fix.smem_len;
/* For those who don't understand how mmap works, go read
* Documentation/nommu-mmap.txt.
* For those that do, you will know that the VM_MAYSHARE flag
* must be set in the vma->vm_flags structure on noMMU
* Other flags can be set, and are documented in
* include/linux/mm.h
*/
vma->vm_flags |= VM_MAYSHARE | VM_SHARED;

return 0;
}

int bfin_t350mcqb_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
if (nocursor)
Expand Down Expand Up @@ -370,7 +342,6 @@ static struct fb_ops bfin_t350mcqb_fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_mmap = bfin_t350mcqb_fb_mmap,
.fb_cursor = bfin_t350mcqb_fb_cursor,
.fb_setcolreg = bfin_t350mcqb_fb_setcolreg,
};
Expand Down

0 comments on commit 520dc6b

Please sign in to comment.