samsung-gtowifi: new device (MR 4414)
[ci:skip-build]: Already built successfully in CI
This commit is contained in:
parent
0abbfcd853
commit
438471fe4a
7 changed files with 5521 additions and 0 deletions
37
device/testing/device-samsung-gtowifi/APKBUILD
Normal file
37
device/testing/device-samsung-gtowifi/APKBUILD
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-samsung-gtowifi
|
||||||
|
pkgdesc="Samsung Galaxy Tab A 8.0 2019"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="
|
||||||
|
linux-samsung-gtowifi
|
||||||
|
msm-fb-refresher
|
||||||
|
mkbootimg
|
||||||
|
postmarketos-base
|
||||||
|
"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo"
|
||||||
|
|
||||||
|
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
nonfree_firmware() {
|
||||||
|
pkgdesc="WiFi firmware"
|
||||||
|
depends="firmware-samsung-gtowifi-wifi"
|
||||||
|
mkdir "$subpkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
34934f61db9cc4d05c5a8538bbe78955d98a804aed9c072e5a4aa2a36fa17ec4466e88c7fb4a3fa97a9a225a3b5d17b4770dc58e2e47feec7d3d5fe23d454b9e deviceinfo
|
||||||
|
"
|
33
device/testing/device-samsung-gtowifi/deviceinfo
Normal file
33
device/testing/device-samsung-gtowifi/deviceinfo
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell
|
||||||
|
# scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Samsung Galaxy Tab A 8.0 2019"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
deviceinfo_codename="samsung-gtowifi"
|
||||||
|
deviceinfo_year="2019"
|
||||||
|
deviceinfo_arch="aarch64"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="tablet"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="800"
|
||||||
|
deviceinfo_screen_height="1280"
|
||||||
|
deviceinfo_gpu_accelerated="false"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="heimdall-bootimg"
|
||||||
|
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_serial_dm,0x78B0000 androidboot.usbconfigfs=true loop.max_part=7 buildvariant=userdebug"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
deviceinfo_bootimg_mtk_mkimage="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
deviceinfo_header_version="1"
|
||||||
|
deviceinfo_flash_offset_base="0x80000000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x80000000"
|
||||||
|
deviceinfo_flash_offset_second="0x80000000"
|
||||||
|
deviceinfo_flash_offset_tags="0x01e00000"
|
30
device/testing/firmware-samsung-gtowifi/APKBUILD
Normal file
30
device/testing/firmware-samsung-gtowifi/APKBUILD
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
pkgname=firmware-samsung-gtowifi
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Proprietary firmware for gtowifi"
|
||||||
|
_repository="gtowifi-blobs"
|
||||||
|
url="https://github.com/oatm22/$_repository"
|
||||||
|
arch="aarch64"
|
||||||
|
license="proprietary"
|
||||||
|
options="!check !archcheck !strip !spdx !tracedeps pmb:cross-native"
|
||||||
|
|
||||||
|
_commit="fc7bc44a7dd8630ddc6ca10b28c2396ebb3249fd"
|
||||||
|
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
|
||||||
|
|
||||||
|
subpackages="$pkgname-wifi"
|
||||||
|
|
||||||
|
package() {
|
||||||
|
mkdir -p "$pkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
wifi() {
|
||||||
|
mkdir -p "$subpkgdir"
|
||||||
|
depends="wcnss-wlan"
|
||||||
|
install -Dm644 "$srcdir"/$_repository-$_commit/wcnss.* -t \
|
||||||
|
"$subpkgdir"/lib/firmware/postmarketos/
|
||||||
|
install -Dm644 "$srcdir"/$_repository-$_commit/wlan/prima/* -t \
|
||||||
|
"$subpkgdir"/lib/firmware/postmarketos/wlan/prima
|
||||||
|
}
|
||||||
|
sha512sums="
|
||||||
|
a3b0a28473b78666198cd721a870d9d269f454e41e51a9fafb2adcb6d24786df49e2fe7bf12cff2f14c5328c21680e475ba10cdf5a7accd7781b3347587edda7 firmware-samsung-gtowifi-fc7bc44a7dd8630ddc6ca10b28c2396ebb3249fd.tar.gz
|
||||||
|
"
|
40
device/testing/linux-samsung-gtowifi/99_framebuffer.patch
Normal file
40
device/testing/linux-samsung-gtowifi/99_framebuffer.patch
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
|
||||||
|
index 66c3661f7ed9..b72c82c0104a 100644
|
||||||
|
--- a/drivers/video/fbdev/msm/mdss_fb.c
|
||||||
|
+++ b/drivers/video/fbdev/msm/mdss_fb.c
|
||||||
|
@@ -1311,7 +1311,7 @@ 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;
|
||||||
|
+ mfd->fb_imgType = MDP_BGRA_8888;
|
||||||
|
mfd->calib_mode_bl = 0;
|
||||||
|
mfd->unset_bl_level = U32_MAX;
|
||||||
|
mfd->bl_extn_level = -1;
|
||||||
|
@@ -2729,7 +2729,25 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||||
|
var->transp.length = 8;
|
||||||
|
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;
|
59
device/testing/linux-samsung-gtowifi/APKBUILD
Normal file
59
device/testing/linux-samsung-gtowifi/APKBUILD
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/lineageos_gtowifi_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-samsung-gtowifi
|
||||||
|
pkgver=4.9.277
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Samsung Galaxy Tab A 8.0 (2019) kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="samsung-gtowifi"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
|
makedepends="
|
||||||
|
bash
|
||||||
|
bc
|
||||||
|
bison
|
||||||
|
devicepkg-dev
|
||||||
|
flex
|
||||||
|
openssl-dev
|
||||||
|
perl
|
||||||
|
clang
|
||||||
|
"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_repository="android_kernel_samsung_sdm429"
|
||||||
|
_commit="3f81a222c8f21e664476ac1ef2368a72dcb6cb53"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
fix-xorg-mdss-update-fb-info.patch
|
||||||
|
99_framebuffer.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$_repository-$_commit"
|
||||||
|
_outdir="out"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
. downstreamkernel_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
|
||||||
|
"$_flavor" "$_outdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
26a915c3bc0793a85a0da5b81664bf7f29b0e74b1181e9006e9785d8bc72e56048c2df0a3390707e3635e95af420556d1b38e5b0c451af477ae9c15f0ee93634 linux-samsung-gtowifi-3f81a222c8f21e664476ac1ef2368a72dcb6cb53.tar.gz
|
||||||
|
271c7185a7b05f09e2fc8938826508130fc9f1c010c38abd52bf0aaa5d26518ffbc929ffb14338fe9e72b78ddd2d80c79574f6de5b1249a8a6ad4ed4b5e8d98c config-samsung-gtowifi.aarch64
|
||||||
|
e11a1ca524a05a5fe8b845937dbc57ee38c52e0a1a979d8e7be0ac53df22f84dfb424205ee7f541acfca3daba3e9f5d49bb4b9e9bb482eb354de14eb28bd0094 fix-xorg-mdss-update-fb-info.patch
|
||||||
|
741a46c6679172639568df96614b12a543563895ddee79051d88d28742b26d9c725f1d03dc208152c46e87b8b58240a3e206877da9a6a72035095e0f43458a72 99_framebuffer.patch
|
||||||
|
"
|
5215
device/testing/linux-samsung-gtowifi/config-samsung-gtowifi.aarch64
Normal file
5215
device/testing/linux-samsung-gtowifi/config-samsung-gtowifi.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,107 @@
|
||||||
|
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
|
||||||
|
index 66c3661f7ed9..e4f98d88c7d9 100644
|
||||||
|
--- a/drivers/video/fbdev/msm/mdss_fb.c
|
||||||
|
+++ b/drivers/video/fbdev/msm/mdss_fb.c
|
||||||
|
@@ -1881,7 +1881,7 @@ static void mdss_panel_validate_debugfs_info(struct msm_fb_data_type *mfd)
|
||||||
|
if (is_panel_split(mfd) && pdata->next)
|
||||||
|
mdss_fb_validate_split(pdata->panel_info.xres,
|
||||||
|
pdata->next->panel_info.xres, mfd);
|
||||||
|
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
if (mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
|
||||||
|
panel_info))
|
||||||
|
pr_err("Failed to send panel event CHECK_PARAMS\n");
|
||||||
|
@@ -2017,7 +2017,7 @@ static int mdss_fb_blank_unblank(struct msm_fb_data_type *mfd)
|
||||||
|
* programmed in the controller.
|
||||||
|
* Update this info in the upstream structs.
|
||||||
|
*/
|
||||||
|
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
|
||||||
|
/* Start the work thread to signal idle time */
|
||||||
|
if (mfd->idle_time)
|
||||||
|
@@ -2757,7 +2757,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
|
||||||
|
fix->type = panel_info->is_3d_panel;
|
||||||
|
if (mfd->mdp.fb_stride)
|
||||||
|
@@ -3461,7 +3461,7 @@ static void mdss_fb_update_resolution(struct msm_fb_data_type *mfd,
|
||||||
|
}
|
||||||
|
var->xres_virtual = var->xres;
|
||||||
|
var->yres_virtual = pinfo->yres * mfd->fb_page;
|
||||||
|
- mdss_panelinfo_to_fb_var(pinfo, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
}
|
||||||
|
|
||||||
|
int mdss_fb_atomic_commit(struct fb_info *info,
|
||||||
|
@@ -3695,9 +3695,15 @@ static void mdss_fb_var_to_panelinfo(struct fb_var_screeninfo *var,
|
||||||
|
pinfo->mipi.dsi_pclk_rate = pinfo->clk_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||||
|
- struct fb_var_screeninfo *var)
|
||||||
|
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd)
|
||||||
|
{
|
||||||
|
+ if (!mfd)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ struct mdss_panel_info *pinfo = mfd->panel_info;
|
||||||
|
+ struct fb_info *fbi = mfd->fbi;
|
||||||
|
+ struct fb_var_screeninfo *var = &fbi->var;
|
||||||
|
+
|
||||||
|
u32 frame_rate;
|
||||||
|
|
||||||
|
var->xres = mdss_fb_get_panel_xres(pinfo);
|
||||||
|
@@ -3732,10 +3738,17 @@ void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||||
|
if (pinfo->physical_height)
|
||||||
|
var->height = pinfo->physical_height;
|
||||||
|
|
||||||
|
- pr_debug("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
|
||||||
|
- var->xres, var->yres, var->left_margin,
|
||||||
|
- var->right_margin, var->upper_margin,
|
||||||
|
- var->lower_margin);
|
||||||
|
+ //Hack to update current fbi->mode according to fbi->var when var is updated from panel info
|
||||||
|
+ if (fbi->mode) {
|
||||||
|
+ printk("Updating mdss fb mode from fb var\n");
|
||||||
|
+ fb_var_to_videomode(fbi->mode, var);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ printk("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
|
||||||
|
+ var->xres, var->yres, var->left_margin,
|
||||||
|
+ var->right_margin, var->upper_margin,
|
||||||
|
+ var->lower_margin);
|
||||||
|
+
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff --git a/drivers/video/fbdev/msm/mdss_fb.h b/drivers/video/fbdev/msm/mdss_fb.h
|
||||||
|
index 4b39f9edef0c..4a0d13f2f079 100644
|
||||||
|
--- a/drivers/video/fbdev/msm/mdss_fb.h
|
||||||
|
+++ b/drivers/video/fbdev/msm/mdss_fb.h
|
||||||
|
@@ -476,8 +476,7 @@ int mdss_fb_async_position_update(struct fb_info *info,
|
||||||
|
|
||||||
|
u32 mdss_fb_get_mode_switch(struct msm_fb_data_type *mfd);
|
||||||
|
void mdss_fb_report_panel_dead(struct msm_fb_data_type *mfd);
|
||||||
|
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||||
|
- struct fb_var_screeninfo *var);
|
||||||
|
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd);
|
||||||
|
void mdss_fb_calc_fps(struct msm_fb_data_type *mfd);
|
||||||
|
void mdss_fb_idle_pc(struct msm_fb_data_type *mfd);
|
||||||
|
#endif /* MDSS_FB_H */
|
||||||
|
diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
|
||||||
|
index b70db4faac09..951c7c7497d5 100644
|
||||||
|
--- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c
|
||||||
|
+++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
|
||||||
|
@@ -3846,7 +3846,7 @@ int mdss_mdp_dfps_update_params(struct msm_fb_data_type *mfd,
|
||||||
|
* data, so any further call to get the screen
|
||||||
|
* info has the updated timings.
|
||||||
|
*/
|
||||||
|
- mdss_panelinfo_to_fb_var(&pdata->panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
|
||||||
|
MDSS_XLOG(dfps);
|
||||||
|
mutex_unlock(&mdp5_data->dfps_lock);
|
Loading…
Reference in a new issue