diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-05-24 11:24:30 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-02 23:13:33 -0400 |
commit | 2d6e9b91971034103ac51b20fa692258bf6bdd40 (patch) | |
tree | 5776999a2fd3d4eb190efa2a6c73d32af5612c53 /drivers/gpu/vga/vgaarb.c | |
parent | ce04cc089b22862f7d6ad5aa3ada0dd07e41b833 (diff) |
vgaarb: convert pr_devel() to pr_debug()
We want to be able to use CONFIG_DYNAMIC_DEBUG in arbiter code, switch
the few existing pr_devel() calls to pr_debug().
Also, add one more debug information regarding decoding count.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/vga/vgaarb.c')
-rw-r--r-- | drivers/gpu/vga/vgaarb.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 441e38c95a85..290b0ccea63d 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c | |||
@@ -155,8 +155,8 @@ static struct vga_device *__vga_tryget(struct vga_device *vgadev, | |||
155 | (vgadev->decodes & VGA_RSRC_LEGACY_MEM)) | 155 | (vgadev->decodes & VGA_RSRC_LEGACY_MEM)) |
156 | rsrc |= VGA_RSRC_LEGACY_MEM; | 156 | rsrc |= VGA_RSRC_LEGACY_MEM; |
157 | 157 | ||
158 | pr_devel("%s: %d\n", __func__, rsrc); | 158 | pr_debug("%s: %d\n", __func__, rsrc); |
159 | pr_devel("%s: owns: %d\n", __func__, vgadev->owns); | 159 | pr_debug("%s: owns: %d\n", __func__, vgadev->owns); |
160 | 160 | ||
161 | /* Check what resources we need to acquire */ | 161 | /* Check what resources we need to acquire */ |
162 | wants = rsrc & ~vgadev->owns; | 162 | wants = rsrc & ~vgadev->owns; |
@@ -268,7 +268,7 @@ static void __vga_put(struct vga_device *vgadev, unsigned int rsrc) | |||
268 | { | 268 | { |
269 | unsigned int old_locks = vgadev->locks; | 269 | unsigned int old_locks = vgadev->locks; |
270 | 270 | ||
271 | pr_devel("%s\n", __func__); | 271 | pr_debug("%s\n", __func__); |
272 | 272 | ||
273 | /* Update our counters, and account for equivalent legacy resources | 273 | /* Update our counters, and account for equivalent legacy resources |
274 | * if we decode them | 274 | * if we decode them |
@@ -575,6 +575,7 @@ static inline void vga_update_device_decodes(struct vga_device *vgadev, | |||
575 | else | 575 | else |
576 | vga_decode_count--; | 576 | vga_decode_count--; |
577 | } | 577 | } |
578 | pr_debug("vgaarb: decoding count now is: %d\n", vga_decode_count); | ||
578 | } | 579 | } |
579 | 580 | ||
580 | void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace) | 581 | void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace) |
@@ -831,7 +832,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
831 | curr_pos += 5; | 832 | curr_pos += 5; |
832 | remaining -= 5; | 833 | remaining -= 5; |
833 | 834 | ||
834 | pr_devel("client 0x%p called 'lock'\n", priv); | 835 | pr_debug("client 0x%p called 'lock'\n", priv); |
835 | 836 | ||
836 | if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) { | 837 | if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) { |
837 | ret_val = -EPROTO; | 838 | ret_val = -EPROTO; |
@@ -867,7 +868,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
867 | curr_pos += 7; | 868 | curr_pos += 7; |
868 | remaining -= 7; | 869 | remaining -= 7; |
869 | 870 | ||
870 | pr_devel("client 0x%p called 'unlock'\n", priv); | 871 | pr_debug("client 0x%p called 'unlock'\n", priv); |
871 | 872 | ||
872 | if (strncmp(curr_pos, "all", 3) == 0) | 873 | if (strncmp(curr_pos, "all", 3) == 0) |
873 | io_state = VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM; | 874 | io_state = VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM; |
@@ -917,7 +918,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
917 | curr_pos += 8; | 918 | curr_pos += 8; |
918 | remaining -= 8; | 919 | remaining -= 8; |
919 | 920 | ||
920 | pr_devel("client 0x%p called 'trylock'\n", priv); | 921 | pr_debug("client 0x%p called 'trylock'\n", priv); |
921 | 922 | ||
922 | if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) { | 923 | if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) { |
923 | ret_val = -EPROTO; | 924 | ret_val = -EPROTO; |
@@ -961,7 +962,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
961 | 962 | ||
962 | curr_pos += 7; | 963 | curr_pos += 7; |
963 | remaining -= 7; | 964 | remaining -= 7; |
964 | pr_devel("client 0x%p called 'target'\n", priv); | 965 | pr_debug("client 0x%p called 'target'\n", priv); |
965 | /* if target is default */ | 966 | /* if target is default */ |
966 | if (!strncmp(curr_pos, "default", 7)) | 967 | if (!strncmp(curr_pos, "default", 7)) |
967 | pdev = pci_dev_get(vga_default_device()); | 968 | pdev = pci_dev_get(vga_default_device()); |
@@ -971,11 +972,11 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
971 | ret_val = -EPROTO; | 972 | ret_val = -EPROTO; |
972 | goto done; | 973 | goto done; |
973 | } | 974 | } |
974 | pr_devel("vgaarb: %s ==> %x:%x:%x.%x\n", curr_pos, | 975 | pr_debug("vgaarb: %s ==> %x:%x:%x.%x\n", curr_pos, |
975 | domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 976 | domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
976 | 977 | ||
977 | pbus = pci_find_bus(domain, bus); | 978 | pbus = pci_find_bus(domain, bus); |
978 | pr_devel("vgaarb: pbus %p\n", pbus); | 979 | pr_debug("vgaarb: pbus %p\n", pbus); |
979 | if (pbus == NULL) { | 980 | if (pbus == NULL) { |
980 | pr_err("vgaarb: invalid PCI domain and/or bus address %x:%x\n", | 981 | pr_err("vgaarb: invalid PCI domain and/or bus address %x:%x\n", |
981 | domain, bus); | 982 | domain, bus); |
@@ -983,7 +984,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
983 | goto done; | 984 | goto done; |
984 | } | 985 | } |
985 | pdev = pci_get_slot(pbus, devfn); | 986 | pdev = pci_get_slot(pbus, devfn); |
986 | pr_devel("vgaarb: pdev %p\n", pdev); | 987 | pr_debug("vgaarb: pdev %p\n", pdev); |
987 | if (!pdev) { | 988 | if (!pdev) { |
988 | pr_err("vgaarb: invalid PCI address %x:%x\n", | 989 | pr_err("vgaarb: invalid PCI address %x:%x\n", |
989 | bus, devfn); | 990 | bus, devfn); |
@@ -993,7 +994,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
993 | } | 994 | } |
994 | 995 | ||
995 | vgadev = vgadev_find(pdev); | 996 | vgadev = vgadev_find(pdev); |
996 | pr_devel("vgaarb: vgadev %p\n", vgadev); | 997 | pr_debug("vgaarb: vgadev %p\n", vgadev); |
997 | if (vgadev == NULL) { | 998 | if (vgadev == NULL) { |
998 | pr_err("vgaarb: this pci device is not a vga device\n"); | 999 | pr_err("vgaarb: this pci device is not a vga device\n"); |
999 | pci_dev_put(pdev); | 1000 | pci_dev_put(pdev); |
@@ -1029,7 +1030,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
1029 | } else if (strncmp(curr_pos, "decodes ", 8) == 0) { | 1030 | } else if (strncmp(curr_pos, "decodes ", 8) == 0) { |
1030 | curr_pos += 8; | 1031 | curr_pos += 8; |
1031 | remaining -= 8; | 1032 | remaining -= 8; |
1032 | pr_devel("vgaarb: client 0x%p called 'decodes'\n", priv); | 1033 | pr_debug("vgaarb: client 0x%p called 'decodes'\n", priv); |
1033 | 1034 | ||
1034 | if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) { | 1035 | if (!vga_str_to_iostate(curr_pos, remaining, &io_state)) { |
1035 | ret_val = -EPROTO; | 1036 | ret_val = -EPROTO; |
@@ -1058,7 +1059,7 @@ static unsigned int vga_arb_fpoll(struct file *file, poll_table * wait) | |||
1058 | { | 1059 | { |
1059 | struct vga_arb_private *priv = file->private_data; | 1060 | struct vga_arb_private *priv = file->private_data; |
1060 | 1061 | ||
1061 | pr_devel("%s\n", __func__); | 1062 | pr_debug("%s\n", __func__); |
1062 | 1063 | ||
1063 | if (priv == NULL) | 1064 | if (priv == NULL) |
1064 | return -ENODEV; | 1065 | return -ENODEV; |
@@ -1071,7 +1072,7 @@ static int vga_arb_open(struct inode *inode, struct file *file) | |||
1071 | struct vga_arb_private *priv; | 1072 | struct vga_arb_private *priv; |
1072 | unsigned long flags; | 1073 | unsigned long flags; |
1073 | 1074 | ||
1074 | pr_devel("%s\n", __func__); | 1075 | pr_debug("%s\n", __func__); |
1075 | 1076 | ||
1076 | priv = kmalloc(sizeof(struct vga_arb_private), GFP_KERNEL); | 1077 | priv = kmalloc(sizeof(struct vga_arb_private), GFP_KERNEL); |
1077 | if (priv == NULL) | 1078 | if (priv == NULL) |
@@ -1101,7 +1102,7 @@ static int vga_arb_release(struct inode *inode, struct file *file) | |||
1101 | unsigned long flags; | 1102 | unsigned long flags; |
1102 | int i; | 1103 | int i; |
1103 | 1104 | ||
1104 | pr_devel("%s\n", __func__); | 1105 | pr_debug("%s\n", __func__); |
1105 | 1106 | ||
1106 | if (priv == NULL) | 1107 | if (priv == NULL) |
1107 | return -ENODEV; | 1108 | return -ENODEV; |
@@ -1112,7 +1113,7 @@ static int vga_arb_release(struct inode *inode, struct file *file) | |||
1112 | uc = &priv->cards[i]; | 1113 | uc = &priv->cards[i]; |
1113 | if (uc->pdev == NULL) | 1114 | if (uc->pdev == NULL) |
1114 | continue; | 1115 | continue; |
1115 | pr_devel("uc->io_cnt == %d, uc->mem_cnt == %d\n", | 1116 | pr_debug("uc->io_cnt == %d, uc->mem_cnt == %d\n", |
1116 | uc->io_cnt, uc->mem_cnt); | 1117 | uc->io_cnt, uc->mem_cnt); |
1117 | while (uc->io_cnt--) | 1118 | while (uc->io_cnt--) |
1118 | vga_put(uc->pdev, VGA_RSRC_LEGACY_IO); | 1119 | vga_put(uc->pdev, VGA_RSRC_LEGACY_IO); |
@@ -1165,7 +1166,7 @@ static int pci_notify(struct notifier_block *nb, unsigned long action, | |||
1165 | struct pci_dev *pdev = to_pci_dev(dev); | 1166 | struct pci_dev *pdev = to_pci_dev(dev); |
1166 | bool notify = false; | 1167 | bool notify = false; |
1167 | 1168 | ||
1168 | pr_devel("%s\n", __func__); | 1169 | pr_debug("%s\n", __func__); |
1169 | 1170 | ||
1170 | /* For now we're only intereted in devices added and removed. I didn't | 1171 | /* For now we're only intereted in devices added and removed. I didn't |
1171 | * test this thing here, so someone needs to double check for the | 1172 | * test this thing here, so someone needs to double check for the |