Commit 6aa1ead1 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Dave Airlie

gma500: psbfb_create(): move depth initialization out of loop

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 026abc33
...@@ -391,6 +391,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, ...@@ -391,6 +391,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
mode_cmd.width = sizes->surface_width; mode_cmd.width = sizes->surface_width;
mode_cmd.height = sizes->surface_height; mode_cmd.height = sizes->surface_height;
bpp = sizes->surface_bpp; bpp = sizes->surface_bpp;
depth = sizes->surface_depth;
/* No 24bit packed */ /* No 24bit packed */
if (bpp == 24) if (bpp == 24)
...@@ -403,7 +404,6 @@ static int psbfb_create(struct psb_fbdev *fbdev, ...@@ -403,7 +404,6 @@ static int psbfb_create(struct psb_fbdev *fbdev,
* is ok with some fonts * is ok with some fonts
*/ */
mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096 >> pitch_lines); mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096 >> pitch_lines);
depth = sizes->surface_depth;
size = mode_cmd.pitches[0] * mode_cmd.height; size = mode_cmd.pitches[0] * mode_cmd.height;
size = ALIGN(size, PAGE_SIZE); size = ALIGN(size, PAGE_SIZE);
......
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