zte-kis3: wifi and display now working and fixed slow start-up (MR 2914)

[ci:skip-build] already built successfully in CI
This commit is contained in:
Martijn 2022-02-07 20:00:44 +01:00 committed by Clayton Craft
parent 40a56d670c
commit ddd09cb830
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
9 changed files with 168 additions and 7 deletions

View file

@ -1,15 +1,16 @@
# Reference: <https://postmarketos.org/devicepkg> # Reference: <https://postmarketos.org/devicepkg>
pkgname=device-zte-kis3 pkgname=device-zte-kis3
pkgdesc="ZTE Open C / Kis 3" pkgdesc="ZTE Open C / Kis 3"
pkgver=0.1 pkgver=0.2
pkgrel=9 pkgrel=0
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
arch="armv7" arch="armv7"
options="!check !archcheck" options="!check !archcheck"
depends="postmarketos-base linux-zte-kis3 mkbootimg mesa-dri-swrast" depends="postmarketos-base linux-zte-kis3 mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev" makedepends="devicepkg-dev"
source="deviceinfo" source="deviceinfo initfs-hook.sh"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() { build() {
devicepkg_build $startdir $pkgname devicepkg_build $startdir $pkgname
@ -19,7 +20,13 @@ package() {
devicepkg_package $startdir $pkgname devicepkg_package $startdir $pkgname
} }
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-zte-kis3"
mkdir "$subpkgdir"
}
sha512sums=" sha512sums="
f6ae0e72809ffdfcfeb87b9aded8ad9056c477c278c3c634868c82fb8698bb3459b9ea8ab334104a1c31a2e14376c8ba3447279f3551a6557072299802ba2972 deviceinfo f6ae0e72809ffdfcfeb87b9aded8ad9056c477c278c3c634868c82fb8698bb3459b9ea8ab334104a1c31a2e14376c8ba3447279f3551a6557072299802ba2972 deviceinfo
2d00033baa1cddacb94a9cbdf163dd0d15b4427ded07ef0718ef55ffc8fae2483018d3c1cedff6cf2b7e54de733f603f79c6456d2d4bbf1e41937671060783ff initfs-hook.sh
" "

View file

@ -0,0 +1,7 @@
#!/bin/sh
# Set the backlight to MAX intensity
cat /sys/class/leds/wled-backlight/max_brightness > /sys/class/leds/wled-backlight/brightness
# Set to ""proper"" HxW
echo "480,800" > /sys/class/graphics/fb0/virtual_size

View file

@ -0,0 +1,32 @@
pkgname=firmware-zte-kis3
pkgver=0.1
pkgrel=0
_commit="57eba5854572da5f1fbd29360080622c9fdc70a3"
pkgdesc="Firmware files for ZTE Open C / Kis3"
url="https://postmarketos.org"
arch="armv7"
license="proprietary"
depends="wcnss-wlan"
source="$pkgname-$_commit.tar.gz::https://github.com/mtheunis/vendor_zte_kis3/archive/$_commit.tar.gz"
options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native"
builddir="$srcdir/vendor_zte_kis3-$_commit"
package() {
_files="wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06 wcnss.b07
wcnss.b08 wcnss.b09 wcnss.mdt"
for _i in $_files; do
install -D -m644 wifi/"$_i" \
"$pkgdir"/lib/firmware/postmarketos/"$_i"
done
_files="WCNSS_cfg.dat WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin
WCNSS_hw_wlan_nv.bin"
for _i in $_files; do
install -D -m644 wifi/wlan/prima/"$_i" \
"$pkgdir"/lib/firmware/postmarketos/wlan/prima/"$_i"
done
}
sha512sums="
0b46f9174d1f313cc4f7a925d6f08a2409810cd658b79136b69f9fad8de56c4bfcbd95be7c663106083afb27dacfacb6f3335fc62988c34ff6280f22a563f3f2 firmware-zte-kis3-57eba5854572da5f1fbd29360080622c9fdc70a3.tar.gz
"

View file

@ -0,0 +1,47 @@
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index ed543c49..f6199747 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1277,6 +1277,18 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
md->reset_done &= ~type;
}
+int mmc_access_rpmb(struct mmc_queue *mq)
+{
+ struct mmc_blk_data *md = mq->data;
+ /*
+ * If this is a RPMB partition access, return ture
+ */
+ if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
+ return true;
+
+ return false;
+}
+
static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
{
struct mmc_blk_data *md = mq->data;
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index e072f654..8dcff0eb 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -51,7 +51,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
return BLKPREP_KILL;
}
- if (mq && mmc_card_removed(mq->card))
+ if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq)))
return BLKPREP_KILL;
req->cmd_flags |= REQ_DONTPREP;
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
index d1fe01c1..f850c067 100644
--- a/drivers/mmc/card/queue.h
+++ b/drivers/mmc/card/queue.h
@@ -70,4 +70,6 @@ extern void mmc_queue_bounce_post(struct mmc_queue_req *);
extern void print_mmc_packing_stats(struct mmc_card *card);
+extern int mmc_access_rpmb(struct mmc_queue *);
+
#endif

View file

@ -0,0 +1,13 @@
diff --git a/drivers/video/msm/mdss/mdp3_ctrl.c b/drivers/video/msm/mdss/mdp3_ctrl.c
index f9f55138..ccaebcb6 100644
--- a/drivers/video/msm/mdss/mdp3_ctrl.c
+++ b/drivers/video/msm/mdss/mdp3_ctrl.c
@@ -1832,7 +1832,7 @@ int mdp3_ctrl_init(struct msm_fb_data_type *mfd)
splash_mismatch = 1;
mdp3_interface->on_fnc = mdp3_ctrl_on;
- mdp3_interface->off_fnc = mdp3_ctrl_off;
+ mdp3_interface->off_fnc = NULL;
mdp3_interface->do_histogram = NULL;
mdp3_interface->cursor_update = NULL;
mdp3_interface->dma_fnc = mdp3_ctrl_pan_display;

View file

@ -0,0 +1,13 @@
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 53112ca6..69673017 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -569,7 +569,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
mfd->bl_level = 0;
mfd->bl_scale = 1024;
mfd->bl_min_lvl = 30;
- mfd->fb_imgType = MDP_RGBA_8888;
+ mfd->fb_imgType = MDP_RGB_888;
mfd->pdev = pdev;
if (pdata->next)

View file

@ -0,0 +1,13 @@
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 53112ca6..4c430624 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -1421,7 +1421,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
var->left_margin = panel_info->lcdc.h_back_porch;
var->right_margin = panel_info->lcdc.h_front_porch;
var->hsync_len = panel_info->lcdc.h_pulse_width;
- var->pixclock = panel_info->clk_rate / 1000;
+ var->pixclock = 1000000 / 60;
/* id field for fb app */

View file

@ -3,7 +3,7 @@
pkgname=linux-zte-kis3 pkgname=linux-zte-kis3
pkgver=3.4.0 pkgver=3.4.0
pkgrel=7 pkgrel=8
pkgdesc="ZTE Open C / Kis 3 kernel fork" pkgdesc="ZTE Open C / Kis 3 kernel fork"
arch="armv7" arch="armv7"
_carch="arm" _carch="arm"
@ -11,7 +11,16 @@ _flavor="zte-kis3"
url="https://kernel.org" url="https://kernel.org"
license="GPL-2.0-only" license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native" options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz" makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6"
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
# request if you find out that it is booting working with newer GCCs as
# well. See <https://postmarketos.org/vendorkernel> for instructions.
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source # Source
_repository="android_kernel_zte_msm8610" _repository="android_kernel_zte_msm8610"
@ -24,6 +33,11 @@ source="
gcc8-fix-put-user.patch gcc8-fix-put-user.patch
gcc10-extern_YYLOC_global_declaration.patch gcc10-extern_YYLOC_global_declaration.patch
kernel-use-the-gnu89-standard-explicitly.patch kernel-use-the-gnu89-standard-explicitly.patch
linux3.4-vfs-Fix-proc-tid-fdinfo-fd-file-handling.patch
01_avoid_rpmb_read_during_boot.patch
02_fix_mdp3_ctrl_off.patch
03_fix_mdss_fb_rgb_mode.patch
04_fix_mdss_fb_refresh_rate.patch
" "
builddir="$srcdir/$_repository-$_commit" builddir="$srcdir/$_repository-$_commit"
@ -35,6 +49,7 @@ prepare() {
build() { build() {
unset LDFLAGS unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \ make ARCH="$_carch" CC="${CC:-gcc}" \
CONFIG_NO_ERROR_ON_MISMATCH=y \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Generate master DTB (deviceinfo_bootimg_qcdt) # Generate master DTB (deviceinfo_bootimg_qcdt)
@ -47,11 +62,24 @@ package() {
# Master DTB (deviceinfo_bootimg_qcdt) # Master DTB (deviceinfo_bootimg_qcdt)
install -Dm644 "$builddir/arch/arm/boot/dt.img" \ install -Dm644 "$builddir/arch/arm/boot/dt.img" \
"$pkgdir/boot/dt.img" "$pkgdir/boot/dt.img"
# Modules
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
CONFIG_NO_ERROR_ON_MISMATCH=y \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS"
} }
sha512sums="5759d54232e0c83e71896fc4c859fe8554731678defa337ec9da441505e03fb2f3b795fb68b35dec8e0fc6a920e82f03cd986badc05cf55c993d22085620bebc linux-zte-kis3-b55a46067bb75d8a290b2cc0e07f5fb3d8207cb1.tar.gz sha512sums="
5759d54232e0c83e71896fc4c859fe8554731678defa337ec9da441505e03fb2f3b795fb68b35dec8e0fc6a920e82f03cd986badc05cf55c993d22085620bebc linux-zte-kis3-b55a46067bb75d8a290b2cc0e07f5fb3d8207cb1.tar.gz
89bf4bb74c8647cb660996487c91dffadc81f2b6f62b835190db7dea02a731c0e5449b373b0d01ce2417074a1a22bfd0760abf48106814cfc9a6d7465349fe99 config-zte-kis3.armv7 89bf4bb74c8647cb660996487c91dffadc81f2b6f62b835190db7dea02a731c0e5449b373b0d01ce2417074a1a22bfd0760abf48106814cfc9a6d7465349fe99 config-zte-kis3.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch 77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch 197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch 2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch" ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
5e81c20b0b30c1ab09bd59f1e1b77fcce945a27de8144c68617ddc5e8f10e1f6fa8b1e4cd5d63e43511d61dace46fb26b14a6227a667b9718d44c8b81dbe6100 linux3.4-vfs-Fix-proc-tid-fdinfo-fd-file-handling.patch
760fdff79df31754ebed59839f34fc8c5a61750471614ac93a01b1e13b2535e7ca1f879c0cad3e83ad92946586c91679ba853eac4fe454d7e948317c84d81941 01_avoid_rpmb_read_during_boot.patch
fbc61e379403990167853f4c4fbdfa22d7e9661a7eedecf2a75eec2a8008991a82d0a61be844ab4b1c88383f3fa79b43eff10b1039e44ad5a758a173cbf6386b 02_fix_mdp3_ctrl_off.patch
384ae0bf2f5d7e15b0b60655693fd600b52c0f5bfcaa4ba7336d0ebeb224e84b99b597f77d26a1249e14a4e7bbc1629be00556b393bb9dd2266cb4bd67c3cfea 03_fix_mdss_fb_rgb_mode.patch
1f743d3e7f4ac7401167ea35edc7d7e113bd80824c4d53631d7500f33557ff486163f8244786c16506b2e21db6ccbcd8a0f7b26fcf4937efee50b62c074f9a22 04_fix_mdss_fb_refresh_rate.patch
"

View file

@ -0,0 +1 @@
../../.shared-patches/linux/linux3.4-vfs-Fix-proc-tid-fdinfo-fd-file-handling.patch