mirror of https://gitee.com/openkylin/linux.git
staging: sm750fb: replace PADDING macro with ALIGN
The custom macro PADDING differs from standard kernel ALIGN only in parameters order. Replace PADDING with ALIGN and remove it's definition. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6732071c25
commit
e3a3f9f512
|
@ -331,7 +331,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
|
|||
|
||||
/* fix structur is not so FIX ... */
|
||||
line_length = var->xres_virtual * var->bits_per_pixel / 8;
|
||||
line_length = PADDING(crtc->line_pad, line_length);
|
||||
line_length = ALIGN(line_length, crtc->line_pad);
|
||||
fix->line_length = line_length;
|
||||
pr_info("fix->line_length = %d\n", fix->line_length);
|
||||
|
||||
|
@ -574,7 +574,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
|
|||
request = var->xres_virtual * (var->bits_per_pixel >> 3);
|
||||
/* defaulty crtc->channel go with par->index */
|
||||
|
||||
request = PADDING(crtc->line_pad, request);
|
||||
request = ALIGN(request, crtc->line_pad);
|
||||
request = request * var->yres_virtual;
|
||||
if (crtc->vidmem_size < request) {
|
||||
pr_err("not enough video memory for mode\n");
|
||||
|
@ -865,8 +865,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
|
|||
par->info = info;
|
||||
|
||||
/* set info */
|
||||
line_length = PADDING(crtc->line_pad,
|
||||
(var->xres_virtual * var->bits_per_pixel / 8));
|
||||
line_length = ALIGN((var->xres_virtual * var->bits_per_pixel / 8),
|
||||
crtc->line_pad);
|
||||
|
||||
info->pseudo_palette = &par->pseudo_palette[0];
|
||||
info->screen_base = crtc->vScreen;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#define FB_ACCEL_SMI 0xab
|
||||
|
||||
#define MHZ(x) ((x) * 1000000)
|
||||
/* align should be 2,4,8,16 */
|
||||
#define PADDING(align, data) (((data)+(align)-1)&(~((align) - 1)))
|
||||
extern int smi_indent;
|
||||
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
|
|||
|
||||
reg = var->xres * (var->bits_per_pixel >> 3);
|
||||
/* crtc->channel is not equal to par->index on numeric,be aware of that */
|
||||
reg = PADDING(crtc->line_pad, reg);
|
||||
reg = ALIGN(reg, crtc->line_pad);
|
||||
|
||||
POKE32(PANEL_FB_WIDTH,
|
||||
FIELD_VALUE(0, PANEL_FB_WIDTH, WIDTH, reg)|
|
||||
|
@ -362,7 +362,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
|
|||
POKE32(CRT_FB_ADDRESS, crtc->oScreen);
|
||||
reg = var->xres * (var->bits_per_pixel >> 3);
|
||||
/* crtc->channel is not equal to par->index on numeric,be aware of that */
|
||||
reg = PADDING(crtc->line_pad, reg);
|
||||
reg = ALIGN(reg, crtc->line_pad);
|
||||
|
||||
POKE32(CRT_FB_WIDTH,
|
||||
FIELD_VALUE(0, CRT_FB_WIDTH, WIDTH, reg)|
|
||||
|
|
Loading…
Reference in New Issue