Edit CamelCase in sm750fb
Subsystems (2)
v2 cover Edit CamelCase in sm750fb
This patch removes CamelCase in sm750fb files. Patches are organized into groups of dependent files.
Changes in v2:
- Fix merge conflicts with staging-next in Patch 1 and Patch 4
Jamal Shareef (4):
staging: sm750sb: Edit CamelCase in dvi/sii164 files
staging: sm750fb: Edit CamelCase in ddk750_mode files
staging: sm750fb: Edit CamelCase in ddk750_power.h
staging: sm750fb: Edits CamelCase in sm750 files
drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++----- drivers/staging/sm750fb/ddk750_dvi.h | 80 +++++----- drivers/staging/sm750fb/ddk750_mode.c | 86 +++++------ drivers/staging/sm750fb/ddk750_mode.h | 2 +- drivers/staging/sm750fb/ddk750_power.h | 10 +- drivers/staging/sm750fb/ddk750_sii164.c | 185 ++++++++++++------------ drivers/staging/sm750fb/ddk750_sii164.h | 40 ++--- drivers/staging/sm750fb/sm750.c | 144 +++++++++--------- drivers/staging/sm750fb/sm750.h | 70 ++++----- drivers/staging/sm750fb/sm750_accel.c | 143 +++++++++--------- drivers/staging/sm750fb/sm750_accel.h | 26 ++-- drivers/staging/sm750fb/sm750_cursor.c | 18 +-- drivers/staging/sm750fb/sm750_cursor.h | 17 ++- drivers/staging/sm750fb/sm750_hw.c | 68 ++++----- 14 files changed, 486 insertions(+), 471 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/4 staging: sm750sb: Edit CamelCase in dvi/sii164 files
Edits CamelCase naming in a group of dependent
sm750fb files. Issue found by checkpatch.
Removes hungarian notation as well as part of fix to CamelCase in a given word.
---
Changes in v4:
- Revert removal of dviInt function and global variable. The change will be part of a separate patch to handle the removal.
Changes in v3:
- Fix checkpatch warning for multiple blank lines that occured after deleting function and variable.
Changes in v2:
- Remove dviInt function and global variable because they are not used.
- Remove hungarion notation prefixes.
--- drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++----- drivers/staging/sm750fb/ddk750_dvi.h | 80 +++++----- drivers/staging/sm750fb/ddk750_sii164.c | 185 ++++++++++++------------ drivers/staging/sm750fb/ddk750_sii164.h | 40 ++--- 4 files changed, 187 insertions(+), 186 deletions(-)
drivers/staging/sm750fb/ddk750_dvi.c +34 -34
@@ -11,50 +11,50 @@* function API. Please set the function pointer to NULL whenever the function * is not supported. */ -static struct dvi_ctrl_device g_dcftSupportedDviController[] = { +static struct dvi_ctrl_device dcft_supported_dvi_controller[] = { #ifdef DVI_CTRL_SII164 { - .pfnInit = sii164InitChip, - .pfnGetVendorId = sii164GetVendorID, - .pfnGetDeviceId = sii164GetDeviceID, + .init = sii164_init_chip, + .get_vendor_id = sii164_get_vendor_id, + .get_device_id = sii164_get_device_id, #ifdef SII164_FULL_FUNCTIONS - .pfnResetChip = sii164ResetChip, - .pfnGetChipString = sii164GetChipString, - .pfnSetPower = sii164SetPower, - .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection, - .pfnIsConnected = sii164IsConnected, - .pfnCheckInterrupt = sii164CheckInterrupt, - .pfnClearInterrupt = sii164ClearInterrupt, + .reset_chip = sii164_reset_chip, + .get_chip_string = sii164_get_chip_string, + .set_power = sii164_set_power, + .enable_hot_plug_detection = sii164_enable_hot_plug_detection, + .is_connected = sii164_is_connected, + .check_interrupt = sii164_check_interrupt, + .clear_interrupt = sii164_clear_interrupt, #endif }, #endif }; -int dviInit (unsigned char edge_select, -unsigned char bus_select, -unsigned char dual_edge_clk_select, -unsigned char hsync_enable, -unsigned char vsync_enable, -unsigned char deskew_enable, -unsigned char deskew_setting, -unsigned char continuous_sync_enable, -unsigned char pll_filter_enable, -unsigned char pll_filter_value) +int dvi_init (unsigned char edge_select, +unsigned char bus_select, +unsigned char dual_edge_clk_select, +unsigned char hsync_enable, +unsigned char vsync_enable, +unsigned char deskew_enable, +unsigned char deskew_setting, +unsigned char continuous_sync_enable, +unsigned char pll_filter_enable, +unsigned char pll_filter_value) { -struct dvi_ctrl_device *pCurrentDviCtrl; +struct dvi_ctrl_device *current_dvi_ctrl; - pCurrentDviCtrl = g_dcftSupportedDviController; -if (pCurrentDviCtrl->pfnInit) { -return pCurrentDviCtrl->pfnInit (edge_select, - bus_select, - dual_edge_clk_select, - hsync_enable, - vsync_enable, - deskew_enable, - deskew_setting, - continuous_sync_enable, - pll_filter_enable, - pll_filter_value); + current_dvi_ctrl = dcft_supported_dvi_controller; +if (current_dvi_ctrl->init) { +return current_dvi_ctrl->init (edge_select, + bus_select, + dual_edge_clk_select, + hsync_enable, + vsync_enable, + deskew_enable, + deskew_setting, + continuous_sync_enable, + pll_filter_enable, + pll_filter_value); }return -1 ;/* error */ }
drivers/staging/sm750fb/ddk750_dvi.h +40 -40
94 lines not on this page · raw message
drivers/staging/sm750fb/ddk750_sii164.c +93 -92
363 lines not on this page · raw message
drivers/staging/sm750fb/ddk750_sii164.h +20 -20
@@ -16,28 +16,28 @@ enum sii164_hot_plug_mode { };/* Silicon Image SiI164 chip prototype */ -long sii164InitChip (unsigned char edgeSelect, -unsigned char busSelect, -unsigned char dualEdgeClkSelect, -unsigned char hsyncEnable, -unsigned char vsyncEnable, -unsigned char deskewEnable, -unsigned char deskewSetting, -unsigned char continuousSyncEnable, -unsigned char pllFilterEnable, -unsigned char pllFilterValue); - -unsigned short sii164GetVendorID (void ); -unsigned short sii164GetDeviceID (void ); +long sii164_init_chip (unsigned char edge_select, +unsigned char bus_select, +unsigned char dual_edge_clk_select, +unsigned char hsync_enable, +unsigned char vsync_enable, +unsigned char deskew_enable, +unsigned char deskew_setting, +unsigned char continuous_sync_enable, +unsigned char pll_filter_enable, +unsigned char pll_filter_value); + +unsigned short sii164_get_vendor_id (void ); +unsigned short sii164_get_device_id (void );#ifdef SII164_FULL_FUNCTIONS -void sii164ResetChip (void ); -char *sii164GetChipString (void ); -void sii164SetPower (unsigned char powerUp); -void sii164EnableHotPlugDetection (unsigned char enableHotPlug); -unsigned char sii164IsConnected (void ); -unsigned char sii164CheckInterrupt (void ); -void sii164ClearInterrupt (void ); +void sii164_reset_chip (void ); +char *sii164_get_chip_string (void ); +void sii164_set_power (unsigned char power_up); +void sii164_enable_hot_plug_detection (unsigned char enable_hot_plug); +unsigned char sii164_is_connected (void ); +unsigned char sii164_check_interrupt (void ); +void sii164_clear_interrupt (void );#endif /* * below register definition is used for
Signature · 1 line
2.17.1
PATCH v2 2/4 staging: sm750fb: Edit CamelCase in ddk750_mode files
In reply to Jamal ShareefEdit CamelCase naming in ddk750 files and
in dependent file sm750_hw.c.
Remove hungrarian notation prefixes in ddk750_mode.c
---
Changes in v2:
- Remove hungarion notation prefixes in ddk750_mode.c file
--- drivers/staging/sm750fb/ddk750_mode.c | 86 +++++++++++++-------------- drivers/staging/sm750fb/ddk750_mode.h | 2 +- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 45 insertions(+), 45 deletions(-)
drivers/staging/sm750fb/ddk750_mode.c +43 -43
@@ -14,13 +14,13 @@* in bit 29:27 of Display Control register. */ static unsigned long -displayControlAdjust_SM750LE (struct mode_parameter *pModeParam, -unsigned long dispControl) +display_control_adjust_SM750LE (struct mode_parameter *mode_param, +unsigned long disp_control) {unsigned long x, y; - x = pModeParam->horizontal_display_end; - y = pModeParam->vertical_display_end; + x = mode_param->horizontal_display_end; + y = mode_param->vertical_display_end;/* * SM750LE has to set up the top-left and bottom-right
@@ -42,41 +42,41 @@ displayControlAdjust_SM750LE(struct mode_parameter *pModeParam,*/ /* Clear bit 29:27 of display control register */ - dispControl &= ~CRT_DISPLAY_CTRL_CLK_MASK ; + disp_control &= ~CRT_DISPLAY_CTRL_CLK_MASK ;/* Set bit 29:27 of display control register for the right clock */ /* Note that SM750LE only need to supported 7 resolutions. */ if (x ==800 && y ==600 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL41 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL41 ;else if (x ==1024 && y ==768 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL65 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL65 ;else if (x ==1152 && y ==864 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL80 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL80 ;else if (x ==1280 && y ==768 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL80 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL80 ;else if (x ==1280 && y ==720 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL74 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL74 ;else if (x ==1280 && y ==960 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL108 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL108 ;else if (x ==1280 && y ==1024 ) - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL108 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL108 ;else /* default to VGA clock */ - dispControl |=CRT_DISPLAY_CTRL_CLK_PLL25 ; + disp_control |=CRT_DISPLAY_CTRL_CLK_PLL25 ;/* Set bit 25:24 of display controller */ - dispControl |= (CRT_DISPLAY_CTRL_CRTSELECT |CRT_DISPLAY_CTRL_RGBBIT ); + disp_control |= (CRT_DISPLAY_CTRL_CRTSELECT |CRT_DISPLAY_CTRL_RGBBIT );/* Set bit 14 of display controller */ - dispControl |=DISPLAY_CTRL_CLOCK_PHASE ; + disp_control |=DISPLAY_CTRL_CLOCK_PHASE ; -poke32 (CRT_DISPLAY_CTRL , dispControl); +poke32 (CRT_DISPLAY_CTRL , disp_control); -return dispControl; +return disp_control; }/* only timing related registers will be programed */ -static int programModeRegisters (struct mode_parameter *pModeParam, -struct pll_value *pll) +static int program_mode_registers (struct mode_parameter *mode_param, +struct pll_value *pll) {int ret =0 ;int cnt =0 ;
@@ -86,46 +86,46 @@ static int programModeRegisters(struct mode_parameter *pModeParam,/* programe secondary pixel clock */ poke32 (CRT_PLL_CTRL ,sm750_format_pll_reg (pll)); - tmp = ((pModeParam->horizontal_total -1 ) << + tmp = ((mode_param->horizontal_total -1 ) <<CRT_HORIZONTAL_TOTAL_TOTAL_SHIFT ) &CRT_HORIZONTAL_TOTAL_TOTAL_MASK ; - tmp |= (pModeParam->horizontal_display_end -1 ) & + tmp |= (mode_param->horizontal_display_end -1 ) &CRT_HORIZONTAL_TOTAL_DISPLAY_END_MASK ;poke32 (CRT_HORIZONTAL_TOTAL , tmp); - tmp = (pModeParam->horizontal_sync_width << + tmp = (mode_param->horizontal_sync_width <<CRT_HORIZONTAL_SYNC_WIDTH_SHIFT ) &CRT_HORIZONTAL_SYNC_WIDTH_MASK ; - tmp |= (pModeParam->horizontal_sync_start -1 ) & + tmp |= (mode_param->horizontal_sync_start -1 ) &CRT_HORIZONTAL_SYNC_START_MASK ;poke32 (CRT_HORIZONTAL_SYNC , tmp); - tmp = ((pModeParam->vertical_total -1 ) << + tmp = ((mode_param->vertical_total -1 ) <<CRT_VERTICAL_TOTAL_TOTAL_SHIFT ) &CRT_VERTICAL_TOTAL_TOTAL_MASK ; - tmp |= (pModeParam->vertical_display_end -1 ) & + tmp |= (mode_param->vertical_display_end -1 ) &CRT_VERTICAL_TOTAL_DISPLAY_END_MASK ;poke32 (CRT_VERTICAL_TOTAL , tmp); - tmp = ((pModeParam->vertical_sync_height << + tmp = ((mode_param->vertical_sync_height <<CRT_VERTICAL_SYNC_HEIGHT_SHIFT )) &CRT_VERTICAL_SYNC_HEIGHT_MASK ; - tmp |= (pModeParam->vertical_sync_start -1 ) & + tmp |= (mode_param->vertical_sync_start -1 ) &CRT_VERTICAL_SYNC_START_MASK ;poke32 (CRT_VERTICAL_SYNC , tmp); tmp =DISPLAY_CTRL_TIMING |DISPLAY_CTRL_PLANE ; -if (pModeParam->vertical_sync_polarity) +if (mode_param->vertical_sync_polarity) tmp |=DISPLAY_CTRL_VSYNC_PHASE ; -if (pModeParam->horizontal_sync_polarity) +if (mode_param->horizontal_sync_polarity) tmp |=DISPLAY_CTRL_HSYNC_PHASE ;if (sm750_get_chip_type () ==SM750LE ) { -displayControlAdjust_SM750LE (pModeParam, tmp); +display_control_adjust_SM750LE (mode_param, tmp); }else { reg = peek32(CRT_DISPLAY_CTRL) & ~(DISPLAY_CTRL_VSYNC_PHASE |
@@ -140,40 +140,40 @@ static int programModeRegisters(struct mode_parameter *pModeParam,poke32 (PANEL_PLL_CTRL ,sm750_format_pll_reg (pll)); - reg = ((pModeParam->horizontal_total -1 ) << + reg = ((mode_param->horizontal_total -1 ) <<PANEL_HORIZONTAL_TOTAL_TOTAL_SHIFT ) &PANEL_HORIZONTAL_TOTAL_TOTAL_MASK ; - reg |= ((pModeParam->horizontal_display_end -1 ) & + reg |= ((mode_param->horizontal_display_end -1 ) &PANEL_HORIZONTAL_TOTAL_DISPLAY_END_MASK );poke32 (PANEL_HORIZONTAL_TOTAL , reg);poke32 (PANEL_HORIZONTAL_SYNC , - ((pModeParam->horizontal_sync_width << + ((mode_param->horizontal_sync_width <<PANEL_HORIZONTAL_SYNC_WIDTH_SHIFT ) &PANEL_HORIZONTAL_SYNC_WIDTH_MASK ) | - ((pModeParam->horizontal_sync_start -1 ) & + ((mode_param->horizontal_sync_start -1 ) &PANEL_HORIZONTAL_SYNC_START_MASK ));poke32 (PANEL_VERTICAL_TOTAL , - (((pModeParam->vertical_total -1 ) << + (((mode_param->vertical_total -1 ) <<PANEL_VERTICAL_TOTAL_TOTAL_SHIFT ) &PANEL_VERTICAL_TOTAL_TOTAL_MASK ) | - ((pModeParam->vertical_display_end -1 ) & + ((mode_param->vertical_display_end -1 ) &PANEL_VERTICAL_TOTAL_DISPLAY_END_MASK ));poke32 (PANEL_VERTICAL_SYNC , - ((pModeParam->vertical_sync_height << + ((mode_param->vertical_sync_height <<PANEL_VERTICAL_SYNC_HEIGHT_SHIFT ) &PANEL_VERTICAL_SYNC_HEIGHT_MASK ) | - ((pModeParam->vertical_sync_start -1 ) & + ((mode_param->vertical_sync_start -1 ) &PANEL_VERTICAL_SYNC_START_MASK )); tmp =DISPLAY_CTRL_TIMING |DISPLAY_CTRL_PLANE ; -if (pModeParam->vertical_sync_polarity) +if (mode_param->vertical_sync_polarity) tmp |=DISPLAY_CTRL_VSYNC_PHASE ; -if (pModeParam->horizontal_sync_polarity) +if (mode_param->horizontal_sync_polarity) tmp |=DISPLAY_CTRL_HSYNC_PHASE ; -if (pModeParam->clock_phase_polarity) +if (mode_param->clock_phase_polarity) tmp |=DISPLAY_CTRL_CLOCK_PHASE ; reserved = PANEL_DISPLAY_CTRL_RESERVED_MASK |
@@ -207,7 +207,7 @@ static int programModeRegisters(struct mode_parameter *pModeParam,return ret; } -int ddk750_setModeTiming (struct mode_parameter *parm,enum clock_type clock) +int ddk750_set_mode_timing (struct mode_parameter *parm,enum clock_type clock) {struct pll_value pll;
@@ -220,6 +220,6 @@ int ddk750_setModeTiming(struct mode_parameter *parm, enum clock_type clock)outb_p (0x88 ,0x3d4 );outb_p (0x06 ,0x3d5 ); } -programModeRegisters (parm, &pll); +program_mode_registers (parm, &pll);return 0 ; }
drivers/staging/sm750fb/ddk750_mode.h +1 -1
@@ -33,5 +33,5 @@ struct mode_parameter { enum spolarity clock_phase_polarity; }; -int ddk750_setModeTiming (struct mode_parameter *parm,enum clock_type clock); +int ddk750_set_mode_timing (struct mode_parameter *parm,enum clock_type clock);#endif
drivers/staging/sm750fb/sm750_hw.c +1 -1
@@ -305,7 +305,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, clock =SECONDARY_PLL ;pr_debug ("Request pixel clock = %lu\n" , modparm.pixel_clock); - ret =ddk750_setModeTiming (&modparm, clock); + ret =ddk750_set_mode_timing (&modparm, clock);if (ret) {pr_err ("Set mode timing failed\n" ); goto exit;
Signature · 1 line
2.17.1
PATCH v2 3/4 staging: sm750fb: Edit CamelCase in ddk750_power.h
In reply to Jamal ShareefRemoves instances of CamelCase. Issue found by checkpatch.
--- drivers/staging/sm750fb/ddk750_power.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/sm750fb/ddk750_power.h +5 -5
@@ -3,10 +3,10 @@#define DDK750_POWER_H__ enum dpms { - crtDPMS_ON =0x0 , - crtDPMS_STANDBY =0x1 , - crtDPMS_SUSPEND =0x2 , - crtDPMS_OFF =0x3 , + crt_DPMS_ON =0x0 , + crt_DPMS_STANDBY =0x1 , + crt_DPMS_SUSPEND =0x2 , + crt_DPMS_OFF =0x3 , };#define set_DAC (off) { \
@@ -15,7 +15,7 @@ enum dpms { }void ddk750_set_dpms (enum dpms state); -void sm750_set_power_mode (unsigned int powerMode); +void sm750_set_power_mode (unsigned int power_mode);void sm750_set_current_gate (unsigned int gate);/*
Signature · 1 line
2.17.1
PATCH v2 4/4 staging: sm750fb: Edits CamelCase in sm750 files
In reply to Jamal ShareefEdits CamelCase in dependent sm750 files.
Issue found by checkpatch.
--- drivers/staging/sm750fb/sm750.c | 144 ++++++++++++------------- drivers/staging/sm750fb/sm750.h | 70 ++++++------ drivers/staging/sm750fb/sm750_accel.c | 143 ++++++++++++------------ drivers/staging/sm750fb/sm750_accel.h | 26 ++--- drivers/staging/sm750fb/sm750_cursor.c | 18 ++-- drivers/staging/sm750fb/sm750_cursor.h | 17 +-- drivers/staging/sm750fb/sm750_hw.c | 66 ++++++------ 7 files changed, 249 insertions(+), 235 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 +77 -66
355 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 +10 -7
@@ -5,11 +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,int w,int h); -void sm750_hw_cursor_setPos (struct lynx_cursor *cursor,int x,int y); -void sm750_hw_cursor_setColor (struct lynx_cursor *cursor,u32 fg,u32 bg); -void sm750_hw_cursor_setData (struct lynx_cursor *cursor,u16 rop, -const u8 *data,const u8 *mask); -void sm750_hw_cursor_setData2 (struct lynx_cursor *cursor,u16 rop, -const u8 *data,const u8 *mask); +void sm750_hw_cursor_set_size (struct lynx_cursor *cursor, +int w,int h); +void sm750_hw_cursor_set_pos (struct lynx_cursor *cursor, +int x,int y); +void sm750_hw_cursor_set_color (struct lynx_cursor *cursor, +u32 fg,u32 bg); +void sm750_hw_cursor_set_data (struct lynx_cursor *cursor, +u16 rop,const u8 *data,const u8 *mask); +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
Greg KH
maintainerQuoted 2 lines · Jamal Shareef
This patch removes CamelCase in sm750fb files. Patches are organized into groups of dependent files.
In the future, you should put "staging:" in the subject of this email as well, to make it easier to search/find in an inbox.
thanks,
greg k-h