device/linux-xiaomi-santoni: fixed framebuffer colors (!1037)

Change the framebuffer depth from RGBA8888 to BGRA8888.

Signed-off-by: Danct12 <danct12@disroot.org>
This commit is contained in:
Danct12 2020-03-08 03:52:28 +07:00 committed by Minecrell
parent 4e794694a3
commit 52f04befaf
No known key found for this signature in database
GPG key ID: B77CE638A6C2E562
2 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,40 @@
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 075ee8a3880..b4531f66a06 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -868,7 +868,8 @@ static int mdss_fb_probe(struct platform_device *pdev)
mfd->bl_scale = 1024;
mfd->bl_min_lvl = 30;
mfd->ad_bl_level = 0;
- mfd->fb_imgType = MDP_RGBA_8888;
+ // Default framebuffer format.
+ mfd->fb_imgType = MDP_BGRA_8888;
mfd->calib_mode_bl = 0;
if (mfd->panel.type == MIPI_VIDEO_PANEL ||
@@ -2143,6 +2144,25 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
bpp = 4;
break;
+ case MDP_BGRA_8888:
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ fix->xpanstep = 1;
+ fix->ypanstep = 1;
+ var->vmode = FB_VMODE_NONINTERLACED;
+ var->blue.offset = 0;
+ var->green.offset = 8;
+ var->red.offset = 16;
+ var->blue.length = 8;
+ var->green.length = 8;
+ var->red.length = 8;
+ var->blue.msb_right = 0;
+ var->green.msb_right = 0;
+ var->red.msb_right = 0;
+ var->transp.offset = 24;
+ var->transp.length = 8;
+ bpp = 4;
+ break;
+
case MDP_YCRYCB_H2V1:
fix->type = FB_TYPE_INTERLEAVED_PLANES;
fix->xpanstep = 2;

View file

@ -1,7 +1,7 @@
# Kernel config based on: arch/arm64/configs/santoni_defconfig
pkgname="linux-xiaomi-santoni"
pkgver=3.18.140
pkgrel=1
pkgrel=2
pkgdesc="Xiaomi Redmi 4X kernel fork - msm-3.18 rebase"
arch="aarch64"
_carch="arm64"
@ -20,6 +20,7 @@ source="
fix-xorg-mdss-update-fb-info.patch
disable-substream-runtime-errors.patch
bt-hci-smd.patch
99_framebuffer.patch
$_config
"
builddir="$srcdir/$_repository-$_commit"
@ -43,4 +44,5 @@ sha512sums="d7a290e676aa40d35289cedbad5dd077accff4e1a2467223765a79f101ff4c131331
a277af28a718f5caf94257005393aa92d62c96110a8ec6368ff62f2e0d871b69c56c4ce00174db637204d53fa63ad3a79b8d6141713dca0878e1f06fe0379caa fix-xorg-mdss-update-fb-info.patch
14ee08e4f93befeaabfb35e6bf0b8bb5b2eecba1c21ce4498499c377c2cf4d5fccbfe85e14ca92c704d067386ec08a06805ab886f0ec7691471cf379838545aa disable-substream-runtime-errors.patch
f5850f712ce7aa42ada1971fc5f428ac8b9f5eef77d8bfb09bb24e0636e0b70ae78009466ed4962bd257721126577a756114e2ee2a70d4a925dd57e0ec7bcfa6 bt-hci-smd.patch
a6f9899ab97af727e4450201a2edc2bf6fc805d981fa967581b98c5e1ee0b9c005feeeb647b40b220a79ed9a318cf9bbf8f953aab941daf6fea4790a372aae21 99_framebuffer.patch
753b1517980a6aa4bc1ccea6d013cb5cf74cd85a92a279a5fff2f13f0930a9266305d9efdd06ce4fe7baf76eb47118fe95b855a458e0457d91041da9b8ef0897 config-xiaomi-santoni.aarch64"