diff for duplicates of <201112080024.24383.linux@rainbow-software.org> diff --git a/a/1.txt b/N1/1.txt index 3665f27..f564ceb 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -258,7 +258,7 @@ Changes in v4: + struct i740fb_par *par = info->par; + + mutex_lock(&(par->open_lock)); -+ if (par->ref_count = 0) { ++ if (par->ref_count == 0) { + printk(KERN_ERR "fb%d: release called with zero refcount\n", + info->node); + mutex_unlock(&(par->open_lock)); @@ -366,8 +366,10 @@ Changes in v4: +static void i740_calc_vclk(u32 freq_hz, struct i740fb_par *par) +{ + u32 freq = freq_hz / (u32)(1e6 / I740_RFREQ); -+ const u32 err_max + freq / (u32)(I740_RFREQ / 0.005 / (1 << I740_FFIX) + 0.5); -+ const u32 err_target + freq / (u32)(I740_RFREQ / 0.001 / (1 << I740_FFIX) + 0.5); ++ const u32 err_max = ++ freq / (u32)(I740_RFREQ / 0.005 / (1 << I740_FFIX) + 0.5); ++ const u32 err_target = ++ freq / (u32)(I740_RFREQ / 0.001 / (1 << I740_FFIX) + 0.5); + u32 err_best = (u32)(512.0 * (1 << I740_FFIX)); + u32 f_err, f_vco; + int m_best = 0, n_best = 0, p_best = 0, d_best = 0; @@ -415,7 +417,8 @@ Changes in v4: + par->video_clk2_n = (n_best-2) & 0xFF; + par->video_clk2_mn_msbs = ((((n_best-2) >> 4) & VCO_N_MSBS) + | (((m_best-2) >> 8) & VCO_M_MSBS)); -+ par->video_clk2_div_sel + ((p_best << 4) | (d_best ? 4 : 0) | REF_DIV_1); ++ par->video_clk2_div_sel = ++ ((p_best << 4) | (d_best ? 4 : 0) | REF_DIV_1); +} + +static int i740fb_decode_var(const struct fb_var_screeninfo *var, @@ -616,7 +619,7 @@ Changes in v4: + break; + case 15: /* 0rrrrrgg gggbbbbb */ + case 16: /* rrrrrggg gggbbbbb */ -+ par->pixelpipe_cfg1 = (var->green.length = 6) ? ++ par->pixelpipe_cfg1 = (var->green.length == 6) ? + DISPLAY_16BPP_MODE : DISPLAY_15BPP_MODE; + par->crtc[VGA_CRTC_OFFSET] = vxres >> 2; + par->ext_offset = vxres >> 10; @@ -642,7 +645,8 @@ Changes in v4: + + par->crtc[VGA_CRTC_START_LO] = base & 0x000000FF; + par->crtc[VGA_CRTC_START_HI] = (base & 0x0000FF00) >> 8; -+ par->ext_start_addr + ((base & 0x003F0000) >> 16) | EXT_START_ADDR_ENABLE; ++ par->ext_start_addr = ++ ((base & 0x003F0000) >> 16) | EXT_START_ADDR_ENABLE; + par->ext_start_addr_hi = (base & 0x3FC00000) >> 22; + + par->pixelpipe_cfg0 = DAC_8_BIT; @@ -675,7 +679,8 @@ Changes in v4: + par->misc |= 0x0C; + + /* Calculate the FIFO Watermark and Burst Length. */ -+ par->lmi_fifo_watermark + i740_calc_fifo(par, ((int)1e6) / var->pixclock, bpp); ++ par->lmi_fifo_watermark = ++ i740_calc_fifo(par, ((int)1e6) / var->pixclock, bpp); + + return 0; +} @@ -860,8 +865,9 @@ Changes in v4: + mdelay(50); + vga_unprotect(par); + -+ info->fix.line_length + info->var.xres_virtual * info->var.bits_per_pixel / 8; -+ if (info->var.bits_per_pixel = 8) ++ info->fix.line_length = ++ info->var.xres_virtual * info->var.bits_per_pixel / 8; ++ if (info->var.bits_per_pixel == 8) + info->fix.visual = FB_VISUAL_PSEUDOCOLOR; + else + info->fix.visual = FB_VISUAL_TRUECOLOR; @@ -985,7 +991,7 @@ Changes in v4: + i740outreg(par, XRX, DPMS_SYNC_SELECT, DPMSSyncSelect); + + /* Let fbcon do a soft blank for us */ -+ return (blank_mode = FB_BLANK_NORMAL) ? 1 : 0; ++ return (blank_mode == FB_BLANK_NORMAL) ? 1 : 0; +} + +static struct fb_ops i740fb_ops = { @@ -1054,7 +1060,7 @@ Changes in v4: + } + + /* detect memory size */ -+ if ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) = DRAM_ROW_1_SDRAM) ++ if ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) == DRAM_ROW_1_SDRAM) + i740outb(par, XRX, DRAM_ROW_BNDRY_1); + else + i740outb(par, XRX, DRAM_ROW_BNDRY_0); @@ -1075,7 +1081,7 @@ Changes in v4: + info->fix.smem_len = info->screen_size; + info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + -+ if (i740fb_setup_ddc_bus(info) = 0) { ++ if (i740fb_setup_ddc_bus(info) == 0) { + par->ddc_registered = true; + edid = fb_ddc_read(&par->ddc_adapter); + if (edid) { @@ -1096,7 +1102,7 @@ Changes in v4: + if (m) { + fb_videomode_to_var(&info->var, m); + /* fill all other info->var's fields */ -+ if (i740fb_check_var(&info->var, info) = 0) ++ if (i740fb_check_var(&info->var, info) == 0) + found = true; + } + } @@ -1111,7 +1117,7 @@ Changes in v4: + info->monspecs.modedb, + info->monspecs.modedb_len, + NULL, info->var.bits_per_pixel); -+ if (!ret || ret = 4) { ++ if (!ret || ret == 4) { + dev_err(info->device, "mode %s not found\n", + mode_option); + ret = -EINVAL; @@ -1125,7 +1131,7 @@ Changes in v4: + info->var.yres_virtual = info->fix.smem_len * 8 / + (info->var.bits_per_pixel * info->var.xres_virtual); + -+ if (ret = -EINVAL) ++ if (ret == -EINVAL) + goto err_find_mode; + + ret = fb_alloc_cmap(&info->cmap, 256, 0); @@ -1203,14 +1209,14 @@ Changes in v4: + struct i740fb_par *par = info->par; + + /* don't disable console during hibernation and wakeup from it */ -+ if (state.event = PM_EVENT_FREEZE || state.event = PM_EVENT_PRETHAW) ++ if (state.event == PM_EVENT_FREEZE || state.event == PM_EVENT_PRETHAW) + return 0; + + console_lock(); + mutex_lock(&(par->open_lock)); + + /* do nothing if framebuffer is not active */ -+ if (par->ref_count = 0) { ++ if (par->ref_count == 0) { + mutex_unlock(&(par->open_lock)); + console_unlock(); + return 0; @@ -1236,7 +1242,7 @@ Changes in v4: + console_lock(); + mutex_lock(&(par->open_lock)); + -+ if (par->ref_count = 0) ++ if (par->ref_count == 0) + goto fail; + + pci_set_power_state(dev, PCI_D0); diff --git a/a/content_digest b/N1/content_digest index af69442..09dfd9d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "From\0Ondrej Zary <linux@rainbow-software.org>\0" "Subject\0[PATCH v4] Resurrect Intel740 driver: i740fb\0" - "Date\0Wed, 07 Dec 2011 23:24:18 +0000\0" + "Date\0Thu, 8 Dec 2011 00:24:18 +0100\0" "To\0linux-fbdev@vger.kernel.org\0" "Cc\0Florian Tobias Schandinat <FlorianSchandinat@gmx.de>" Paul Mundt <lethal@linux-sh.org> @@ -267,7 +267,7 @@ "+\tstruct i740fb_par *par = info->par;\n" "+\n" "+\tmutex_lock(&(par->open_lock));\n" - "+\tif (par->ref_count = 0) {\n" + "+\tif (par->ref_count == 0) {\n" "+\t\tprintk(KERN_ERR \"fb%d: release called with zero refcount\\n\",\n" "+\t\t\tinfo->node);\n" "+\t\tmutex_unlock(&(par->open_lock));\n" @@ -375,8 +375,10 @@ "+static void i740_calc_vclk(u32 freq_hz, struct i740fb_par *par)\n" "+{\n" "+\tu32 freq = freq_hz / (u32)(1e6 / I740_RFREQ);\n" - "+\tconst u32 err_max +\t\tfreq / (u32)(I740_RFREQ / 0.005 / (1 << I740_FFIX) + 0.5);\n" - "+\tconst u32 err_target +\t\tfreq / (u32)(I740_RFREQ / 0.001 / (1 << I740_FFIX) + 0.5);\n" + "+\tconst u32 err_max =\n" + "+\t\tfreq / (u32)(I740_RFREQ / 0.005 / (1 << I740_FFIX) + 0.5);\n" + "+\tconst u32 err_target =\n" + "+\t\tfreq / (u32)(I740_RFREQ / 0.001 / (1 << I740_FFIX) + 0.5);\n" "+\tu32 err_best = (u32)(512.0 * (1 << I740_FFIX));\n" "+\tu32 f_err, f_vco;\n" "+\tint m_best = 0, n_best = 0, p_best = 0, d_best = 0;\n" @@ -424,7 +426,8 @@ "+\tpar->video_clk2_n = (n_best-2) & 0xFF;\n" "+\tpar->video_clk2_mn_msbs = ((((n_best-2) >> 4) & VCO_N_MSBS)\n" "+\t\t\t\t | (((m_best-2) >> 8) & VCO_M_MSBS));\n" - "+\tpar->video_clk2_div_sel +\t\t((p_best << 4) | (d_best ? 4 : 0) | REF_DIV_1);\n" + "+\tpar->video_clk2_div_sel =\n" + "+\t\t((p_best << 4) | (d_best ? 4 : 0) | REF_DIV_1);\n" "+}\n" "+\n" "+static int i740fb_decode_var(const struct fb_var_screeninfo *var,\n" @@ -625,7 +628,7 @@ "+\t\tbreak;\n" "+\tcase 15: /* 0rrrrrgg gggbbbbb */\n" "+\tcase 16: /* rrrrrggg gggbbbbb */\n" - "+\t\tpar->pixelpipe_cfg1 = (var->green.length = 6) ?\n" + "+\t\tpar->pixelpipe_cfg1 = (var->green.length == 6) ?\n" "+\t\t\tDISPLAY_16BPP_MODE : DISPLAY_15BPP_MODE;\n" "+\t\tpar->crtc[VGA_CRTC_OFFSET] = vxres >> 2;\n" "+\t\tpar->ext_offset = vxres >> 10;\n" @@ -651,7 +654,8 @@ "+\n" "+\tpar->crtc[VGA_CRTC_START_LO] = base & 0x000000FF;\n" "+\tpar->crtc[VGA_CRTC_START_HI] = (base & 0x0000FF00) >> 8;\n" - "+\tpar->ext_start_addr +\t\t((base & 0x003F0000) >> 16) | EXT_START_ADDR_ENABLE;\n" + "+\tpar->ext_start_addr =\n" + "+\t\t((base & 0x003F0000) >> 16) | EXT_START_ADDR_ENABLE;\n" "+\tpar->ext_start_addr_hi = (base & 0x3FC00000) >> 22;\n" "+\n" "+\tpar->pixelpipe_cfg0 = DAC_8_BIT;\n" @@ -684,7 +688,8 @@ "+\tpar->misc |= 0x0C;\n" "+\n" "+\t/* Calculate the FIFO Watermark and Burst Length. */\n" - "+\tpar->lmi_fifo_watermark +\t\ti740_calc_fifo(par, ((int)1e6) / var->pixclock, bpp);\n" + "+\tpar->lmi_fifo_watermark =\n" + "+\t\ti740_calc_fifo(par, ((int)1e6) / var->pixclock, bpp);\n" "+\n" "+\treturn 0;\n" "+}\n" @@ -869,8 +874,9 @@ "+\tmdelay(50);\n" "+\tvga_unprotect(par);\n" "+\n" - "+\tinfo->fix.line_length +\t\t\tinfo->var.xres_virtual * info->var.bits_per_pixel / 8;\n" - "+\tif (info->var.bits_per_pixel = 8)\n" + "+\tinfo->fix.line_length =\n" + "+\t\t\tinfo->var.xres_virtual * info->var.bits_per_pixel / 8;\n" + "+\tif (info->var.bits_per_pixel == 8)\n" "+\t\tinfo->fix.visual = FB_VISUAL_PSEUDOCOLOR;\n" "+\telse\n" "+\t\tinfo->fix.visual = FB_VISUAL_TRUECOLOR;\n" @@ -994,7 +1000,7 @@ "+\ti740outreg(par, XRX, DPMS_SYNC_SELECT, DPMSSyncSelect);\n" "+\n" "+\t/* Let fbcon do a soft blank for us */\n" - "+\treturn (blank_mode = FB_BLANK_NORMAL) ? 1 : 0;\n" + "+\treturn (blank_mode == FB_BLANK_NORMAL) ? 1 : 0;\n" "+}\n" "+\n" "+static struct fb_ops i740fb_ops = {\n" @@ -1063,7 +1069,7 @@ "+\t}\n" "+\n" "+\t/* detect memory size */\n" - "+\tif ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) = DRAM_ROW_1_SDRAM)\n" + "+\tif ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) == DRAM_ROW_1_SDRAM)\n" "+\t\ti740outb(par, XRX, DRAM_ROW_BNDRY_1);\n" "+\telse\n" "+\t\ti740outb(par, XRX, DRAM_ROW_BNDRY_0);\n" @@ -1084,7 +1090,7 @@ "+\tinfo->fix.smem_len = info->screen_size;\n" "+\tinfo->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;\n" "+\n" - "+\tif (i740fb_setup_ddc_bus(info) = 0) {\n" + "+\tif (i740fb_setup_ddc_bus(info) == 0) {\n" "+\t\tpar->ddc_registered = true;\n" "+\t\tedid = fb_ddc_read(&par->ddc_adapter);\n" "+\t\tif (edid) {\n" @@ -1105,7 +1111,7 @@ "+\t\t\t\tif (m) {\n" "+\t\t\t\t\tfb_videomode_to_var(&info->var, m);\n" "+\t\t\t\t\t/* fill all other info->var's fields */\n" - "+\t\t\t\t\tif (i740fb_check_var(&info->var, info) = 0)\n" + "+\t\t\t\t\tif (i740fb_check_var(&info->var, info) == 0)\n" "+\t\t\t\t\t\tfound = true;\n" "+\t\t\t\t}\n" "+\t\t\t}\n" @@ -1120,7 +1126,7 @@ "+\t\t\t\t info->monspecs.modedb,\n" "+\t\t\t\t info->monspecs.modedb_len,\n" "+\t\t\t\t NULL, info->var.bits_per_pixel);\n" - "+\t\tif (!ret || ret = 4) {\n" + "+\t\tif (!ret || ret == 4) {\n" "+\t\t\tdev_err(info->device, \"mode %s not found\\n\",\n" "+\t\t\t\tmode_option);\n" "+\t\t\tret = -EINVAL;\n" @@ -1134,7 +1140,7 @@ "+\tinfo->var.yres_virtual = info->fix.smem_len * 8 /\n" "+\t\t\t(info->var.bits_per_pixel * info->var.xres_virtual);\n" "+\n" - "+\tif (ret = -EINVAL)\n" + "+\tif (ret == -EINVAL)\n" "+\t\tgoto err_find_mode;\n" "+\n" "+\tret = fb_alloc_cmap(&info->cmap, 256, 0);\n" @@ -1212,14 +1218,14 @@ "+\tstruct i740fb_par *par = info->par;\n" "+\n" "+\t/* don't disable console during hibernation and wakeup from it */\n" - "+\tif (state.event = PM_EVENT_FREEZE || state.event = PM_EVENT_PRETHAW)\n" + "+\tif (state.event == PM_EVENT_FREEZE || state.event == PM_EVENT_PRETHAW)\n" "+\t\treturn 0;\n" "+\n" "+\tconsole_lock();\n" "+\tmutex_lock(&(par->open_lock));\n" "+\n" "+\t/* do nothing if framebuffer is not active */\n" - "+\tif (par->ref_count = 0) {\n" + "+\tif (par->ref_count == 0) {\n" "+\t\tmutex_unlock(&(par->open_lock));\n" "+\t\tconsole_unlock();\n" "+\t\treturn 0;\n" @@ -1245,7 +1251,7 @@ "+\tconsole_lock();\n" "+\tmutex_lock(&(par->open_lock));\n" "+\n" - "+\tif (par->ref_count = 0)\n" + "+\tif (par->ref_count == 0)\n" "+\t\tgoto fail;\n" "+\n" "+\tpci_set_power_state(dev, PCI_D0);\n" @@ -1657,4 +1663,4 @@ "-- \n" Ondrej Zary -9b620bb6cba6cae04560f77e21cd1319e2a35abe092ea072c0719c46b3487a39 +5c28642e15ec22e17b0fb5b12d40e6afe194a13dd7591ea2988aaab024d91b02
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.