samsung-apexq: fix red screen (!377)

This commit is contained in:
silver 2019-05-22 19:04:29 -07:00 committed by Martijn Braam
parent d72923dcd5
commit a31cc23571
No known key found for this signature in database
GPG key ID: C4280ACB000B060F
3 changed files with 87 additions and 4 deletions

View file

@ -0,0 +1,81 @@
--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -1342,16 +1342,16 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
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.offset = 24;
+ var->green.offset = 16;
+ var->red.offset = 8;
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.offset = 0;
var->transp.length = 8;
bpp = 4;
break;
@@ -1361,16 +1361,16 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
fix->xpanstep = 1;
fix->ypanstep = 1;
var->vmode = FB_VMODE_NONINTERLACED;
- var->blue.offset = 8;
- var->green.offset = 16;
- var->red.offset = 24;
+ var->blue.offset = 16;
+ var->green.offset = 8;
+ var->red.offset = 0;
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 = 0;
+ var->transp.offset = 24;
var->transp.length = 8;
bpp = 4;
break;
@@ -2260,15 +2260,15 @@ static int msm_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
/* Figure out if the user meant RGBA or ARGB
and verify the position of the RGB components */
- if (var->transp.offset == 24) {
- if ((var->blue.offset != 0) ||
- (var->green.offset != 8) ||
- (var->red.offset != 16))
- return -EINVAL;
- } else if (var->transp.offset == 0) {
- if ((var->blue.offset != 8) ||
+ if (var->transp.offset == 0) {
+ if ((var->blue.offset != 24) ||
(var->green.offset != 16) ||
- (var->red.offset != 24))
+ (var->red.offset != 8))
+ return -EINVAL;
+ } else if (var->transp.offset == 24) {
+ if ((var->blue.offset != 16) ||
+ (var->green.offset != 8) ||
+ (var->red.offset != 0))
return -EINVAL;
} else
return -EINVAL;
@@ -2365,7 +2365,7 @@ static int msm_fb_set_par(struct fb_info *info)
break;
case 32:
- if (var->transp.offset == 24)
+ if (var->transp.offset == 0)
mfd->fb_imgType = MDP_ARGB_8888;
else
mfd->fb_imgType = MDP_RGBA_8888;
--
2.14.1

View file

@ -3,7 +3,7 @@
pkgname="linux-samsung-apexq"
pkgver=3.4.103
pkgrel=0
pkgrel=1
pkgdesc="Samsung Galaxy S Relay 4G kernel fork"
arch="armhf"
_carch="arm"
@ -24,6 +24,7 @@ _config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
$_config
01-fix-video-argb-setting.patch
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
kernel-use-the-gnu89-standard-explicitly.patch
@ -62,7 +63,8 @@ package() {
}
sha512sums="def44d20f43dc0af3a8ca4eb566294e782c4a1b587aea5b4ea92437799a1d93a12a650b4ebec863d4785fbb0fdf6aab42803401d6b3d0aec963c4957622a5122 linux-samsung-apexq-87f5fcaf7afef878914c3fcca2c2fd395f285902.tar.gz
02f90f9033898e6c25b44b51223c2374523cc4477345eddf5e6a89d9e0578765fb6f7cc1e248b96387433f14a3d644e74467f92845e95b531b10c328a4876a9d config-samsung-apexq.armhf
94a4a335ea001281392dce2348984e61183b291f95ce4c11bb08f919f1aa5dd6c7aea9fb5fcdafdd8e5f46756f100d13af78fea576ada86e44da381ee0948bbb config-samsung-apexq.armhf
edad59ee6defca3359fb3f1ba5cb6b933721bcc91a08dd21c842723d891545a8f08da1793623c79064c6a7e75daa434bb4fe052a56bc4e870f9f1efca165565a 01-fix-video-argb-setting.patch
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"

View file

@ -2560,8 +2560,8 @@ CONFIG_FB_MSM_HDMI_MSM_PANEL_DVI_SUPPORT=y
# CONFIG_FB_MSM_TVOUT_PAL_N is not set
CONFIG_FB_MSM_TVOUT_NONE=y
# CONFIG_FB_MSM_DEFAULT_DEPTH_RGB565 is not set
# CONFIG_FB_MSM_DEFAULT_DEPTH_ARGB8888 is not set
CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888=y
CONFIG_FB_MSM_DEFAULT_DEPTH_ARGB8888=y
# CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888 is not set
# CONFIG_FB_MSM_EBI2_EPSON_S1D_QVGA_PANEL is not set
# CONFIG_FB_MSM_EBI2_PANEL_DETECT is not set
# CONFIG_EXYNOS_VIDEO is not set