Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304275
b: refs/heads/master
c: f9e5de0
h: refs/heads/master
i:
  304273: f1beea9
  304271: 5bcff9c
v: v3
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Apr 10, 2012
1 parent 2c669de commit bbfc34e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f47f12d62141b39581e6e099c2210b5ae5b4ab0c
refs/heads/master: f9e5de0f175d114a850630f4e86a2eed4f7a7a75
27 changes: 17 additions & 10 deletions trunk/drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,19 +390,26 @@ static int XGIfb_GetXG21DefaultLVDSModeIdx(struct xgifb_video_info *xgifb_info)
static void XGIfb_search_mode(struct xgifb_video_info *xgifb_info,
const char *name)
{
int i = 0, j = 0, l;
unsigned int xres;
unsigned int yres;
unsigned int bpp;
int i;

while (XGIbios_mode[i].mode_no != 0) {
l = min(strlen(name), strlen(XGIbios_mode[i].name));
if (!strncmp(name, XGIbios_mode[i].name, l)) {
if (sscanf(name, "%ux%ux%u", &xres, &yres, &bpp) != 3)
goto invalid_mode;

if (bpp == 24)
bpp = 32; /* That's for people who mix up color and fb depth. */

for (i = 0; XGIbios_mode[i].mode_no != 0; i++)
if (XGIbios_mode[i].xres == xres &&
XGIbios_mode[i].yres == yres &&
XGIbios_mode[i].bpp == bpp) {
xgifb_info->mode_idx = i;
j = 1;
break;
return;
}
i++;
}
if (!j)
pr_info("Invalid mode '%s'\n", name);
invalid_mode:
pr_info("Invalid mode '%s'\n", name);
}

static void XGIfb_search_vesamode(struct xgifb_video_info *xgifb_info,
Expand Down

0 comments on commit bbfc34e

Please sign in to comment.