Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 240409 Details for
Bug 296539
Uvesafb fails on 2.6.32-gentoo
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to fix the problem.
uvesafb_fix.patch (text/plain), 2.67 KB, created by
Michal Januszewski (RETIRED)
on 2010-07-28 11:44:59 UTC
(
hide
)
Description:
A patch to fix the problem.
Filename:
MIME Type:
Creator:
Michal Januszewski (RETIRED)
Created:
2010-07-28 11:44:59 UTC
Size:
2.67 KB
patch
obsolete
>diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c >index 0a4dbdc..f61ddb7 100644 >--- a/drivers/video/modedb.c >+++ b/drivers/video/modedb.c >@@ -636,8 +636,9 @@ done: > if (refresh_specified && db[i].refresh == refresh) { > return 1; > } else { >- if (abs(db[i].refresh - refresh) < diff) { >- diff = abs(db[i].refresh - refresh); >+ tdiff = abs((signed)(db[i].refresh - refresh)); >+ if (tdiff < diff) { >+ diff = tdiff; > best = i; > } > } >@@ -654,9 +655,8 @@ done: > for (i = 0; i < dbsize; i++) { > DPRINTK("Trying %ix%i\n", db[i].xres, db[i].yres); > if (!fb_try_mode(var, info, &db[i], bpp)) { >- tdiff = abs(db[i].xres - xres) + >- abs(db[i].yres - yres); >- >+ tdiff = abs((signed)(db[i].xres - xres)) + >+ abs((signed)(db[i].yres - yres)); > /* > * Penalize modes with resolutions smaller > * than requested. >@@ -851,13 +851,13 @@ const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, > modelist = list_entry(pos, struct fb_modelist, list); > cmode = &modelist->mode; > >- d = abs(cmode->xres - mode->xres) + >- abs(cmode->yres - mode->yres); >+ d = abs((signed)(cmode->xres - mode->xres)) + >+ abs((signed)(cmode->yres - mode->yres)); > if (diff > d) { > diff = d; > best = cmode; > } else if (diff == d) { >- d = abs(cmode->refresh - mode->refresh); >+ d = abs((signed)(cmode->refresh - mode->refresh)); > if (diff_refresh > d) { > diff_refresh = d; > best = cmode; >diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c >index 7b8839e..8ed1012 100644 >--- a/drivers/video/uvesafb.c >+++ b/drivers/video/uvesafb.c >@@ -317,12 +317,13 @@ static void uvesafb_setup_var(struct fb_var_screeninfo *var, > static int uvesafb_vbe_find_mode(struct uvesafb_par *par, > int xres, int yres, int depth, unsigned char flags) > { >- int i, match = -1, h = 0, d = 0x7fffffff; >+ int i, match = -1; >+ unsigned int h = 0, d = UINT_MAX; > > for (i = 0; i < par->vbe_modes_cnt; i++) { >- h = abs(par->vbe_modes[i].x_res - xres) + >- abs(par->vbe_modes[i].y_res - yres) + >- abs(depth - par->vbe_modes[i].depth); >+ h = abs((signed)(par->vbe_modes[i].x_res - xres)) + >+ abs((signed)(par->vbe_modes[i].y_res - yres)) + >+ abs((signed)(depth - par->vbe_modes[i].depth)); > > /* > * We have an exact match in terms of resolution >@@ -1375,7 +1376,7 @@ static int uvesafb_check_var(struct fb_var_screeninfo *var, > * which is theoretically incorrect, but which we'll try to handle > * here. > */ >- if (depth == 0 || abs(depth - var->bits_per_pixel) >= 8) >+ if (depth == 0 || abs((signed)(depth - var->bits_per_pixel)) >= 8) > depth = var->bits_per_pixel; > > match = uvesafb_vbe_find_mode(par, var->xres, var->yres, depth,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 296539
:
232545
|
240249
|
240313
|
240365
|
240379
|
240409
|
263871