int bmpencoder(void *__iomem *vaddr, int width, int height, u8 data_format,
void *data, void (*fn)(void *, void *, int))
{
- uint32_t *d, *d1, *d2;
- uint8_t *dst, *yrgb, *uv, *y1, *y2;
- int y, u, v, r, g, b;
+ uint32_t *d = NULL, *d1 = NULL, *d2 = NULL;
+ uint8_t *dst = NULL, *yrgb = NULL, *uv = NULL, *y1 = NULL, *y2 = NULL;
+ int y = 0, u = 0, v = 0, r = 0, g = 0, b = 0;
int yu = width * 4 % 4;
int byteperline;
struct vop_device *vop_dev =
container_of(dev_drv, struct vop_device, driver);
int output_color = dev_drv->output_color;
- int win_csc, overlay_mode;
+ int win_csc = 0, overlay_mode = 0;
u64 val;
if (VOP_CHIP(vop_dev) == VOP_RK322X) {
struct alpha_config alpha_config;
u64 val;
int ppixel_alpha = 0, global_alpha = 0, i;
- u32 src_alpha_ctl, dst_alpha_ctl;
+ u32 src_alpha_ctl = 0, dst_alpha_ctl = 0;
int alpha_en = 1;
+ memset(&alpha_config, 0, sizeof(struct alpha_config));
for (i = 0; i < win->area_num; i++) {
ppixel_alpha |= ((win->area[i].format == ARGB888) ||
(win->area[i].format == FBDC_ARGB_888) ||
struct vop_device *vop_dev =
container_of(dev_drv, struct vop_device, driver);
struct rk_screen *screen = dev_drv->cur_screen;
- u64 val;
+ u64 val = 0;
if (unlikely(!vop_dev->clk_on)) {
pr_info("%s,clk_on = %d\n", __func__, vop_dev->clk_on);
static int vop_cal_scl_fac(struct rk_lcdc_win *win, struct rk_screen *screen)
{
- u16 srcW;
- u16 srcH;
- u16 dstW;
- u16 dstH;
- u16 yrgb_srcW;
- u16 yrgb_srcH;
- u16 yrgb_dstW;
- u16 yrgb_dstH;
- u32 yrgb_vscalednmult;
- u32 yrgb_xscl_factor;
- u32 yrgb_yscl_factor;
+ u16 srcW = 0;
+ u16 srcH = 0;
+ u16 dstW = 0;
+ u16 dstH = 0;
+ u16 yrgb_srcW = 0;
+ u16 yrgb_srcH = 0;
+ u16 yrgb_dstW = 0;
+ u16 yrgb_dstH = 0;
+ u32 yrgb_vscalednmult = 0;
+ u32 yrgb_xscl_factor = 0;
+ u32 yrgb_yscl_factor = 0;
u8 yrgb_vsd_bil_gt2 = 0;
u8 yrgb_vsd_bil_gt4 = 0;
- u16 cbcr_srcW;
- u16 cbcr_srcH;
- u16 cbcr_dstW;
- u16 cbcr_dstH;
- u32 cbcr_vscalednmult;
- u32 cbcr_xscl_factor;
- u32 cbcr_yscl_factor;
+ u16 cbcr_srcW = 0;
+ u16 cbcr_srcH = 0;
+ u16 cbcr_dstW = 0;
+ u16 cbcr_dstH = 0;
+ u32 cbcr_vscalednmult = 0;
+ u32 cbcr_xscl_factor = 0;
+ u32 cbcr_yscl_factor = 0;
u8 cbcr_vsd_bil_gt2 = 0;
u8 cbcr_vsd_bil_gt4 = 0;
u8 yuv_fmt = 0;
static int win_0_1_set_par(struct vop_device *vop_dev,
struct rk_screen *screen, struct rk_lcdc_win *win)
{
- u32 xact, yact, xvir, yvir, xpos, ypos;
- u8 fmt_cfg = 0, swap_rb, swap_uv = 0;
+ u32 xact = 0, yact = 0, xvir = 0, yvir = 0, xpos = 0, ypos = 0;
+ u8 fmt_cfg = 0, swap_rb = 0, swap_uv = 0;
char fmt[9] = "NULL";
xpos = dsp_x_pos(win->xmirror, screen, &win->area[0]);
struct rk_screen *screen, struct rk_lcdc_win *win)
{
int i;
- u8 fmt_cfg, swap_rb;
+ u8 fmt_cfg = 0, swap_rb = 0;
char fmt[9] = "NULL";
if (VOP_CHIP(vop_dev) == VOP_RK322X) {
static int hwc_set_par(struct vop_device *vop_dev,
struct rk_screen *screen, struct rk_lcdc_win *win)
{
- u32 xact, yact, xvir, yvir, xpos, ypos;
- u8 fmt_cfg = 0, swap_rb;
+ u32 xact = 0, yact = 0, xvir = 0, yvir = 0, xpos = 0, ypos = 0;
+ u8 fmt_cfg = 0, swap_rb = 0;
char fmt[9] = "NULL";
xpos = win->area[0].xpos + screen->mode.left_margin +
struct vop_device *vop_dev =
container_of(dev_drv, struct vop_device, driver);
struct rk_lcdc_win *win = NULL;
- int i, ovl;
+ int i, ovl = 0;
u64 val;
int z_order_num = 0;
- int layer0_sel, layer1_sel, layer2_sel, layer3_sel;
+ int layer0_sel = 0, layer1_sel = 1, layer2_sel = 2, layer3_sel = 3;
if (swap == 0) {
for (i = 0; i < dev_drv->lcdc_win_num; i++) {
{
struct vop_device *vop_dev =
container_of(dev_drv, struct vop_device, driver);
- u32 val;
+ u32 val = 0;
spin_lock(&vop_dev->reg_lock);
if (vop_dev->clk_on) {
{
struct vop_device *vop_dev =
container_of(dev_drv, struct vop_device, driver);
- u64 val;
+ u64 val = 0;
spin_lock(&vop_dev->reg_lock);
if (vop_dev->clk_on) {
{
struct vop_device *vop_dev =
container_of(dev_drv, struct vop_device, driver);
- u64 val;
+ u64 val = 0;
spin_lock(&vop_dev->reg_lock);
if (vop_dev->clk_on) {
struct rk_screen *screen = lcdc_dev->driver.cur_screen;
u32 h_pw_bp = screen->mode.hsync_len + screen->mode.left_margin;
u32 v_pw_bp = screen->mode.vsync_len + screen->mode.upper_margin;
- u32 st_x, st_y;
+ u32 st_x = 0, st_y = 0;
struct rk_lcdc_win *win0 = lcdc_dev->driver.win[0];
spin_lock(&lcdc_dev->reg_lock);
struct alpha_config alpha_config;
u32 mask, val;
int ppixel_alpha = 0, global_alpha = 0, i;
- u32 src_alpha_ctl, dst_alpha_ctl;
+ u32 src_alpha_ctl = 0, dst_alpha_ctl = 0;
+ memset(&alpha_config, 0, sizeof(struct alpha_config));
for (i = 0; i < win->area_num; i++) {
ppixel_alpha |= ((win->area[i].format == ARGB888) ||
(win->area[i].format == FBDC_ARGB_888) ||
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
struct rk_lcdc_win *win = dev_drv->win[win_id];
- u8 fbdc_dsp_width_ratio;
- u16 fbdc_mb_vir_width, fbdc_mb_vir_height;
- u16 fbdc_mb_width, fbdc_mb_height;
- u16 fbdc_mb_xst, fbdc_mb_yst, fbdc_num_tiles;
- u16 fbdc_cmp_index_init;
- u8 mb_w_size, mb_h_size;
+ u8 fbdc_dsp_width_ratio = 0;
+ u16 fbdc_mb_vir_width = 0, fbdc_mb_vir_height = 0;
+ u16 fbdc_mb_width = 0, fbdc_mb_height = 0;
+ u16 fbdc_mb_xst = 0, fbdc_mb_yst = 0, fbdc_num_tiles = 0;
+ u16 fbdc_cmp_index_init = 0;
+ u8 mb_w_size = 0, mb_h_size = 0;
struct rk_screen *screen = dev_drv->cur_screen;
if (screen->mode.flag & FB_VMODE_INTERLACED) {
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
struct rk_screen *screen = dev_drv->cur_screen;
- u32 mask, val;
+ u32 mask = 0, val = 0;
if (unlikely(!lcdc_dev->clk_on)) {
pr_info("%s,clk_on = %d\n", __func__, lcdc_dev->clk_on);
static int rk3368_lcdc_cal_scl_fac(struct rk_lcdc_win *win,
struct rk_screen *screen)
{
- u16 srcW;
- u16 srcH;
- u16 dstW;
- u16 dstH;
- u16 yrgb_srcW;
- u16 yrgb_srcH;
- u16 yrgb_dstW;
- u16 yrgb_dstH;
- u32 yrgb_vscalednmult;
- u32 yrgb_xscl_factor;
- u32 yrgb_yscl_factor;
+ u16 srcW = 0;
+ u16 srcH = 0;
+ u16 dstW = 0;
+ u16 dstH = 0;
+ u16 yrgb_srcW = 0;
+ u16 yrgb_srcH = 0;
+ u16 yrgb_dstW = 0;
+ u16 yrgb_dstH = 0;
+ u32 yrgb_vscalednmult = 0;
+ u32 yrgb_xscl_factor = 0;
+ u32 yrgb_yscl_factor = 0;
u8 yrgb_vsd_bil_gt2 = 0;
u8 yrgb_vsd_bil_gt4 = 0;
- u16 cbcr_srcW;
- u16 cbcr_srcH;
- u16 cbcr_dstW;
- u16 cbcr_dstH;
- u32 cbcr_vscalednmult;
- u32 cbcr_xscl_factor;
- u32 cbcr_yscl_factor;
+ u16 cbcr_srcW = 0;
+ u16 cbcr_srcH = 0;
+ u16 cbcr_dstW = 0;
+ u16 cbcr_dstH = 0;
+ u32 cbcr_vscalednmult = 0;
+ u32 cbcr_xscl_factor = 0;
+ u32 cbcr_yscl_factor = 0;
u8 cbcr_vsd_bil_gt2 = 0;
u8 cbcr_vsd_bil_gt4 = 0;
u8 yuv_fmt = 0;
static int win_0_1_set_par(struct lcdc_device *lcdc_dev,
struct rk_screen *screen, struct rk_lcdc_win *win)
{
- u32 xact, yact, xvir, yvir, xpos, ypos;
- u8 fmt_cfg = 0, swap_rb, swap_uv = 0;
+ u32 xact = 0, yact = 0, xvir = 0, yvir = 0, xpos = 0, ypos = 0;
+ u8 fmt_cfg = 0, swap_rb = 0, swap_uv = 0;
char fmt[9] = "NULL";
xpos = dsp_x_pos(win->xmirror, screen, &win->area[0]);
struct rk_screen *screen, struct rk_lcdc_win *win)
{
int i;
- u8 fmt_cfg, swap_rb;
+ u8 fmt_cfg = 0, swap_rb = 0;
char fmt[9] = "NULL";
if (win->ymirror)
static int hwc_set_par(struct lcdc_device *lcdc_dev,
struct rk_screen *screen, struct rk_lcdc_win *win)
{
- u32 xact, yact, xvir, yvir, xpos, ypos;
- u8 fmt_cfg = 0, swap_rb;
+ u32 xact = 0, yact = 0, xvir = 0, yvir = 0, xpos = 0, ypos = 0;
+ u8 fmt_cfg = 0, swap_rb = 0;
char fmt[9] = "NULL";
xpos = win->area[0].xpos + screen->mode.left_margin +
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
struct rk_lcdc_win *win = NULL;
- int i, ovl;
+ int i, ovl = 0;
unsigned int mask, val;
int z_order_num = 0;
- int layer0_sel, layer1_sel, layer2_sel, layer3_sel;
+ int layer0_sel = 0, layer1_sel = 1, layer2_sel = 2, layer3_sel = 3;
if (swap == 0) {
for (i = 0; i < 4; i++) {
{
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
- u32 val;
+ u32 val = 0;
spin_lock(&lcdc_dev->reg_lock);
if (lcdc_dev->clk_on) {
{
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
- u32 mask, val;
+ u32 mask = 0, val = 0;
spin_lock(&lcdc_dev->reg_lock);
if (lcdc_dev->clk_on) {
{
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
- u32 val;
+ u32 val = 0;
spin_lock(&lcdc_dev->reg_lock);
if (lcdc_dev->clk_on) {
static int vop_dpi_status(struct rk_lcdc_driver *dev_drv)
{
struct vop_device *vop_dev = to_vop_dev(dev_drv);
- int status;
+ int status = 0;
spin_lock(&vop_dev->reg_lock);
static int rk_fb_data_fmt(int data_format, int bits_per_pixel)
{
- int fb_data_fmt;
+ int fb_data_fmt = 0;
if (data_format) {
switch (data_format) {
struct rk_screen *screen = dev_drv->cur_screen;/*screen0;*/
struct fb_info *fbi;
int i, ion_fd, acq_fence_fd;
- u32 xvir, yvir;
- u32 xoffset, yoffset;
+ u32 xvir = 0, yvir = 0;
+ u32 xoffset = 0, yoffset = 0;
struct ion_handle *hdl;
size_t len;
- int index_buf;
- u8 fb_data_fmt;
- u8 pixel_width;
- u32 vir_width_bit;
- u32 stride, uv_stride;
- u32 stride_32bit_1;
- u32 stride_32bit_2;
- u16 uv_x_off, uv_y_off, uv_y_act;
+ int index_buf = 0;
+ u8 fb_data_fmt = 0;
+ u8 pixel_width = 0;
+ u32 vir_width_bit = 0;
+ u32 stride = 0, uv_stride = 0;
+ u32 stride_32bit_1 = 0;
+ u32 stride_32bit_2 = 0;
+ u16 uv_x_off = 0, uv_y_off = 0, uv_y_act = 0;
u8 is_pic_yuv = 0;
u8 ppixel_a = 0, global_a = 0;
ion_phys_addr_t phy_addr;
int ret = 0;
- int buff_len;
+ int buff_len = 0;
reg_win_data->reg_area_data[0].smem_start = -1;
reg_win_data->area_num = 0;
u32 xvir = var->xres_virtual;
u8 data_format = var->nonstd & 0xff;
u8 fb_data_fmt;
- u8 pixel_width;
+ u8 pixel_width = 0;
u32 vir_width_bit;
- u32 stride, uv_stride;
+ u32 stride, uv_stride = 0;
u32 stride_32bit_1;
u32 stride_32bit_2;
u16 uv_x_off, uv_y_off, uv_y_act;
struct fb_info *fbi = dev_get_drvdata(dev);
struct rk_fb_par *fb_par = (struct rk_fb_par *)fbi->par;
struct rk_lcdc_driver *dev_drv = fb_par->lcdc_drv;
- int ovl;
+ int ovl = 0;
if (dev_drv->ops->ovl_mgr)
ovl = dev_drv->ops->ovl_mgr(dev_drv, 0, 0);
struct fb_info *fbi = dev_get_drvdata(dev);
struct rk_fb_par *fb_par = (struct rk_fb_par *)fbi->par;
struct rk_lcdc_driver *dev_drv = fb_par->lcdc_drv;
- int fps;
+ int fps = 0;
if (dev_drv->ops->fps_mgr)
fps = dev_drv->ops->fps_mgr(dev_drv, 0, 0);
struct fb_info *fbi = dev_get_drvdata(dev);
struct rk_fb_par *fb_par = (struct rk_fb_par *)fbi->par;
struct rk_lcdc_driver *dev_drv = fb_par->lcdc_drv;
- int space_max, ret, mode = 0, calc = 0, up = 0, down = 0, global = 0;
+ int space_max, ret = 0, mode = 0, calc = 0, up = 0, down = 0, global = 0;
const char *start = buf;
space_max = 10; /*max space number 10*/
struct fb_info *fbi = dev_get_drvdata(dev);
struct rk_fb_par *fb_par = (struct rk_fb_par *)fbi->par;
struct rk_lcdc_driver *dev_drv = fb_par->lcdc_drv;
- int brightness, contrast, sat_con, sin_hue, cos_hue;
+ int brightness = 0, contrast = 0, sat_con = 0, sin_hue = 0, cos_hue = 0;
if (dev_drv->ops->get_dsp_bcsh_bcs) {
brightness = dev_drv->ops->get_dsp_bcsh_bcs(dev_drv,