motorola-ali: new device (Motorola Moto G6) (MR 1071)

[ci:skip-build] already built on CI in MR
This commit is contained in:
Julian Braha 2020-04-18 18:32:11 -04:00 committed by Alexey Min
parent 9e923e0561
commit 606b723450
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
24 changed files with 5751 additions and 0 deletions

View file

@ -0,0 +1,29 @@
# Contributor: Julian Braha <julianbraha@gmail.com>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-ali
pkgdesc="Motorola Moto G6"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-motorola-ali mkbootimg mesa-dri-swrast msm-fb-refresher mdss-fb-init-hack"
makedepends="devicepkg-dev"
source="deviceinfo initfs-hook.sh directfbrc fb.modes"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
install -Dm644 "$srcdir"/directfbrc "$pkgdir"/etc/directfbrc
}
sha512sums="2ef6a7490b157f16afe11121c1b5d584bfd357a218bff2d04dac6b212dc3a978cf3721c96bd04bc612d079ae3e0f6793c864be2fa89fd417242982b808981278 deviceinfo
977537b59e0f89d0db475108baae1d93a6678569ec4d7ab7c909562ebea7d645efb6a73b509b3e37369c1c556a8760cd9f46ba4e9bbb86e400cabcc0c2960230 initfs-hook.sh
3db3ec596e159be926ea2b5b2496c18e9bc7be24a64a232a56c89a0c9ee710aa2efb2b6fa9fc08efa34759e8242e6c629d08a4ce688ec8aa125830717c191515 directfbrc
e8ee37f49b360e06f7b5d54a93fcd2a7b3261436b2a228e8457a5c44fb52510f6173332155701a9d8ed435466732921ea5836aed73f1e7bc4049635f5a71fb31 fb.modes"

View file

@ -0,0 +1,30 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Motorola Moto G6"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-ali"
deviceinfo_year="2018"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2160"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 vmalloc=400M buildvariant=user"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1 @@
pixelformat=ARGB

View file

@ -0,0 +1,7 @@
mode "1080x2160-60"
# D: 156.104 MHz, H: 131.180 kHz, V: 60.009 Hz
geometry 1080 2160 1080 2160 16
timings 6406 53 53 24 1 4 1
accel false
rgba 8/0,8/8,8/16,8/24
endmode

View file

@ -0,0 +1,7 @@
#!/bin/sh
# enable touchscreen
echo 1 > /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/drv_irq
# fixes the "boot to black screen" issue
echo 0 0 > /sys/class/graphics/fb0/pan

View file

@ -0,0 +1,93 @@
From 51a1339a3206ed275b8021958a9a8d237322f9fa Mon Sep 17 00:00:00 2001
From: NeKit <nekit1000@gmail.com>
Date: Sun, 10 Dec 2017 14:41:20 +0300
Subject: [PATCH] Fix compile errors with gcc6 on postmarketOS
Change-Id: I1f426c864a0377b33b27da5cc6476f6ff888b6cb
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
include/linux/i2c/twl.h | 2 +-
kernel/timeconst.pl | 2 +-
scripts/mod/elf.h | 5 -----
5 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index f89515adac6..2bb8cac28b9 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index 0b13a72f855..8bf0a5abec9 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -62,11 +62,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 947543a0fba..ec7c8855117 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -735,7 +735,7 @@ static inline int twl4030_remove_script(u8 flags) { return -EINVAL; }
#ifdef CONFIG_TWL6030_POWER
extern void twl6030_power_init(struct twl4030_power_data *power_data);
#else
-extern inline void twl6030_power_init(struct twl4030_power_data *power_data) { }
+static inline void twl6030_power_init(struct twl4030_power_data *power_data) { }
#endif
struct twl4030_codec_audio_data {
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
index eb51d76e058..2ccb8fb87a1 100644
--- a/kernel/timeconst.pl
+++ b/kernel/timeconst.pl
@@ -370,7 +370,7 @@ if ($hz eq '--can') {
}
@val = @{$canned_values{$hz}};
- if (!defined(@val)) {
+ if (!@val) {
@val = compute_values($hz);
}
output($hz, @val);
diff --git a/scripts/mod/elf.h b/scripts/mod/elf.h
index aba4d0c4c1c..f898d3ee28b 100644
--- a/scripts/mod/elf.h
+++ b/scripts/mod/elf.h
@@ -22,8 +22,6 @@
/* #include <features.h> */
-__BEGIN_DECLS
-
/* Standard ELF types. */
#include <stdint.h>
@@ -2507,7 +2505,4 @@ typedef Elf32_Addr Elf32_Conflict;
/* Keep this the last entry. */
#define R_V850_NUM 25
-
-__END_DECLS
-
#endif /* elf.h */
--
2.13.2

View file

@ -0,0 +1,17 @@
diff --git a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
@@ -582,8 +582,7 @@
(char *)&nvDefaults.tables.hwCalValues.calData),"psSlpTimeOvrHdxLNA5G"},
{"ed",_ID_U8,SINGULAR,0,0,0,
((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
- (char *)&nvDefaults.tables.hwCalValues.calData) + sizeof(uint16),
- "nv_TxBBFSel9MHz"},
+ (char *)&nvDefaults.tables.hwCalValues.calData),"nv_TxBBFSel9MHz"},
{"ee",_ID_U8,SINGULAR,0,0,0,
((char *)&(nvDefaults.tables.hwCalValues.calData.hwParam2) -
(char *)&nvDefaults.tables.hwCalValues.calData),"hwParam2"},
@@ -839,4 +838,4 @@
int getTableNoOfFields(int tblIdx)
{
return tableNoOfFieldArray[tblIdx];
-}
+}

View file

@ -0,0 +1,13 @@
diff --git a/drivers/video/msm/msm_dba/msm_dba.c b/drivers/video/msm/msm_dba/msm_dba.c
index cc6512a..eb073a7 100644
--- a/drivers/video/msm/msm_dba/msm_dba.c
+++ b/drivers/video/msm/msm_dba/msm_dba.c
@@ -22,7 +22,7 @@
#include <linux/err.h>
#include <video/msm_dba.h>
-#include <msm_dba_internal.h>
+#include "msm_dba_internal.h"
static DEFINE_MUTEX(register_mutex);

View file

@ -0,0 +1,22 @@
diff --git a/drivers/net/ethernet/msm/rndis_ipa_trace.h b/drivers/net/ethernet/msm/rndis_ipa_trace.h
index c0fc573..c18046b 100644
--- a/drivers/net/ethernet/msm/rndis_ipa_trace.h
+++ b/drivers/net/ethernet/msm/rndis_ipa_trace.h
@@ -77,5 +77,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/net/ethernet/msm/
#include <trace/define_trace.h>
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
index d70abdf..7f7e452 100644
--- a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
+++ b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
@@ -131,5 +131,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/platform/msm/ipa/ipa_v2/
#include <trace/define_trace.h>

View file

@ -0,0 +1,331 @@
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h b/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h
new file mode 100644
index 0000000..d8c3b77
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h
@@ -0,0 +1,65 @@
+/*
+ * stmvl53l0-cci.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_CCI_H
+#define STMVL53L0_CCI_H
+#include <linux/types.h>
+
+#include <soc/qcom/camera2.h>
+#include "msm_camera_i2c.h"
+#include "msm_camera_dt_util.h"
+#include "msm_camera_io_util.h"
+#include "msm_cci.h"
+
+#define MSM_TOF_MAX_VREGS (10)
+
+struct msm_tof_vreg {
+ struct camera_vreg_t *cam_vreg;
+ void *data[MSM_TOF_MAX_VREGS];
+ int num_vreg;
+};
+
+struct cci_data {
+ struct msm_camera_i2c_client g_client;
+ struct msm_camera_i2c_client *client;
+ struct platform_device *pdev;
+ enum msm_camera_device_type_t device_type;
+ enum cci_i2c_master_t cci_master;
+ struct msm_tof_vreg vreg_cfg;
+ struct msm_sd_subdev msm_sd;
+ struct v4l2_subdev sdev;
+ struct v4l2_subdev_ops *subdev_ops;
+ char subdev_initialized;
+ uint32_t subdev_id;
+ uint8_t power_up;
+ uint32_t lowv;
+ uint32_t highv;
+ uint32_t xtalk;
+ struct msm_camera_gpio_conf gconf;
+ struct msm_pinctrl_info pinctrl_info;
+};
+int stmvl53l0_init_cci(void);
+void stmvl53l0_exit_cci(void *);
+int stmvl53l0_power_down_cci(void *);
+int stmvl53l0_power_up_cci(void *, unsigned int *);
+
+#endif /* STMVL53L0_CCI_H */
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h b/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h
new file mode 100644
index 0000000..a75a9e5
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h
@@ -0,0 +1,47 @@
+/*
+ * stmvl53l0-i2c.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_I2C_H
+#define STMVL53L0_I2C_H
+#include <linux/types.h>
+#include <soc/qcom/camera2.h>
+#include "msm_camera_i2c.h"
+#include "msm_camera_dt_util.h"
+#include "msm_camera_io_util.h"
+#include "msm_cci.h"
+
+struct i2c_data {
+ struct i2c_client *client;
+ struct regulator *vana;
+ uint8_t power_up;
+ uint32_t lowv;
+ uint32_t highv;
+ uint32_t xtalk;
+ struct msm_camera_gpio_conf gconf;
+ struct msm_pinctrl_info pinctrl_info;
+};
+int stmvl53l0_init_i2c(void);
+void stmvl53l0_exit_i2c(void *);
+int stmvl53l0_power_up_i2c(void *, unsigned int *);
+int stmvl53l0_power_down_i2c(void *);
+
+#endif /* STMVL53L0_I2C_H */
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0.h b/drivers/input/misc/vl53L0/inc/stmvl53l0.h
new file mode 100644
index 0000000..4ae84c9
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0.h
@@ -0,0 +1,201 @@
+/*
+ * stmvl53l0.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_H
+#define STMVL53L0_H
+
+#include <linux/types.h>
+#include <linux/mutex.h>
+#include <linux/workqueue.h>
+#include <linux/miscdevice.h>
+
+#define STMVL53L0_DRV_NAME "stmvl53l0"
+#define STMVL53L0_SLAVE_ADDR (0x52>>1)
+
+#define DRIVER_VERSION "1.1.18"
+#define DRIVER_VERSION_NUM 18
+#define I2C_M_WR 0x00
+/* #define INT_POLLING_DELAY 20 */
+
+/* if don't want to have output from vl6180_dbgmsg, comment out #DEBUG macro */
+/*#define DEBUG*/
+/* #define vl6180_dbgmsg(str, args...) pr_debug("%s: " str, __func__, ##args) */
+#define vl53l0_dbgmsg_en(str, args...) \
+ pr_debug("%s: " str, __func__, ##args)
+
+#define vl53l0_dbgmsg(str, args...) \
+ pr_debug("%s: " str, __func__, ##args)
+/* #define vl6180_errmsg(str, args...) pr_err("%s: " str, __func__, ##args) */
+#define vl53l0_errmsg(str, args...) \
+ printk(KERN_ERR "%s: " str, __func__, ##args)
+
+#define VL53L0_VDD_MIN 2850000
+#define VL53L0_VDD_MAX 2850000
+/*driver working mode*/
+#define OFF_MODE 0
+#define CAM_MODE 1
+#define SAR_MODE 2
+#define SUPER_MODE 3
+#define XTALKCAL_MODE 4
+#define OFFSETCAL_MODE 5
+
+/*user actions*/
+#define CAM_ON 0
+#define CAM_OFF 1
+#define SAR_ON 2
+#define SAR_OFF 3
+#define XTALKCAL_ON 4
+#define OFFSETCAL_ON 5
+#define CAL_OFF 6
+#define RESET 7
+/*parameter types*/
+#define OFFSET_PAR 0
+#define XTALKRATE_PAR 1
+#define XTALKENABLE_PAR 2
+#define SIGMAVAL_PRA 3
+#define SIGMACTL_PRA 4
+#define WRAPAROUNDCTL_PRA 5
+#define INTERMEASUREMENTPERIOD_PAR 6
+#define MEASUREMENTTIMINGBUDGET_PAR 7
+#define SGLVAL_PRA 8
+#define SGLCTL_PRA 9
+#define CUTV_PRA 10
+#define DRVV_PRA 11
+#define PLLPRE_PRA 12
+#define PLLFINAL_PRA 13
+#define CCI_BUS 0
+#define I2C_BUS 1
+
+
+/*
+ * IOCTL register data structs
+ */
+struct stmvl53l0_register {
+ uint32_t is_read; /*1: read 0: #define write*/
+ uint32_t reg_index;
+ uint32_t reg_bytes;
+ uint32_t reg_data;
+ int32_t status;
+};
+
+/*
+ * IOCTL parameter structs
+ */
+struct stmvl53l0_parameter {
+ uint32_t is_read; /*1: Get 0: Set*/
+ uint32_t name;
+ int32_t value;
+ int32_t status;
+};
+
+/*
+ * driver data structs
+ */
+struct stmvl53l0_data {
+ /* embed ST VL53L0 Dev data as "dev_data" */
+ VL53L0_DevData_t Data;
+ /* i2c device address user specific field */
+ uint8_t I2cDevAddr;
+ uint8_t comms_type;
+ uint16_t comms_speed_khz;
+
+ struct cci_data cci_client_object;
+ struct i2c_data i2c_client_object;
+ void *client_object;
+ struct mutex update_lock;
+ struct delayed_work dwork; /* for PS work handler */
+ struct delayed_work initwork;
+ struct delayed_work resetwork;
+ struct delayed_work checkwork;
+ struct input_dev *input_dev_ps;
+ struct kobject *range_kobj;
+
+ const char *dev_name;
+
+ /* misc device */
+ struct miscdevice miscdev;
+
+ int irq;
+ unsigned int reset;
+
+ /* control flag from HAL */
+ unsigned int enable_ps_sensor;
+
+ /* PS parameters */
+ unsigned int ps_is_singleshot;
+ unsigned int ps_is_started;
+ unsigned int ps_data; /* to store PS data */
+
+ /* Range Data */
+ VL53L0_RangingMeasurementData_t rangeData;
+ int offset;
+ int xtalk;
+
+ /* delay time in miniseconds*/
+ unsigned int delay_ms;
+
+ struct mutex work_mutex;
+ /* Debug */
+ unsigned int enableDebug;
+ uint8_t interrupt_received;
+ int d_mode;
+ uint8_t w_mode;
+ /*for SAR mode indicate low range interrupt*/
+ uint8_t lowint;
+ uint8_t bus_type;
+ uint32_t lowv;
+ uint32_t highv;
+ wait_queue_head_t range_data_wait;
+ uint8_t d_ready;
+ uint8_t cut_v;
+ unsigned int xtalkCalDistance;
+ unsigned int offsetCalDistance;
+ unsigned int xtalkcalval;
+ VL53L0_GpioFunctionality gpio_function;
+ uint8_t c_suspend;
+ uint8_t c_stopped;
+ uint32_t refSpadCount;
+ uint8_t isApertureSpads;
+ uint8_t VhvSettings;
+ uint8_t PhaseCal;
+ uint8_t pll_p;
+ uint8_t pll_f;
+};
+
+/*
+ * funtion pointer structs
+ */
+struct stmvl53l0_module_fn_t {
+ int (*init)(void);
+ void (*deinit)(void *);
+ int (*power_up)(void *, unsigned int *);
+ int (*power_down)(void *);
+};
+
+struct stmvl53l0_data *stmvl53l0_getobject(void);
+int stmvl53l0_setup(struct stmvl53l0_data *data, uint8_t type);
+int stmvl53l0_checkmoduleid(struct stmvl53l0_data *data,
+ void *client, uint8_t type);
+int stmvl53l0_livechecking(struct stmvl53l0_data *data);
+void i2c_setclient(void *client, uint8_t type);
+
+#endif /* STMVL53L0_H */

View file

@ -0,0 +1,68 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/ali_defconfig
pkgname=linux-motorola-ali
pkgver=3.18.140
pkgrel=0
pkgdesc="Motorola Moto G6 kernel fork"
arch="armv7"
_carch="arm"
_flavor="motorola-ali"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6"
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="kernel-msm"
_commit="974646412f6e865f6847a7c6b72528f3a14bdb56"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/Uclydde/$_repository/archive/$_commit.tar.gz
$_config
01_prima_gcc6.patch
04_fix_stmvl53l0_headers.patch
fix_focaltech_recursive_dependency.patch
fix_mdp_ctrl_off.patch
fix_fb.patch
fix_fb_h.patch
fix_mdss_overlay.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
REPLACE_GCCH=0
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" O="$_outdir" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Generate master DTB (deviceinfo_bootimg_qcdt)
dtbTool -s 2048 -p "scripts/dtc/" -o "$_outdir/arch/arm/boot/dt.img" "$_outdir/arch/arm/boot/"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="9ce6156aa8fd62ba1dff15413b526a870f45368d72774690f43229de82935acc52fcc58467e9bb72cca889ce03f6978ef1be454fd671c0fe845341c09d51d648 linux-motorola-ali-974646412f6e865f6847a7c6b72528f3a14bdb56.tar.gz
18b2bcf7dacfd2b963162a85a21bed437bbb78aa68f1dd33637d7d853b83897876055467276f8d2d9c057ee6cea139231b37ea4757af3a281ba7e0676a55b818 config-motorola-ali.armv7
e32df5d5251c74bafa4a27973129b4a7b79097a8d406832316ae2ff18f516d76fbc0cd289b67344981efdf62d92ff439f7b573a1ac895c3e79271ee95fcf9610 01_prima_gcc6.patch
1a128e1483459144726458175314c58528e6b1f1a85e5f4230fa0461b0c3dd650037567f672c220a95618f9df023a82a35f010e8e8b784e349806516c1daaf7e 04_fix_stmvl53l0_headers.patch
e2cf5b20831c05881780b7db1f40135ca7c8e0d2a4f7a8afa4eee16c7eae1711f2f02f72266309d52cb4437e9580ed58472e768c266f1283994ab1098861e9fc fix_focaltech_recursive_dependency.patch
3ccfaf591befba3b67d24134a516352173767cac0479d3011f077866e02a792f3581e50d05110375a8f84876213823d37d3791c4cb82f19f212bc4bee57934c8 fix_mdp_ctrl_off.patch
cb7edd7bf9642400276ccb1ddf38cc4ed6fd934c0f0fbc43839903dfd9a3d433121d7624f53be309a10e1703024079d25b369016ccadc870dfd31d988dc22b77 fix_fb.patch
3532faa75cbdbe034082420491abbf61c4a0a744b5d5c676ee9e1de971655dfac77129932baf78ad45ff0f01c3fa139253d1a3ff8461671536a9aebc5d16586a fix_fb_h.patch
eb183307dd0b79407c0b6c92cdc9898d2834a8309938e1af14708e94a375c1c68b5f63c0096bae7e29f28d9191dd73c33d0bbf0686fb722daa37bcabc92dea3f fix_mdss_overlay.patch"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h
index 5d57ec8c28ff..cc69fa018d65 100644
--- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h
+++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h
@@ -31,9 +31,10 @@
#include <media/msm_cam_sensor.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-ioctl.h>
-#include "msm_camera_i2c.h"
-#include "msm_camera_dt_util.h"
-#include "msm_sd.h"
+
+#include "io/msm_camera_i2c.h"
+#include "io/msm_camera_dt_util.h"
+#include "../msm_sd.h"
#define DEFINE_MSM_MUTEX(mutexname) \
static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)

View file

@ -0,0 +1,12 @@
diff --git a/include/trace/events/msm_cam.h b/include/trace/events/msm_cam.h
index b52845407ef0..2cd283db8d32 100644
--- a/include/trace/events/msm_cam.h
+++ b/include/trace/events/msm_cam.h
@@ -16,7 +16,7 @@
#if !defined(_TRACE_MSM_VFE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_MSM_VFE_H
-#include "msm_isp.h"
+#include "../../../drivers/media/platform/msm/camera_v2/isp/msm_isp.h"
#include <linux/types.h>
#include <linux/tracepoint.h>

View file

@ -0,0 +1,76 @@
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
@@ -2130,7 +2130,7 @@
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");
@@ -2274,7 +2274,7 @@
* 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)
@@ -3018,7 +3018,7 @@
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)
@@ -3729,7 +3729,7 @@
}
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,
@@ -3951,9 +3951,14 @@
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);
@@ -3989,7 +3994,14 @@
if (pinfo->physical_height)
var->height = pinfo->physical_height;
- pr_debug("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
+ //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);
@@ -5562,4 +5574,4 @@
mfd->fps_info.last_sampled_time_us = current_time_us;
mfd->fps_info.frame_count = 0;
}
-}
+}

View file

@ -0,0 +1,10 @@
diff --git a/drivers/video/msm/mdss/mdss_fb.h b/drivers/video/msm/mdss/mdss_fb.h
@@ -471,7 +471,6 @@
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);
#endif /* MDSS_FB_H */

View file

@ -0,0 +1,9 @@
diff --git a/drivers/input/touchscreen/focaltech_mmi/Kconfig b/drivers/input/touchscreen/focaltech_mmi/Kconfig
@@ -82,7 +82,6 @@
config TOUCHSCREEN_FOCALTECH_UPGRADE_8006S_MMI
bool "Add ft8006S IC support for Focaltech Touchscreen"
depends on TOUCHSCREEN_FOCALTECH_UPGRADE_8006U_MMI
- select TOUCHSCREEN_FOCALTECH_UPGRADE_MMI
help
Say Y here will
-Add FT8006S IC upgrade support.

View file

@ -0,0 +1,10 @@
diff --git a/drivers/video/msm/mdss/mdp3_ctrl.c b/drivers/video/msm/mdss/mdp3_ctrl.c
@@ -3186,7 +3186,7 @@
frame_rate = mdss_panel_get_framerate(mfd->panel_info,
FPS_RESOLUTION_HZ);
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,10 @@
diff --git a/drivers/video/msm/mdss/mdss_mdp_overlay.c b/drivers/video/msm/mdss/mdss_mdp_overlay.c
@@ -3846,7 +3846,7 @@
* 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);

View file

@ -0,0 +1,13 @@
diff --git a/drivers/video/msm/msm_dba/msm_dba.c b/drivers/video/msm/msm_dba/msm_dba.c
index cc6512a..eb073a7 100644
--- a/drivers/video/msm/msm_dba/msm_dba.c
+++ b/drivers/video/msm/msm_dba/msm_dba.c
@@ -22,7 +22,7 @@
#include <linux/err.h>
#include <video/msm_dba.h>
-#include <msm_dba_internal.h>
+#include "msm_dba_internal.h"
static DEFINE_MUTEX(register_mutex);

View file

@ -0,0 +1,10 @@
diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c
@@ -19,7 +19,7 @@
#include <linux/timer.h>
#include "f_gsi.h"
#include "rndis.h"
-#include "debug.h"
+#include "../debug.h"
static unsigned int gsi_in_aggr_size;
module_param(gsi_in_aggr_size, uint, S_IRUGO | S_IWUSR);

View file

@ -0,0 +1,10 @@
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
@@ -32,7 +32,7 @@
#include <linux/usb/audio.h>
#include <linux/usb/midi.h>
-#include "u_f.h"
+#include "../u_f.h"
MODULE_AUTHOR("Ben Williamson");
MODULE_LICENSE("GPL v2");

View file

@ -0,0 +1,16 @@
diff --git a/drivers/usb/gadget/function/f_mtp.c b/drivers/usb/gadget/function/f_mtp.c
@@ -40,7 +40,7 @@
#include <linux/configfs.h>
#include <linux/usb/composite.h>
-#include "configfs.h"
+#include "../configfs.h"
#define MTP_RX_BUFFER_INIT_SIZE 1048576
#define MTP_BULK_BUFFER_SIZE 16384
@@ -1924,4 +1924,4 @@
}
DECLARE_USB_FUNCTION_INIT(mtp, mtp_alloc_inst, mtp_alloc);
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL");

View file

@ -0,0 +1,10 @@
diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c
@@ -27,7 +27,7 @@
#include "u_ether_configfs.h"
#include "u_rndis.h"
#include "rndis.h"
-#include "configfs.h"
+#include "../configfs.h"
/*
* This function is an RNDIS Ethernet port -- a Microsoft protocol that's