forked from mikairyuu/kernel_xiaomi_sm7250
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SQUASH] Revert modifications to video drivers and camera
*fixed video not recording after the device is booted for a while 07-10 20:02:00.262 1563 1760 E Surface : queueBuffer: error queuing buffer, -19 07-10 20:02:00.262 1563 1760 E Camera3-OutputStream: returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: No such device (-19) 07-10 20:02:00.263 7753 7812 E BufferQueueProducer: [SurfaceView[org.lineageos.aperture/org.lineageos.aperture.CameraLauncher]#1(BLAST Consumer)1](id:1e4900000001,api:4,p:1563,c:7753) dequeueBuffer: BufferQueue has been abandoned 07-10 20:02:00.263 1563 7833 E Camera3-OutputStream: getBufferLockedCommon: Stream 0: Can't dequeue next output buffer: No such device (-19) 07-10 20:02:04.724 1030 2612 E CamX : [ERROR][NCS ] camxncsservice.cpp:466 EnqueueJob() Can not enqueue jobs when thread is stopped Revert "drivers/video: Optimized Console FrameBuffer for upto 70% increase in Performance" This reverts commit d9252fc. Revert "msm: camera: Remove nonsensical register reads in cam_vfe_fe_reg_dump()" This reverts commit c8ff91e. Revert "dm-verity: Stop using WQ_UNBOUND for verify_wq" This reverts commit b14b9e0. Revert "dm-verity: Enable WQ_HIGHPRI on verify_wq" This reverts commit 2334947. Revert "msm: camera: Fix memory leak in cam_res_mgr_probe()" This reverts commit 1e763e3. Revert "msm: camera: Use boot clock for recording start time" This reverts commit 338ba5c. Revert "mm/compaction: Increase fragmentation index" This reverts commit 4ff3f37.
- Loading branch information
1 parent
1cfe86c
commit e3477cb
Showing
7 changed files
with
23 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ([email protected]) 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 <linux/module.h> | ||
#include <linux/string.h> | ||
|
@@ -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 <[email protected]>"); | ||
MODULE_DESCRIPTION("Generic software accelerated imaging drawing"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_LICENSE("GPL"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters