diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c index e103c2ad4ff2..16ac9e18f198 100644 --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -1187,16 +1187,8 @@ int verity_ctr(struct dm_target *ti, unsigned argc, char **argv) goto bad; } - /* - * Using WQ_HIGHPRI improves throughput and completion latency by - * reducing wait times when reading from a dm-verity device. - * - * Also as required for the "try_verify_in_tasklet" feature: WQ_HIGHPRI - * allows verify_wq to preempt softirq since verification in tasklet - * will fall-back to using it for error handling (or if the bufio cache - * doesn't have required hashes). - */ - v->verify_wq = alloc_workqueue("kverityd", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); + /* WQ_UNBOUND greatly improves performance when running on ramdisk */ + v->verify_wq = alloc_workqueue("kverityd", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND, num_online_cpus()); if (!v->verify_wq) { ti->error = "Cannot allocate workqueue"; r = -ENOMEM; diff --git a/drivers/video/fbdev/core/cfbimgblt.c b/drivers/video/fbdev/core/cfbimgblt.c index 97cd875b693f..a2bb276a8b24 100644 --- a/drivers/video/fbdev/core/cfbimgblt.c +++ b/drivers/video/fbdev/core/cfbimgblt.c @@ -28,11 +28,6 @@ * * Also need to add code to deal with cards endians that are different than * the native cpu endians. I also need to deal with MSB position in the word. - * Modified by Harm Hanemaaijer (fgenfb@yahoo.com) 2013: - * - Provide optimized versions of fast_imageblit for 16 and 32bpp that are - * significantly faster than the previous implementation. - * - Simplify the fast/slow_imageblit selection code, avoiding integer - * divides. */ #include #include @@ -267,133 +262,6 @@ static inline void fast_imageblit(const struct fb_image *image, struct fb_info * } } -/* - * Optimized fast_imageblit for bpp == 16. ppw = 2, bit_mask = 3 folded - * into the code, main loop unrolled. - */ - -static inline void fast_imageblit16(const struct fb_image *image, - struct fb_info *p, u8 __iomem * dst1, - u32 fgcolor, u32 bgcolor) -{ - u32 fgx = fgcolor, bgx = bgcolor; - u32 spitch = (image->width + 7) / 8; - u32 end_mask, eorx; - const char *s = image->data, *src; - u32 __iomem *dst; - const u32 *tab = NULL; - int i, j, k; - - tab = fb_be_math(p) ? cfb_tab16_be : cfb_tab16_le; - - fgx <<= 16; - bgx <<= 16; - fgx |= fgcolor; - bgx |= bgcolor; - - eorx = fgx ^ bgx; - k = image->width / 2; - - for (i = image->height; i--;) { - dst = (u32 __iomem *) dst1; - src = s; - - j = k; - while (j >= 4) { - u8 bits = *src; - end_mask = tab[(bits >> 6) & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 4) & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 2) & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[bits & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - src++; - j -= 4; - } - if (j != 0) { - u8 bits = *src; - end_mask = tab[(bits >> 6) & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - if (j >= 2) { - end_mask = tab[(bits >> 4) & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - if (j == 3) { - end_mask = tab[(bits >> 2) & 3]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst); - } - } - } - dst1 += p->fix.line_length; - s += spitch; - } -} - -/* - * Optimized fast_imageblit for bpp == 32. ppw = 1, bit_mask = 1 folded - * into the code, main loop unrolled. - */ - -static inline void fast_imageblit32(const struct fb_image *image, - struct fb_info *p, u8 __iomem * dst1, - u32 fgcolor, u32 bgcolor) -{ - u32 fgx = fgcolor, bgx = bgcolor; - u32 spitch = (image->width + 7) / 8; - u32 end_mask, eorx; - const char *s = image->data, *src; - u32 __iomem *dst; - const u32 *tab = NULL; - int i, j, k; - - tab = cfb_tab32; - - eorx = fgx ^ bgx; - k = image->width; - - for (i = image->height; i--;) { - dst = (u32 __iomem *) dst1; - src = s; - - j = k; - while (j >= 8) { - u8 bits = *src; - end_mask = tab[(bits >> 7) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 6) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 5) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 4) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 3) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 2) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[(bits >> 1) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - end_mask = tab[bits & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - src++; - j -= 8; - } - if (j != 0) { - u32 bits = (u32) * src; - while (j > 1) { - end_mask = tab[(bits >> 7) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst++); - bits <<= 1; - j--; - } - end_mask = tab[(bits >> 7) & 1]; - FB_WRITEL((end_mask & eorx) ^ bgx, dst); - } - dst1 += p->fix.line_length; - s += spitch; - } -} - void cfb_imageblit(struct fb_info *p, const struct fb_image *image) { u32 fgcolor, bgcolor, start_index, bitstart, pitch_index = 0; @@ -426,28 +294,20 @@ void cfb_imageblit(struct fb_info *p, const struct fb_image *image) bgcolor = image->bg_color; } - if (!start_index && !pitch_index) { - if (bpp == 32) - fast_imageblit32(image, p, dst1, fgcolor, - bgcolor); - else if (bpp == 16 && (width & 1) == 0) - fast_imageblit16(image, p, dst1, fgcolor, - bgcolor); - else if (bpp == 8 && (width & 3) == 0) - fast_imageblit(image, p, dst1, fgcolor, - bgcolor); - else - slow_imageblit(image, p, dst1, fgcolor, - bgcolor, - start_index, pitch_index); - } else + if (32 % bpp == 0 && !start_index && !pitch_index && + ((width & (32/bpp-1)) == 0) && + bpp >= 8 && bpp <= 32) + fast_imageblit(image, p, dst1, fgcolor, bgcolor); + else slow_imageblit(image, p, dst1, fgcolor, bgcolor, start_index, pitch_index); } else color_imageblit(image, p, dst1, start_index, pitch_index); } + EXPORT_SYMBOL(cfb_imageblit); MODULE_AUTHOR("James Simmons "); MODULE_DESCRIPTION("Generic software accelerated imaging drawing"); -MODULE_LICENSE("GPL"); \ No newline at end of file +MODULE_LICENSE("GPL"); + diff --git a/mm/compaction.c b/mm/compaction.c index 48874e7ace79..2cbb79ef9194 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2481,7 +2481,7 @@ static enum compact_result compact_zone_order(struct zone *zone, int order, return ret; } -int sysctl_extfrag_threshold = 750; +int sysctl_extfrag_threshold = 500; /** * try_to_compact_pages - Direct compact to satisfy a high-order allocation diff --git a/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c b/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c index 69a1b0200f78..2fa8014cf7a4 100644 --- a/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +++ b/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c @@ -2997,7 +2997,7 @@ static int cam_ife_csid_get_time_stamp( CAM_IFE_CSID_QTIMER_DIV_FACTOR); if (!csid_hw->prev_boot_timestamp) { - ktime_get_ts64(&ts); + get_monotonic_boottime64(&ts); time_stamp->boot_timestamp = (uint64_t)((ts.tv_sec * 1000000000) + ts.tv_nsec); diff --git a/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c b/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c index 5caf51548944..11d6a602117c 100644 --- a/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c +++ b/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c @@ -381,7 +381,7 @@ void cam_isp_hw_get_timestamp(struct cam_isp_timestamp *time_stamp) { struct timespec ts; - ktime_get_ts(&ts); + get_monotonic_boottime(&ts); time_stamp->mono_time.tv_sec = ts.tv_sec; time_stamp->mono_time.tv_usec = ts.tv_nsec/1000; } diff --git a/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.c b/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.c index 3c41c6855d4b..98c84ad77d93 100644 --- a/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.c +++ b/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.c @@ -341,6 +341,7 @@ static int cam_vfe_fe_reg_dump( struct cam_isp_resource_node *fe_res) { struct cam_vfe_mux_fe_data *fe_priv; + struct cam_vfe_soc_private *soc_private; int rc = 0, i; uint32_t val = 0; @@ -354,6 +355,7 @@ static int cam_vfe_fe_reg_dump( return 0; fe_priv = (struct cam_vfe_mux_fe_data *)fe_res->res_priv; + soc_private = fe_priv->soc_info->soc_private; for (i = 0xA3C; i <= 0xA90; i += 4) { val = cam_io_r_mb(fe_priv->mem_base + i); CAM_INFO(CAM_ISP, "offset 0x%x val 0x%x", i, val); @@ -379,6 +381,14 @@ static int cam_vfe_fe_reg_dump( CAM_INFO(CAM_ISP, "offset 0x%x val 0x%x", i, val); } + cam_cpas_reg_read(soc_private->cpas_handle, + CAM_CPAS_REG_CAMNOC, 0x420, true, &val); + CAM_INFO(CAM_ISP, "IFE02_MAXWR_LOW offset 0x420 val 0x%x", val); + + cam_cpas_reg_read(soc_private->cpas_handle, + CAM_CPAS_REG_CAMNOC, 0x820, true, &val); + CAM_INFO(CAM_ISP, "IFE13_MAXWR_LOW offset 0x820 val 0x%x", val); + return rc; } diff --git a/techpack/camera/drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.c b/techpack/camera/drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.c index 589f0893b521..c87540f7950f 100644 --- a/techpack/camera/drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.c +++ b/techpack/camera/drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.c @@ -668,9 +668,6 @@ static int cam_res_mgr_probe(struct platform_device *pdev) { int rc = 0; - if (cam_res) - return 0; - cam_res = kzalloc(sizeof(*cam_res), GFP_KERNEL); if (!cam_res) return -ENOMEM;