Commit be25aef0 authored by Miguel Gómez's avatar Miguel Gómez Committed by Greg Kroah-Hartman

Staging: xgifb: Improve debug strings.

Signed-off-by: default avatarMiguel Gómez <magomez@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61439fa8
...@@ -39,14 +39,14 @@ static void dumpVGAReg(void) ...@@ -39,14 +39,14 @@ static void dumpVGAReg(void)
for (i = 0; i < 0x4f; i++) { for (i = 0; i < 0x4f; i++) {
reg = xgifb_reg_get(XGISR, i); reg = xgifb_reg_get(XGISR, i);
pr_debug("\no 3c4 %x", i); pr_debug("o 3c4 %x\n", i);
pr_debug("\ni 3c5 => %x", reg); pr_debug("i 3c5 => %x\n", reg);
} }
for (i = 0; i < 0xF0; i++) { for (i = 0; i < 0xF0; i++) {
reg = xgifb_reg_get(XGICR, i); reg = xgifb_reg_get(XGICR, i);
pr_debug("\no 3d4 %x", i); pr_debug("o 3d4 %x\n", i);
pr_debug("\ni 3d5 => %x", reg); pr_debug("i 3d5 => %x\n", reg);
} }
} }
#else #else
...@@ -591,7 +591,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info, ...@@ -591,7 +591,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info,
break; break;
} else if (XGIfb_vrate[i].refresh > rate) { } else if (XGIfb_vrate[i].refresh > rate) {
if ((XGIfb_vrate[i].refresh - rate) <= 3) { if ((XGIfb_vrate[i].refresh - rate) <= 3) {
pr_debug("XGIfb: Adjusting rate from %d up to %d\n", pr_debug("Adjusting rate from %d up to %d\n",
rate, XGIfb_vrate[i].refresh); rate, XGIfb_vrate[i].refresh);
xgifb_info->rate_idx = xgifb_info->rate_idx =
XGIfb_vrate[i].idx; XGIfb_vrate[i].idx;
...@@ -600,7 +600,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info, ...@@ -600,7 +600,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info,
} else if (((rate - XGIfb_vrate[i - 1].refresh) } else if (((rate - XGIfb_vrate[i - 1].refresh)
<= 2) && (XGIfb_vrate[i].idx <= 2) && (XGIfb_vrate[i].idx
!= 1)) { != 1)) {
pr_debug("XGIfb: Adjusting rate from %d down to %d\n", pr_debug("Adjusting rate from %d down to %d\n",
rate, XGIfb_vrate[i-1].refresh); rate, XGIfb_vrate[i-1].refresh);
xgifb_info->rate_idx = xgifb_info->rate_idx =
XGIfb_vrate[i - 1].idx; XGIfb_vrate[i - 1].idx;
...@@ -609,7 +609,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info, ...@@ -609,7 +609,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info,
} }
break; break;
} else if ((rate - XGIfb_vrate[i].refresh) <= 2) { } else if ((rate - XGIfb_vrate[i].refresh) <= 2) {
pr_debug("XGIfb: Adjusting rate from %d down to %d\n", pr_debug("Adjusting rate from %d down to %d\n",
rate, XGIfb_vrate[i].refresh); rate, XGIfb_vrate[i].refresh);
xgifb_info->rate_idx = XGIfb_vrate[i].idx; xgifb_info->rate_idx = XGIfb_vrate[i].idx;
break; break;
...@@ -987,7 +987,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive, ...@@ -987,7 +987,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
} }
if (!htotal || !vtotal) { if (!htotal || !vtotal) {
pr_debug("XGIfb: Invalid 'var' information\n"); pr_debug("Invalid 'var' information\n");
return -EINVAL; return -EINVAL;
} pr_debug("var->pixclock=%d, htotal=%d, vtotal=%d\n", } pr_debug("var->pixclock=%d, htotal=%d, vtotal=%d\n",
var->pixclock, htotal, vtotal); var->pixclock, htotal, vtotal);
...@@ -1063,7 +1063,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive, ...@@ -1063,7 +1063,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
XGIfb_post_setmode(xgifb_info); XGIfb_post_setmode(xgifb_info);
pr_debug("XGIfb: Set new mode: %dx%dx%d-%d\n", pr_debug("Set new mode: %dx%dx%d-%d\n",
XGIbios_mode[xgifb_info->mode_idx].xres, XGIbios_mode[xgifb_info->mode_idx].xres,
XGIbios_mode[xgifb_info->mode_idx].yres, XGIbios_mode[xgifb_info->mode_idx].yres,
XGIbios_mode[xgifb_info->mode_idx].bpp, XGIbios_mode[xgifb_info->mode_idx].bpp,
...@@ -1109,7 +1109,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive, ...@@ -1109,7 +1109,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
break; break;
default: default:
xgifb_info->video_cmap_len = 16; xgifb_info->video_cmap_len = 16;
pr_err("Unsupported depth %d", pr_err("Unsupported depth %d\n",
xgifb_info->video_bpp); xgifb_info->video_bpp);
break; break;
} }
...@@ -1303,7 +1303,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -1303,7 +1303,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+ var->vsync_len; + var->vsync_len;
if (!(htotal) || !(vtotal)) { if (!(htotal) || !(vtotal)) {
pr_debug("XGIfb: no valid timing data\n"); pr_debug("No valid timing data\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1661,7 +1661,7 @@ static int __init xgifb_optval(char *fullopt, int validx) ...@@ -1661,7 +1661,7 @@ static int __init xgifb_optval(char *fullopt, int validx)
unsigned long lres; unsigned long lres;
if (kstrtoul(fullopt + validx, 0, &lres) < 0 || lres > INT_MAX) { if (kstrtoul(fullopt + validx, 0, &lres) < 0 || lres > INT_MAX) {
pr_err("xgifb: invalid value for option: %s\n", fullopt); pr_err("Invalid value for option: %s\n", fullopt);
return 0; return 0;
} }
return lres; return lres;
...@@ -1674,7 +1674,7 @@ static int __init XGIfb_setup(char *options) ...@@ -1674,7 +1674,7 @@ static int __init XGIfb_setup(char *options)
if (!options || !*options) if (!options || !*options)
return 0; return 0;
pr_info("xgifb: options: %s\n", options); pr_info("Options: %s\n", options);
while ((this_opt = strsep(&options, ",")) != NULL) { while ((this_opt = strsep(&options, ",")) != NULL) {
...@@ -1767,7 +1767,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -1767,7 +1767,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
reg1 = xgifb_reg_get(XGISR, IND_SIS_PASSWORD); reg1 = xgifb_reg_get(XGISR, IND_SIS_PASSWORD);
if (reg1 != 0xa1) { /*I/O error */ if (reg1 != 0xa1) { /*I/O error */
dev_err(&pdev->dev, "I/O error!!!"); dev_err(&pdev->dev, "I/O error\n");
ret = -EIO; ret = -EIO;
goto error_disable; goto error_disable;
} }
...@@ -1817,7 +1817,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -1817,7 +1817,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
if (!request_mem_region(xgifb_info->video_base, if (!request_mem_region(xgifb_info->video_base,
xgifb_info->video_size, xgifb_info->video_size,
"XGIfb FB")) { "XGIfb FB")) {
dev_err(&pdev->dev, "unable request memory size %x\n", dev_err(&pdev->dev, "Unable request memory size %x\n",
xgifb_info->video_size); xgifb_info->video_size);
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Fatal error: Unable to reserve frame buffer memory. " "Fatal error: Unable to reserve frame buffer memory. "
...@@ -1973,7 +1973,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -1973,7 +1973,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
} }
if (xgifb_info->mode_idx < 0) { if (xgifb_info->mode_idx < 0) {
dev_err(&pdev->dev, "no supported video mode found\n"); dev_err(&pdev->dev, "No supported video mode found\n");
goto error_1; goto error_1;
} }
...@@ -2085,7 +2085,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -2085,7 +2085,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
xgifb_info->mtrr = mtrr_add(xgifb_info->video_base, xgifb_info->mtrr = mtrr_add(xgifb_info->video_base,
xgifb_info->video_size, MTRR_TYPE_WRCOMB, 1); xgifb_info->video_size, MTRR_TYPE_WRCOMB, 1);
if (xgifb_info->mtrr >= 0) if (xgifb_info->mtrr >= 0)
dev_info(&pdev->dev, "added MTRR\n"); dev_info(&pdev->dev, "Added MTRR\n");
#endif #endif
if (register_framebuffer(fb_info) < 0) { if (register_framebuffer(fb_info) < 0) {
......
...@@ -951,7 +951,7 @@ static void xgifb_read_vbios(struct pci_dev *pdev, ...@@ -951,7 +951,7 @@ static void xgifb_read_vbios(struct pci_dev *pdev,
pVBInfo->IF_DEF_LVDS = 0; pVBInfo->IF_DEF_LVDS = 0;
vbios = xgifb_copy_rom(pdev, &vbios_size); vbios = xgifb_copy_rom(pdev, &vbios_size);
if (vbios == NULL) { if (vbios == NULL) {
dev_err(&pdev->dev, "video BIOS not available\n"); dev_err(&pdev->dev, "Video BIOS not available\n");
return; return;
} }
if (vbios_size <= 0x65) if (vbios_size <= 0x65)
...@@ -1006,7 +1006,7 @@ static void xgifb_read_vbios(struct pci_dev *pdev, ...@@ -1006,7 +1006,7 @@ static void xgifb_read_vbios(struct pci_dev *pdev,
pVBInfo->IF_DEF_LVDS = 1; pVBInfo->IF_DEF_LVDS = 1;
return; return;
error: error:
dev_err(&pdev->dev, "video BIOS corrupted\n"); dev_err(&pdev->dev, "Video BIOS corrupted\n");
vfree(vbios); vfree(vbios);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment