Commit f92d39e9 authored by Timur Tabi's avatar Timur Tabi Committed by Florian Tobias Schandinat

fbdev: fix indentation in modedb.c

Fix the incorrect indentation in functions fb_try_mode() and fb_find_mode().
Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent a67472ad
...@@ -493,7 +493,8 @@ static int fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info, ...@@ -493,7 +493,8 @@ static int fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info,
{ {
int err = 0; int err = 0;
DPRINTK("Trying mode %s %dx%d-%d@%d\n", mode->name ? mode->name : "noname", DPRINTK("Trying mode %s %dx%d-%d@%d\n",
mode->name ? mode->name : "noname",
mode->xres, mode->yres, bpp, mode->refresh); mode->xres, mode->yres, bpp, mode->refresh);
var->xres = mode->xres; var->xres = mode->xres;
var->yres = mode->yres; var->yres = mode->yres;
...@@ -588,7 +589,8 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -588,7 +589,8 @@ int fb_find_mode(struct fb_var_screeninfo *var,
unsigned int namelen = strlen(name); unsigned int namelen = strlen(name);
int res_specified = 0, bpp_specified = 0, refresh_specified = 0; int res_specified = 0, bpp_specified = 0, refresh_specified = 0;
unsigned int xres = 0, yres = 0, bpp = default_bpp, refresh = 0; unsigned int xres = 0, yres = 0, bpp = default_bpp, refresh = 0;
int yres_specified = 0, cvt = 0, rb = 0, interlace = 0, margins = 0; int yres_specified = 0, cvt = 0, rb = 0, interlace = 0;
int margins = 0;
u32 best, diff, tdiff; u32 best, diff, tdiff;
for (i = namelen-1; i >= 0; i--) { for (i = namelen-1; i >= 0; i--) {
...@@ -597,7 +599,8 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -597,7 +599,8 @@ int fb_find_mode(struct fb_var_screeninfo *var,
namelen = i; namelen = i;
if (!refresh_specified && !bpp_specified && if (!refresh_specified && !bpp_specified &&
!yres_specified) { !yres_specified) {
refresh = simple_strtol(&name[i+1], NULL, 10); refresh = simple_strtol(&name[i+1], NULL,
10);
refresh_specified = 1; refresh_specified = 1;
if (cvt || rb) if (cvt || rb)
cvt = 0; cvt = 0;
...@@ -607,7 +610,8 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -607,7 +610,8 @@ int fb_find_mode(struct fb_var_screeninfo *var,
case '-': case '-':
namelen = i; namelen = i;
if (!bpp_specified && !yres_specified) { if (!bpp_specified && !yres_specified) {
bpp = simple_strtol(&name[i+1], NULL, 10); bpp = simple_strtol(&name[i+1], NULL,
10);
bpp_specified = 1; bpp_specified = 1;
if (cvt || rb) if (cvt || rb)
cvt = 0; cvt = 0;
...@@ -616,7 +620,8 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -616,7 +620,8 @@ int fb_find_mode(struct fb_var_screeninfo *var,
break; break;
case 'x': case 'x':
if (!yres_specified) { if (!yres_specified) {
yres = simple_strtol(&name[i+1], NULL, 10); yres = simple_strtol(&name[i+1], NULL,
10);
yres_specified = 1; yres_specified = 1;
} else } else
goto done; goto done;
...@@ -653,9 +658,10 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -653,9 +658,10 @@ int fb_find_mode(struct fb_var_screeninfo *var,
int ret; int ret;
DPRINTK("CVT mode %dx%d@%dHz%s%s%s\n", xres, yres, DPRINTK("CVT mode %dx%d@%dHz%s%s%s\n", xres, yres,
(refresh) ? refresh : 60, (rb) ? " reduced blanking" : (refresh) ? refresh : 60,
"", (margins) ? " with margins" : "", (interlace) ? (rb) ? " reduced blanking" : "",
" interlaced" : ""); (margins) ? " with margins" : "",
(interlace) ? " interlaced" : "");
memset(&cvt_mode, 0, sizeof(cvt_mode)); memset(&cvt_mode, 0, sizeof(cvt_mode));
cvt_mode.xres = xres; cvt_mode.xres = xres;
...@@ -678,15 +684,16 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -678,15 +684,16 @@ int fb_find_mode(struct fb_var_screeninfo *var,
} }
DPRINTK("Trying specified video mode%s %ix%i\n", DPRINTK("Trying specified video mode%s %ix%i\n",
refresh_specified ? "" : " (ignoring refresh rate)", xres, yres); refresh_specified ? "" : " (ignoring refresh rate)",
xres, yres);
if (!refresh_specified) { if (!refresh_specified) {
/* /*
* If the caller has provided a custom mode database and a * If the caller has provided a custom mode database and
* valid monspecs structure, we look for the mode with the * a valid monspecs structure, we look for the mode with
* highest refresh rate. Otherwise we play it safe it and * the highest refresh rate. Otherwise we play it safe
* try to find a mode with a refresh rate closest to the * it and try to find a mode with a refresh rate closest
* standard 60 Hz. * to the standard 60 Hz.
*/ */
if (db != modedb && if (db != modedb &&
info->monspecs.vfmin && info->monspecs.vfmax && info->monspecs.vfmin && info->monspecs.vfmax &&
...@@ -704,16 +711,15 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -704,16 +711,15 @@ int fb_find_mode(struct fb_var_screeninfo *var,
if ((name_matches(db[i], name, namelen) || if ((name_matches(db[i], name, namelen) ||
(res_specified && res_matches(db[i], xres, yres))) && (res_specified && res_matches(db[i], xres, yres))) &&
!fb_try_mode(var, info, &db[i], bpp)) { !fb_try_mode(var, info, &db[i], bpp)) {
if (refresh_specified && db[i].refresh == refresh) { if (refresh_specified && db[i].refresh == refresh)
return 1; return 1;
} else {
if (abs(db[i].refresh - refresh) < diff) { if (abs(db[i].refresh - refresh) < diff) {
diff = abs(db[i].refresh - refresh); diff = abs(db[i].refresh - refresh);
best = i; best = i;
} }
} }
} }
}
if (best != -1) { if (best != -1) {
fb_try_mode(var, info, &db[best], bpp); fb_try_mode(var, info, &db[best], bpp);
return (refresh_specified) ? 2 : 1; return (refresh_specified) ? 2 : 1;
......
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