staging: sm750fb: Edits CamelCase in sm750 files
Subsystems (2)
PATCH 1/1 staging: sm750fb: Edits CamelCase in sm750 files
Edits CamelCase in dependent sm750 files.
Issue found by checkpatch.
Signed-off-by Jamal Shareef <[email protected]>
--- drivers/staging/sm750fb/sm750.c | 144 ++++++++++++------------- drivers/staging/sm750fb/sm750.h | 70 ++++++------ drivers/staging/sm750fb/sm750_accel.c | 139 ++++++++++++------------ drivers/staging/sm750fb/sm750_accel.h | 26 ++--- drivers/staging/sm750fb/sm750_cursor.c | 18 ++-- drivers/staging/sm750fb/sm750_cursor.h | 10 +- drivers/staging/sm750fb/sm750_hw.c | 66 ++++++------ 7 files changed, 237 insertions(+), 236 deletions(-)
drivers/staging/sm750fb/sm750.c +72 -72
@@ -112,22 +112,22 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) crtc = &par->crtc; cursor = &crtc->cursor; -if (fbcursor->image.width > cursor->maxW || - fbcursor->image.height > cursor->maxH || +if (fbcursor->image.width > cursor->max_w || + fbcursor->image.height > cursor->max_h || fbcursor->image.depth >1 ) {return -ENXIO ; }sm750_hw_cursor_disable (cursor);if (fbcursor->set &FB_CUR_SETSIZE ) -sm750_hw_cursor_setSize (cursor, - fbcursor->image.width, - fbcursor->image.height); +sm750_hw_cursor_set_size (cursor, + fbcursor->image.width, + fbcursor->image.height);if (fbcursor->set &FB_CUR_SETPOS ) -sm750_hw_cursor_setPos (cursor, - fbcursor->image.dx - info->var.xoffset, - fbcursor->image.dy - info->var.yoffset); +sm750_hw_cursor_set_pos (cursor, + fbcursor->image.dx - info->var.xoffset, + fbcursor->image.dy - info->var.yoffset);if (fbcursor->set &FB_CUR_SETCMAP ) {/* get the 16bit color of kernel means */
@@ -141,14 +141,14 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) ((info->cmap.green[fbcursor->image.bg_color] &0xfc00 ) >>5 ) | ((info->cmap.blue[fbcursor->image.bg_color] &0xf800 ) >>11 ); -sm750_hw_cursor_setColor (cursor, fg, bg); +sm750_hw_cursor_set_color (cursor, fg, bg); }if (fbcursor->set & (FB_CUR_SETSHAPE |FB_CUR_SETIMAGE )) { -sm750_hw_cursor_setData (cursor, - fbcursor->rop, - fbcursor->image.data, - fbcursor->mask); +sm750_hw_cursor_set_data (cursor, + fbcursor->rop, + fbcursor->image.data, + fbcursor->mask); }if (fbcursor->enable)
@@ -162,7 +162,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info, {struct lynxfb_par *par;struct sm750_dev *sm750_dev; -unsigned int base, pitch, Bpp, rop; +unsigned int base, pitch, bpp, rop;u32 color;if (info->state !=FBINFO_STATE_RUNNING )
@@ -175,11 +175,11 @@ static void lynxfb_ops_fillrect(struct fb_info *info,* each time 2d function begin to work,below three variable always need * be set, seems we can put them together in some place */ - base = par->crtc.oScreen; + base = par->crtc.o_screen; pitch = info->fix.line_length; - Bpp = info->var.bits_per_pixel >>3 ; + bpp = info->var.bits_per_pixel >>3 ; - color = (Bpp ==1 ) ? region->color : + color = (bpp ==1 ) ? region->color : ((u32 *)info->pseudo_palette)[region->color]; rop = (region->rop !=ROP_COPY ) ?HW_ROP2_XOR :HW_ROP2_COPY ;
@@ -192,7 +192,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info,spin_lock (&sm750_dev->slock); sm750_dev->accel.de_fillrect (&sm750_dev->accel, - base, pitch, Bpp, + base, pitch, bpp, region->dx, region->dy, region->width, region->height, color, rop);
@@ -204,7 +204,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info, {struct lynxfb_par *par;struct sm750_dev *sm750_dev; -unsigned int base, pitch, Bpp; +unsigned int base, pitch, bpp; par = info->par; sm750_dev = par->dev;
@@ -213,9 +213,9 @@ static void lynxfb_ops_copyarea(struct fb_info *info,* each time 2d function begin to work,below three variable always need * be set, seems we can put them together in some place */ - base = par->crtc.oScreen; + base = par->crtc.o_screen; pitch = info->fix.line_length; - Bpp = info->var.bits_per_pixel >>3 ; + bpp = info->var.bits_per_pixel >>3 ;/* * If not use spin_lock, system will die if user load driver
@@ -227,7 +227,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info, sm750_dev->accel.de_copyarea (&sm750_dev->accel, base, pitch, region->sx, region->sy, - base, pitch, Bpp, region->dx, region->dy, + base, pitch, bpp, region->dx, region->dy, region->width, region->height,HW_ROP2_COPY );spin_unlock (&sm750_dev->slock);
@@ -236,7 +236,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info,static void lynxfb_ops_imageblit (struct fb_info *info,const struct fb_image *image) { -unsigned int base, pitch, Bpp; +unsigned int base, pitch, bpp;unsigned int fgcol, bgcol;struct lynxfb_par *par;struct sm750_dev *sm750_dev;
@@ -247,9 +247,9 @@ static void lynxfb_ops_imageblit(struct fb_info *info,* each time 2d function begin to work,below three variable always need * be set, seems we can put them together in some place */ - base = par->crtc.oScreen; + base = par->crtc.o_screen; pitch = info->fix.line_length; - Bpp = info->var.bits_per_pixel >>3 ; + bpp = info->var.bits_per_pixel >>3 ;/* TODO: Implement hardware acceleration for image->depth > 1 */ if (image->depth !=1 ) {
@@ -276,7 +276,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info, sm750_dev->accel.de_imageblit (&sm750_dev->accel, image->data, image->width >>3 ,0 , - base, pitch, Bpp, + base, pitch, bpp, image->dx, image->dy, image->width, image->height, fgcol, bgcol,HW_ROP2_COPY );
@@ -372,9 +372,9 @@ static int lynxfb_ops_set_par(struct fb_info *info)pr_err ("pixel bpp format not satisfied\n." );return ret; } - ret =hw_sm750_crtc_setMode (crtc, var, fix); + ret =hw_sm750_crtc_set_mode (crtc, var, fix);if (!ret) - ret =hw_sm750_output_setMode (output, var, fix); + ret =hw_sm750_output_set_mode (output, var, fix);return ret; }
@@ -483,7 +483,7 @@ static int lynxfb_resume(struct pci_dev *pdev) crtc = &par->crtc; cursor = &crtc->cursor;memset_io (cursor->vstart,0x0 , cursor->size); -memset_io (crtc->vScreen,0x0 , crtc->vidmem_size); +memset_io (crtc->v_screen,0x0 , crtc->vidmem_size);lynxfb_ops_set_par (info);fb_set_suspend (info,0 ); }
@@ -495,7 +495,7 @@ static int lynxfb_resume(struct pci_dev *pdev) crtc = &par->crtc; cursor = &crtc->cursor;memset_io (cursor->vstart,0x0 , cursor->size); -memset_io (crtc->vScreen,0x0 , crtc->vidmem_size); +memset_io (crtc->v_screen,0x0 , crtc->vidmem_size);lynxfb_ops_set_par (info);fb_set_suspend (info,0 ); }
@@ -574,7 +574,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,return -ENOMEM ; } -return hw_sm750_crtc_checkMode (crtc, var); +return hw_sm750_crtc_check_mode (crtc, var); } static int lynxfb_ops_setcolreg(unsigned int regno,
@@ -607,7 +607,7 @@ static int lynxfb_ops_setcolreg(unsigned int regno, red >>=8 ; green >>=8 ; blue >>=8 ; - ret =hw_sm750_setColReg (crtc, regno, red, green, blue); + ret =hw_sm750_set_col_reg (crtc, regno, red, green, blue); goto exit; }
@@ -639,7 +639,7 @@ static int lynxfb_ops_blank(int blank, struct fb_info *info)pr_debug ("blank = %d.\n" , blank); par = info->par; output = &par->output; -return output->proc_setBLANK (output, blank); +return output->proc_set_blank (output, blank); }static int sm750fb_set_drv (struct lynxfb_par *par)
@@ -660,62 +660,62 @@ static int sm750fb_set_drv(struct lynxfb_par *par) crtc->vidmem_size >>=1 ;/* setup crtc and output member */ - sm750_dev->hwCursor = g_hwcursor; + sm750_dev->hw_cursor = g_hwcursor; crtc->line_pad =16 ; crtc->xpanstep =8 ; crtc->ypanstep =1 ; crtc->ywrapstep =0 ; - output->proc_setBLANK = (sm750_dev->revid ==SM750LE_REVISION_ID ) ? - hw_sm750le_setBLANK : hw_sm750_setBLANK; + output->proc_set_blank = (sm750_dev->revid ==SM750LE_REVISION_ID ) ? + hw_sm750le_set_blank : hw_sm750_set_blank;/* chip specific phase */ sm750_dev->accel.de_wait = (sm750_dev->revid ==SM750LE_REVISION_ID ) ? - hw_sm750le_deWait : hw_sm750_deWait; + hw_sm750le_de_wait : hw_sm750_de_wait;switch (sm750_dev->dataflow) {case sm750_simul_pri: output->paths = sm750_pnc; crtc->channel = sm750_primary; - crtc->oScreen =0 ; - crtc->vScreen = sm750_dev->pvMem; + crtc->o_screen =0 ; + crtc->v_screen = sm750_dev->v_mem;pr_info ("use simul primary mode\n" );break ;case sm750_simul_sec: output->paths = sm750_pnc; crtc->channel = sm750_secondary; - crtc->oScreen =0 ; - crtc->vScreen = sm750_dev->pvMem; + crtc->o_screen =0 ; + crtc->v_screen = sm750_dev->v_mem;break ;case sm750_dual_normal:if (par->index ==0 ) { output->paths = sm750_panel; crtc->channel = sm750_primary; - crtc->oScreen =0 ; - crtc->vScreen = sm750_dev->pvMem; + crtc->o_screen =0 ; + crtc->v_screen = sm750_dev->v_mem; }else { output->paths = sm750_crt; crtc->channel = sm750_secondary; -/* not consider of padding stuffs for oScreen, +/* not consider of padding stuffs for o_screen, * need fix */ - crtc->oScreen = sm750_dev->vidmem_size >>1 ; - crtc->vScreen = sm750_dev->pvMem + crtc->oScreen; + crtc->o_screen = sm750_dev->vidmem_size >>1 ; + crtc->v_screen = sm750_dev->v_mem + crtc->o_screen; }break ;case sm750_dual_swap:if (par->index ==0 ) { output->paths = sm750_panel; crtc->channel = sm750_secondary; - crtc->oScreen =0 ; - crtc->vScreen = sm750_dev->pvMem; + crtc->o_screen =0 ; + crtc->v_screen = sm750_dev->v_mem; }else { output->paths = sm750_crt; crtc->channel = sm750_primary; -/* not consider of padding stuffs for oScreen, +/* not consider of padding stuffs for o_screen, * need fix */ - crtc->oScreen = sm750_dev->vidmem_size >>1 ; - crtc->vScreen = sm750_dev->pvMem + crtc->oScreen; + crtc->o_screen = sm750_dev->vidmem_size >>1 ; + crtc->v_screen = sm750_dev->v_mem + crtc->o_screen; }break ;default :
@@ -758,7 +758,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) "kernel HELPERS prepared vesa_modes", }; -static const char *fixId[2 ] = { +static const char *fix_id[2 ] = {"sm750_fb1" ,"sm750_fb2" , };
@@ -782,14 +782,14 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)* set current cursor variable and proc pointer, * must be set after crtc member initialized */ - crtc->cursor.offset = crtc->oScreen + crtc->vidmem_size -1024 ; - crtc->cursor.mmio = sm750_dev->pvReg + + crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size -1024 ; + crtc->cursor.mmio = sm750_dev->v_reg +0x800f0 + (int )crtc->channel *0x140 ;pr_info ("crtc->cursor.mmio = %p\n" , crtc->cursor.mmio); - crtc->cursor.maxH = crtc->cursor.maxW =64 ; - crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW *2 /8 ; - crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset; + crtc->cursor.max_h = crtc->cursor.max_w =64 ; + crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w *2 /8 ; + crtc->cursor.vstart = sm750_dev->v_mem + crtc->cursor.offset;memset_io (crtc->cursor.vstart,0 , crtc->cursor.size);if (!g_hwcursor) {
@@ -865,7 +865,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) crtc->line_pad); info->pseudo_palette = &par->pseudo_palette[0 ]; - info->screen_base = crtc->vScreen; + info->screen_base = crtc->v_screen;pr_debug ("screen_base vaddr = %p\n" , info->screen_base); info->screen_size = line_length * var->yres_virtual; info->flags =FBINFO_FLAG_DEFAULT |0 ;
@@ -878,9 +878,9 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) fix->ywrapstep = crtc->ywrapstep; fix->accel =FB_ACCEL_SMI ; -strlcpy (fix->id, fixId[index],sizeof (fix->id)); +strlcpy (fix->id, fix_id[index],sizeof (fix->id)); - fix->smem_start = crtc->oScreen + sm750_dev->vidmem_start; + fix->smem_start = crtc->o_screen + sm750_dev->vidmem_start;pr_info ("fix->smem_start = %lx\n" , fix->smem_start);/* * according to mmap experiment from user space application,
@@ -941,12 +941,12 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src) swap =0 ; - sm750_dev->initParm.chip_clk =0 ; - sm750_dev->initParm.mem_clk =0 ; - sm750_dev->initParm.master_clk =0 ; - sm750_dev->initParm.powerMode =0 ; - sm750_dev->initParm.setAllEngOff =0 ; - sm750_dev->initParm.resetMemory =1 ; + sm750_dev->init_parm.chip_clk =0 ; + sm750_dev->init_parm.mem_clk =0 ; + sm750_dev->init_parm.master_clk =0 ; + sm750_dev->init_parm.power_mode =0 ; + sm750_dev->init_parm.set_all_eng_off =0 ; + sm750_dev->init_parm.reset_memory =1 ;/* defaultly turn g_hwcursor on for both view */ g_hwcursor =3 ;
@@ -965,11 +965,11 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src) }else if (!strncmp (opt,"nocrt" ,strlen ("nocrt" ))) { sm750_dev->nocrt =1 ; }else if (!strncmp (opt,"36bit" ,strlen ("36bit" ))) { - sm750_dev->pnltype = sm750_doubleTFT; + sm750_dev->pnltype = sm750_double_TFT; }else if (!strncmp (opt,"18bit" ,strlen ("18bit" ))) { - sm750_dev->pnltype = sm750_dualTFT; + sm750_dev->pnltype = sm750_dual_TFT; }else if (!strncmp (opt,"24bit" ,strlen ("24bit" ))) { - sm750_dev->pnltype = sm750_24TFT; + sm750_dev->pnltype = sm750_24_TFT; }else if (!strncmp (opt,"nohwc0" ,strlen ("nohwc0" ))) { g_hwcursor &= ~0x1 ; }else if (!strncmp (opt,"nohwc1" ,strlen ("nohwc1" ))) {
@@ -1132,7 +1132,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, sm750_dev->mtrr.vram =arch_phys_wc_add (sm750_dev->vidmem_start, sm750_dev->vidmem_size); -memset_io (sm750_dev->pvMem,0 , sm750_dev->vidmem_size); +memset_io (sm750_dev->v_mem,0 , sm750_dev->vidmem_size);pci_set_drvdata (pdev, sm750_dev);
@@ -1163,8 +1163,8 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)sm750fb_framebuffer_release (sm750_dev);arch_phys_wc_del (sm750_dev->mtrr.vram); -iounmap (sm750_dev->pvReg); -iounmap (sm750_dev->pvMem); +iounmap (sm750_dev->v_reg); +iounmap (sm750_dev->v_mem);kfree (g_settings); }
drivers/staging/sm750fb/sm750.h +35 -35
138 lines not on this page · raw message
drivers/staging/sm750fb/sm750_accel.c +70 -69
358 lines not on this page · raw message
drivers/staging/sm750fb/sm750_accel.h +13 -13
@@ -190,18 +190,18 @@ void sm750_hw_set2dformat(struct lynx_accel *accel, int fmt);void sm750_hw_de_init (struct lynx_accel *accel);int sm750_hw_fillrect (struct lynx_accel *accel, -u32 base,u32 pitch,u32 Bpp, +u32 base,u32 pitch,u32 bpp,u32 x,u32 y,u32 width,u32 height,u32 color,u32 rop); int sm750_hw_copyarea( struct lynx_accel *accel, -unsigned int sBase, /* Address of source: offset in frame buffer */ -unsigned int sPitch, /* Pitch value of source surface in BYTE */ +unsigned int s_base, /* Address of source: offset in frame buffer */ +unsigned int s_pitch, /* Pitch value of source surface in BYTE */ unsigned int sx, unsigned int sy, /* Starting coordinate of source surface */ -unsigned int dBase, /* Address of destination: offset in frame buffer */ -unsigned int dPitch, /* Pitch value of destination surface in BYTE */ +unsigned int d_base, /* Address of destination: offset in frame buffer */ +unsigned int d_pitch, /* Pitch value of destination surface in BYTE */ unsigned int bpp, /* Color depth of destination surface */ unsigned int dx, unsigned int dy, /* Starting coordinate of destination surface */
@@ -210,29 +210,29 @@ unsigned int height, /* width and height of rectangle in pixel value */ unsigned int rop2); int sm750_hw_imageblit(struct lynx_accel *accel, - const char *pSrcbuf, /* pointer to start of source buffer in + const char *src_buf, /* pointer to start of source buffer in * system memory */ - u32 srcDelta, /* Pitch value (in bytes) of the source + u32 src_delta, /* Pitch value (in bytes) of the source * buffer, +ive means top down and * -ive means button up */ - u32 startBit, /* Mono data can start at any bit + u32 start_bit, /* Mono data can start at any bit * in a byte, this value should * be 0 to 7 */ - u32 dBase, /* Address of destination: offset in + u32 d_base, /* Address of destination: offset in * frame buffer */ - u32 dPitch, /* Pitch value of destination surface + u32 d_pitch, /* Pitch value of destination surface * in BYTE */ - u32 bytePerPixel, /* Color depth of destination surface */ + u32 byte_per_pixel, /* Color depth of destination surface */ u32 dx, u32 dy, /* Starting coordinate of destination
@@ -243,12 +243,12 @@ int sm750_hw_imageblit(struct lynx_accel *accel,* in pixel value */ -u32 fColor,/* Foreground color +u32 f_color,/* Foreground color * (corresponding to a 1 in the * monochrome data */ - u32 bColor, /* Background color + u32 b_color, /* Background color* (corresponding to a 0 in the * monochrome data */
drivers/staging/sm750fb/sm750_cursor.c +9 -9
@@ -58,13 +58,13 @@ void sm750_hw_cursor_disable(struct lynx_cursor *cursor)poke32 (HWC_ADDRESS ,0 ); } -void sm750_hw_cursor_setSize (struct lynx_cursor *cursor,int w,int h) +void sm750_hw_cursor_set_size (struct lynx_cursor *cursor,int w,int h) { cursor->w = w; cursor->h = h; } -void sm750_hw_cursor_setPos (struct lynx_cursor *cursor,int x,int y) +void sm750_hw_cursor_set_pos (struct lynx_cursor *cursor,int x,int y) {u32 reg;
@@ -73,7 +73,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)poke32 (HWC_LOCATION , reg); } -void sm750_hw_cursor_setColor (struct lynx_cursor *cursor,u32 fg,u32 bg) +void sm750_hw_cursor_set_color (struct lynx_cursor *cursor,u32 fg,u32 bg) {u32 reg = (fg <<HWC_COLOR_12_2_RGB565_SHIFT ) &HWC_COLOR_12_2_RGB565_MASK ;
@@ -82,8 +82,8 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)poke32 (HWC_COLOR_3 ,0xffe0 ); } -void sm750_hw_cursor_setData (struct lynx_cursor *cursor,u16 rop, -const u8 *pcol,const u8 *pmsk) +void sm750_hw_cursor_set_data (struct lynx_cursor *cursor,u16 rop, +const u8 *pcol,const u8 *pmsk) {int i, j, count, pitch, offset;u8 color, mask, opr;
@@ -97,7 +97,7 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h;/* in byte */ - offset = cursor->maxW *2 /8 ; + offset = cursor->max_w *2 /8 ; data =0 ; pstart = cursor->vstart;
@@ -132,8 +132,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, } } -void sm750_hw_cursor_setData2 (struct lynx_cursor *cursor,u16 rop, -const u8 *pcol,const u8 *pmsk) +void sm750_hw_cursor_set_data2 (struct lynx_cursor *cursor,u16 rop, +const u8 *pcol,const u8 *pmsk) {int i, j, count, pitch, offset;u8 color, mask;
@@ -147,7 +147,7 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h;/* in byte */ - offset = cursor->maxW *2 /8 ; + offset = cursor->max_w *2 /8 ; data =0 ; pstart = cursor->vstart;
drivers/staging/sm750fb/sm750_cursor.h +5 -5
@@ -5,14 +5,14 @@/* hw_cursor_xxx works for voyager,718 and 750 */ void sm750_hw_cursor_enable (struct lynx_cursor *cursor);void sm750_hw_cursor_disable (struct lynx_cursor *cursor); -void sm750_hw_cursor_setSize (struct lynx_cursor *cursor, +void sm750_hw_cursor_set_size (struct lynx_cursor *cursor,int w,int h); -void sm750_hw_cursor_setPos (struct lynx_cursor *cursor, +void sm750_hw_cursor_set_pos (struct lynx_cursor *cursor,int x,int y); -void sm750_hw_cursor_setColor (struct lynx_cursor *cursor, +void sm750_hw_cursor_set_color (struct lynx_cursor *cursor,u32 fg,u32 bg); -void sm750_hw_cursor_setData (struct lynx_cursor *cursor, +void sm750_hw_cursor_set_data (struct lynx_cursor *cursor,u16 rop,const u8 *data,const u8 *mask); -void sm750_hw_cursor_setData2 (struct lynx_cursor *cursor, +void sm750_hw_cursor_set_data2 (struct lynx_cursor *cursor,u16 rop,const u8 *data,const u8 *mask);#endif
drivers/staging/sm750fb/sm750_hw.c +33 -33
188 lines not on this page · raw message
Signature · 1 line
2.17.1