Commit 46d86f3b authored by Thomas Zimmermann's avatar Thomas Zimmermann

fbdev/sh7760fb: Output messages with fb_dbg()

Fix cases were output helpers are called with struct fb_info.dev.
Use fb_dbg() instead. Prepares fbdev for making struct fb_info.dev
optional.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-27-tzimmermann@suse.de
parent f08c6c53
...@@ -207,7 +207,7 @@ static int sh7760fb_set_par(struct fb_info *info) ...@@ -207,7 +207,7 @@ static int sh7760fb_set_par(struct fb_info *info)
/* rotate only works with xres <= 320 */ /* rotate only works with xres <= 320 */
if (par->rot && (vm->xres > 320)) { if (par->rot && (vm->xres > 320)) {
dev_dbg(info->dev, "rotation disabled due to display size\n"); fb_dbg(info, "rotation disabled due to display size\n");
par->rot = 0; par->rot = 0;
} }
...@@ -226,7 +226,7 @@ static int sh7760fb_set_par(struct fb_info *info) ...@@ -226,7 +226,7 @@ static int sh7760fb_set_par(struct fb_info *info)
if (ret) if (ret)
return ret; return ret;
dev_dbg(info->dev, "%dx%d %dbpp %s (orientation %s)\n", hdcn, fb_dbg(info, "%dx%d %dbpp %s (orientation %s)\n", hdcn,
vdln, bpp, gray ? "grayscale" : "color", vdln, bpp, gray ? "grayscale" : "color",
par->rot ? "rotated" : "normal"); par->rot ? "rotated" : "normal");
...@@ -306,7 +306,7 @@ static int sh7760fb_set_par(struct fb_info *info) ...@@ -306,7 +306,7 @@ static int sh7760fb_set_par(struct fb_info *info)
if (((ldmtr & 0x003f) >= LDMTR_DSTN_MONO_8) && if (((ldmtr & 0x003f) >= LDMTR_DSTN_MONO_8) &&
((ldmtr & 0x003f) <= LDMTR_DSTN_COLOR_16)) { ((ldmtr & 0x003f) <= LDMTR_DSTN_COLOR_16)) {
dev_dbg(info->dev, " ***** DSTN untested! *****\n"); fb_dbg(info, " ***** DSTN untested! *****\n");
dstn_off = stride; dstn_off = stride;
if (par->rot) if (par->rot)
...@@ -326,17 +326,17 @@ static int sh7760fb_set_par(struct fb_info *info) ...@@ -326,17 +326,17 @@ static int sh7760fb_set_par(struct fb_info *info)
sh7760fb_blank(FB_BLANK_UNBLANK, info); /* panel on! */ sh7760fb_blank(FB_BLANK_UNBLANK, info); /* panel on! */
dev_dbg(info->dev, "hdcn : %6d htcn : %6d\n", hdcn, htcn); fb_dbg(info, "hdcn : %6d htcn : %6d\n", hdcn, htcn);
dev_dbg(info->dev, "hsynw : %6d hsynp : %6d\n", hsynw, hsynp); fb_dbg(info, "hsynw : %6d hsynp : %6d\n", hsynw, hsynp);
dev_dbg(info->dev, "vdln : %6d vtln : %6d\n", vdln, vtln); fb_dbg(info, "vdln : %6d vtln : %6d\n", vdln, vtln);
dev_dbg(info->dev, "vsynw : %6d vsynp : %6d\n", vsynw, vsynp); fb_dbg(info, "vsynw : %6d vsynp : %6d\n", vsynw, vsynp);
dev_dbg(info->dev, "clksrc: %6d clkdiv: %6d\n", fb_dbg(info, "clksrc: %6d clkdiv: %6d\n",
(par->pd->ldickr >> 12) & 3, par->pd->ldickr & 0x1f); (par->pd->ldickr >> 12) & 3, par->pd->ldickr & 0x1f);
dev_dbg(info->dev, "ldpmmr: 0x%04x ldpspr: 0x%04x\n", par->pd->ldpmmr, fb_dbg(info, "ldpmmr: 0x%04x ldpspr: 0x%04x\n", par->pd->ldpmmr,
par->pd->ldpspr); par->pd->ldpspr);
dev_dbg(info->dev, "ldmtr : 0x%04x lddfr : 0x%04x\n", ldmtr, lddfr); fb_dbg(info, "ldmtr : 0x%04x lddfr : 0x%04x\n", ldmtr, lddfr);
dev_dbg(info->dev, "ldlaor: %ld\n", stride); fb_dbg(info, "ldlaor: %ld\n", stride);
dev_dbg(info->dev, "ldsaru: 0x%08lx ldsarl: 0x%08lx\n", sbase, ldsarl); fb_dbg(info, "ldsaru: 0x%08lx ldsarl: 0x%08lx\n", sbase, ldsarl);
return 0; return 0;
} }
...@@ -401,7 +401,7 @@ static int sh7760fb_alloc_mem(struct fb_info *info) ...@@ -401,7 +401,7 @@ static int sh7760fb_alloc_mem(struct fb_info *info)
} else if (bpp > 8) } else if (bpp > 8)
vram *= 2; vram *= 2;
if ((vram < 1) || (vram > 1024 * 2048)) { if ((vram < 1) || (vram > 1024 * 2048)) {
dev_dbg(info->dev, "too much VRAM required. Check settings\n"); fb_dbg(info, "too much VRAM required. Check settings\n");
return -ENODEV; return -ENODEV;
} }
......
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