~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to debian/patches/features/all/udlfb/udlfb-printk-cleanup.patch

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Bernie Thompson <bernie@plugable.com>
2
 
Date: Mon, 15 Feb 2010 14:46:48 +0000 (-0800)
3
 
Subject: Staging: udlfb: remove printk and small cleanup
4
 
 
5
 
commit bd80816b2877879d36011815858c8681408cc625 upstream.
6
 
 
7
 
Remove last remaining printk and clarify comments
8
 
 
9
 
Signed-off-by: Bernie Thompson <bernie@plugable.com>
10
 
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
11
 
---
12
 
 
13
 
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
14
 
index baad03a..8f6223c 100644
15
 
--- a/drivers/staging/udlfb/udlfb.c
16
 
+++ b/drivers/staging/udlfb/udlfb.c
17
 
@@ -83,8 +83,8 @@ static struct fb_deferred_io dlfb_defio;
18
 
 #endif
19
 
 
20
 
 /*
21
 
- * Inserts a specific DisplayLink controller command into the provided
22
 
- * buffer.
23
 
+ * All DisplayLink bulk operations start with 0xAF, followed by specific code
24
 
+ * All operations are written to buffers which then later get sent to device
25
 
  */
26
 
 static char *dlfb_set_register(char *buf, u8 reg, u8 val)
27
 
 {
28
 
@@ -129,6 +129,10 @@ static char *dlfb_set_base16bpp(char *wrptr, u32 base)
29
 
        return dlfb_set_register(wrptr, 0x22, base);
30
 
 }
31
 
 
32
 
+/*
33
 
+ * DisplayLink HW has separate 16bpp and 8bpp framebuffers.
34
 
+ * In 24bpp modes, the low 323 RGB bits go in the 8bpp framebuffer
35
 
+ */
36
 
 static char *dlfb_set_base8bpp(char *wrptr, u32 base)
37
 
 {
38
 
        wrptr = dlfb_set_register(wrptr, 0x26, base >> 16);
39
 
@@ -161,7 +165,7 @@ static char *dlfb_set_register_16be(char *wrptr, u8 reg, u16 value)
40
 
  * same actual count. This makes sense once you read above a couple of
41
 
  * times and think about it from a hardware perspective.
42
 
  */
43
 
-static u16 lfsr16(u16 actual_count)
44
 
+static u16 dlfb_lfsr16(u16 actual_count)
45
 
 {
46
 
        u32 lv = 0xFFFF; /* This is the lfsr value that the hw starts with */
47
 
 
48
 
@@ -180,7 +184,7 @@ static u16 lfsr16(u16 actual_count)
49
 
  */
50
 
 static char *dlfb_set_register_lfsr16(char *wrptr, u8 reg, u16 value)
51
 
 {
52
 
-       return dlfb_set_register_16(wrptr, reg, lfsr16(value));
53
 
+       return dlfb_set_register_16(wrptr, reg, dlfb_lfsr16(value));
54
 
 }
55
 
 
56
 
 /*
57
 
@@ -292,8 +296,9 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
58
 
        unsigned long size = vma->vm_end - vma->vm_start;
59
 
        unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
60
 
        unsigned long page, pos;
61
 
+       struct dlfb_data *dev = info->par;
62
 
 
63
 
-       printk("MMAP: %lu %u\n", offset + size, info->fix.smem_len);
64
 
+       dl_notice("MMAP: %lu %u\n", offset + size, info->fix.smem_len);
65
 
 
66
 
        if (offset + size > info->fix.smem_len)
67
 
                return -EINVAL;