Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186784
b: refs/heads/master
c: bd80816
h: refs/heads/master
v: v3
  • Loading branch information
Bernie Thompson authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent bcbac01 commit 2b2281b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: dd8015f1c83bfde9966c86a5958abd466a304398
refs/heads/master: bd80816b2877879d36011815858c8681408cc625
15 changes: 10 additions & 5 deletions trunk/drivers/staging/udlfb/udlfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ static struct fb_deferred_io dlfb_defio;
#endif

/*
* Inserts a specific DisplayLink controller command into the provided
* buffer.
* All DisplayLink bulk operations start with 0xAF, followed by specific code
* All operations are written to buffers which then later get sent to device
*/
static char *dlfb_set_register(char *buf, u8 reg, u8 val)
{
Expand Down Expand Up @@ -129,6 +129,10 @@ static char *dlfb_set_base16bpp(char *wrptr, u32 base)
return dlfb_set_register(wrptr, 0x22, base);
}

/*
* DisplayLink HW has separate 16bpp and 8bpp framebuffers.
* In 24bpp modes, the low 323 RGB bits go in the 8bpp framebuffer
*/
static char *dlfb_set_base8bpp(char *wrptr, u32 base)
{
wrptr = dlfb_set_register(wrptr, 0x26, base >> 16);
Expand Down Expand Up @@ -161,7 +165,7 @@ static char *dlfb_set_register_16be(char *wrptr, u8 reg, u16 value)
* same actual count. This makes sense once you read above a couple of
* times and think about it from a hardware perspective.
*/
static u16 lfsr16(u16 actual_count)
static u16 dlfb_lfsr16(u16 actual_count)
{
u32 lv = 0xFFFF; /* This is the lfsr value that the hw starts with */

Expand All @@ -180,7 +184,7 @@ static u16 lfsr16(u16 actual_count)
*/
static char *dlfb_set_register_lfsr16(char *wrptr, u8 reg, u16 value)
{
return dlfb_set_register_16(wrptr, reg, lfsr16(value));
return dlfb_set_register_16(wrptr, reg, dlfb_lfsr16(value));
}

/*
Expand Down Expand Up @@ -292,8 +296,9 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
unsigned long page, pos;
struct dlfb_data *dev = info->par;

printk("MMAP: %lu %u\n", offset + size, info->fix.smem_len);
dl_notice("MMAP: %lu %u\n", offset + size, info->fix.smem_len);

if (offset + size > info->fix.smem_len)
return -EINVAL;
Expand Down

0 comments on commit 2b2281b

Please sign in to comment.