Skip to content

Instantly share code, notes, and snippets.

@Dil3mm4
Created April 16, 2024 17:14
Show Gist options
  • Save Dil3mm4/703ead186b19e248aea826c599a68ccb to your computer and use it in GitHub Desktop.
Save Dil3mm4/703ead186b19e248aea826c599a68ccb to your computer and use it in GitHub Desktop.
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 3f38fd78da68..5372fd934e70 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -43,8 +43,11 @@ dtb-y += g12a_s905y2_radxa0_4g.dtb
dtb-y += g12a_s905y2_u220.dtb
dtb-y += g12a_s905y2_u221.dtb
dtb-y += g12a_s905y2_u223_lp.dtb
+dtb-y += g12b_a311d_radxa02pro.dtb
+dtb-y += g12b_a311d_dscs9.dtb
dtb-y += g12b_a311d_skt.dtb
dtb-y += g12b_a311d_skt_a.dtb
+dtb-y += g12b_a311d_w200_b4g.dtb
dtb-y += g12b_a311d_w200.dtb
dtb-y += g12b_a311d_w200_a.dtb
dtb-y += g12b_a311d_w400.dtb
@@ -105,7 +108,6 @@ dtb-y += sm1_s905d3_ac200_buildroot.dtb
dtb-y += sm1_s905d3_ac200_drm_buildroot.dtb
dtb-y += sm1_s905d3_ac202.dtb
dtb-y += sm1_s905d3_ac202_1g.dtb
-dtb-y += sm1_s905d3_radxa02.dtb
dtb-y += sm1_s905d3_sabrina.dtb
dtb-y += sm1_s905d3_skt.dtb
dtb-y += sm1_s905x3_ac212.dtb
diff --git a/arch/arm64/configs/g12a_defconfig b/arch/arm64/configs/g12a_defconfig
index cf3eba0e5039..ab4c5a405a80 100644
--- a/arch/arm64/configs/g12a_defconfig
+++ b/arch/arm64/configs/g12a_defconfig
@@ -64,7 +64,6 @@ CONFIG_ARM64_SW_TTBR0_PAN=y
CONFIG_RANDOMIZE_BASE=y
# CONFIG_EFI is not set
CONFIG_COMPAT=y
-CONFIG_COMPAT_VDSO=y
CONFIG_PM_WAKELOCKS=y
CONFIG_CPU_IDLE=y
CONFIG_ARM_CPUIDLE=y
@@ -105,9 +104,9 @@ CONFIG_IPV6_VTI=y
# CONFIG_IPV6_SIT is not set
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_NETFILTER=y
-# CONFIG_BRIDGE_NETFILTER is not set
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_SECMARK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_SCTP=y
@@ -296,6 +295,7 @@ CONFIG_AMLOGIC_MEDIA_VDIN=y
CONFIG_AMLOGIC_MEDIA_VIUIN=y
CONFIG_AMLOGIC_MEDIA_TVIN_BT656=y
CONFIG_AMLOGIC_MEDIA_TVIN_CSI=y
+CONFIG_AMLOGIC_MEDIA_TVIN_AFE=y
CONFIG_AMLOGIC_MEDIA_VIDEO_PROCESSOR=y
CONFIG_AMLOGIC_V4L_VIDEO=y
CONFIG_AMLOGIC_V4L_VIDEO2=y
@@ -346,6 +346,8 @@ CONFIG_AMLOGIC_WDT_MESON_V3=y
CONFIG_AMLOGIC_ESM=y
CONFIG_AMLOGIC_WIFI=y
CONFIG_AMLOGIC_BT_DEVICE=y
+CONFIG_AMLOGIC_DVB_EXTERN=y
+CONFIG_AMLOGIC_DVB_DMX=m
CONFIG_AMLOGIC_POWER=y
CONFIG_AMLOGIC_PCIE=y
CONFIG_AMLOGIC_IRBLASTER_CORE=y
@@ -511,6 +513,7 @@ CONFIG_REGULATOR_PWM=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_DVB_DYNAMIC_MINORS=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=y
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
@@ -550,111 +553,9 @@ CONFIG_USB_VIDEO_CLASS=y
# CONFIG_MEDIA_TUNER_R820T is not set
# CONFIG_MEDIA_TUNER_MXL301RF is not set
# CONFIG_MEDIA_TUNER_QM1D1C0042 is not set
-# CONFIG_DVB_STB0899 is not set
-# CONFIG_DVB_STB6100 is not set
-# CONFIG_DVB_STV090x is not set
-# CONFIG_DVB_STV6110x is not set
-# CONFIG_DVB_DRXK is not set
-# CONFIG_DVB_TDA18271C2DD is not set
-# CONFIG_DVB_SI2165 is not set
-# CONFIG_DVB_MN88472 is not set
-# CONFIG_DVB_MN88473 is not set
-# CONFIG_DVB_CX24110 is not set
-# CONFIG_DVB_CX24123 is not set
-# CONFIG_DVB_MT312 is not set
-# CONFIG_DVB_ZL10036 is not set
-# CONFIG_DVB_ZL10039 is not set
-# CONFIG_DVB_S5H1420 is not set
-# CONFIG_DVB_STV0288 is not set
-# CONFIG_DVB_STB6000 is not set
-# CONFIG_DVB_STV0299 is not set
-# CONFIG_DVB_STV6110 is not set
-# CONFIG_DVB_STV0900 is not set
-# CONFIG_DVB_TDA8083 is not set
-# CONFIG_DVB_TDA10086 is not set
-# CONFIG_DVB_TDA8261 is not set
-# CONFIG_DVB_VES1X93 is not set
-# CONFIG_DVB_TUNER_ITD1000 is not set
-# CONFIG_DVB_TUNER_CX24113 is not set
-# CONFIG_DVB_TDA826X is not set
-# CONFIG_DVB_TUA6100 is not set
-# CONFIG_DVB_CX24116 is not set
-# CONFIG_DVB_CX24117 is not set
-# CONFIG_DVB_CX24120 is not set
-# CONFIG_DVB_SI21XX is not set
-# CONFIG_DVB_TS2020 is not set
-# CONFIG_DVB_DS3000 is not set
-# CONFIG_DVB_MB86A16 is not set
-# CONFIG_DVB_TDA10071 is not set
-# CONFIG_DVB_SP8870 is not set
-# CONFIG_DVB_SP887X is not set
-# CONFIG_DVB_CX22700 is not set
-# CONFIG_DVB_CX22702 is not set
-# CONFIG_DVB_S5H1432 is not set
-# CONFIG_DVB_DRXD is not set
-# CONFIG_DVB_L64781 is not set
-# CONFIG_DVB_TDA1004X is not set
-# CONFIG_DVB_NXT6000 is not set
-# CONFIG_DVB_MT352 is not set
-# CONFIG_DVB_ZL10353 is not set
-# CONFIG_DVB_DIB3000MB is not set
-# CONFIG_DVB_DIB3000MC is not set
-# CONFIG_DVB_DIB7000M is not set
-# CONFIG_DVB_DIB7000P is not set
-# CONFIG_DVB_DIB9000 is not set
-# CONFIG_DVB_TDA10048 is not set
-# CONFIG_DVB_AF9013 is not set
-# CONFIG_DVB_EC100 is not set
-# CONFIG_DVB_HD29L2 is not set
-# CONFIG_DVB_STV0367 is not set
-# CONFIG_DVB_CXD2820R is not set
-# CONFIG_DVB_CXD2841ER is not set
-# CONFIG_DVB_VES1820 is not set
-# CONFIG_DVB_TDA10021 is not set
-# CONFIG_DVB_TDA10023 is not set
-# CONFIG_DVB_STV0297 is not set
-# CONFIG_DVB_NXT200X is not set
-# CONFIG_DVB_OR51211 is not set
-# CONFIG_DVB_OR51132 is not set
-# CONFIG_DVB_BCM3510 is not set
-# CONFIG_DVB_LGDT330X is not set
-# CONFIG_DVB_LGDT3305 is not set
-# CONFIG_DVB_LGDT3306A is not set
-# CONFIG_DVB_LG2160 is not set
-# CONFIG_DVB_S5H1409 is not set
-# CONFIG_DVB_AU8522_DTV is not set
-# CONFIG_DVB_AU8522_V4L is not set
-# CONFIG_DVB_S5H1411 is not set
-# CONFIG_DVB_S921 is not set
-# CONFIG_DVB_DIB8000 is not set
-# CONFIG_DVB_MB86A20S is not set
-# CONFIG_DVB_TC90522 is not set
-# CONFIG_DVB_PLL is not set
-# CONFIG_DVB_TUNER_DIB0070 is not set
-# CONFIG_DVB_TUNER_DIB0090 is not set
-# CONFIG_DVB_DRX39XYJ is not set
-# CONFIG_DVB_LNBH25 is not set
-# CONFIG_DVB_LNBP21 is not set
-# CONFIG_DVB_LNBP22 is not set
-# CONFIG_DVB_ISL6405 is not set
-# CONFIG_DVB_ISL6421 is not set
-# CONFIG_DVB_ISL6423 is not set
-# CONFIG_DVB_A8293 is not set
-# CONFIG_DVB_SP2 is not set
-# CONFIG_DVB_LGS8GL5 is not set
-# CONFIG_DVB_LGS8GXX is not set
-# CONFIG_DVB_ATBM8830 is not set
-# CONFIG_DVB_TDA665x is not set
-# CONFIG_DVB_IX2505V is not set
-# CONFIG_DVB_M88RS2000 is not set
-# CONFIG_DVB_AF9033 is not set
-# CONFIG_DVB_HORUS3A is not set
-# CONFIG_DVB_ASCOT2E is not set
-# CONFIG_DVB_HELENE is not set
# CONFIG_VGA_ARB is not set
CONFIG_FB=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
-# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_SOUND=y
@@ -683,6 +584,8 @@ CONFIG_UHID=y
CONFIG_HID_A4TECH=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_NINTENDO=y
+CONFIG_HID_PLAYSTATION=y
+CONFIG_PLAYSTATION_FF=y
CONFIG_HID_SONY=y
CONFIG_SONY_FF=y
CONFIG_USB_HIDDEV=y
diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c b/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c
index 01ed01f6a41e..c4ce0c2c9448 100644
--- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c
+++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c
@@ -87,8 +87,6 @@ static bool enable_db_reg = true;
module_param(enable_db_reg, bool, 0644);
MODULE_PARM_DESC(enable_db_reg, "enable/disable tvafe load reg");
-int top_init_en;
-
/*0: atv playmode*/
/*1: atv search mode*/
static bool tvafe_mode;
@@ -703,37 +701,6 @@ static struct tvin_decoder_ops_s tvafe_dec_ops = {
.callmaster_det = NULL,
};
-static bool white_pattern_reset_pag(enum tvin_port_e port,
- struct tvafe_cvd2_s cvd2)
-{
- if (IS_TVAFE_AVIN_SRC(port)) {
- if (port == TVIN_PORT_CVBS1) {
- if (av1_plugin_state == 1) {
- top_init_en = 1;
- return true;
- }
- }
-
- if (port == TVIN_PORT_CVBS2) {
- if (av2_plugin_state == 1) {
- top_init_en = 1;
- return true;
- }
- }
-
- if (((av1_plugin_state == 0) || (av2_plugin_state == 0)) &&
- top_init_en && (cvd2.info.state_cnt == 3)) {
- white_pattern_pga_reset(port);
- tvafe_pr_info("av1:%u av2:%u\n", av1_plugin_state,
- av2_plugin_state);
- top_init_en = 0;
- return true;
- }
- }
-
- return false;
-}
-
/*
* tvafe signal signal status: signal on/off
*/
@@ -758,9 +725,6 @@ bool tvafe_is_nosig(struct tvin_frontend_s *fe)
if ((port < TVIN_PORT_CVBS0) || (port > TVIN_PORT_CVBS3))
return ret;
- if (white_pattern_reset_pag(port, tvafe->cvd2))
- return true;
-
if (tvafe->cvd2.info.smr_cnt++ >= 65536)
tvafe->cvd2.info.smr_cnt = 0;
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
index 0ab5633f15d0..308a286c6cbe 100644
--- a/security/selinux/include/security.h
+++ b/security/selinux/include/security.h
@@ -75,12 +75,9 @@ enum {
};
#define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1)
-extern int selinux_android_netlink_route;
-extern int selinux_android_netlink_getneigh;
extern int selinux_policycap_netpeer;
extern int selinux_policycap_openperm;
extern int selinux_policycap_alwaysnetwork;
-extern int selinux_android_netlink_getneigh;
/*
* type_datum properties
@@ -266,7 +263,6 @@ extern struct vfsmount *selinuxfs_mount;
extern void selnl_notify_setenforce(int val);
extern void selnl_notify_policyload(u32 seqno);
extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
-extern void selinux_nlmsg_init(void);
#endif /* _SELINUX_SECURITY_H_ */
diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c
index 957e37041ea7..2ca9cde939d4 100644
--- a/security/selinux/nlmsgtab.c
+++ b/security/selinux/nlmsgtab.c
@@ -193,44 +193,3 @@ int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm)
return err;
}
-
-
-static void nlmsg_set_perm_for_type(u32 perm, u16 type)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(nlmsg_route_perms); i++) {
- if (nlmsg_route_perms[i].nlmsg_type == type) {
- nlmsg_route_perms[i].perm = perm;
- break;
- }
- }
-}
-/**
- * Use nlmsg_readpriv as the permission for RTM_GETLINK messages if the
- * netlink_route_getlink policy capability is set. Otherwise use nlmsg_read.
- * Similarly, use nlmsg_getneigh for RTM_GETNEIGH and RTM_GETNEIGHTBL if the
- * netlink_route_getneigh policy capability is set. Otherwise use nlmsg_read.
- */
-void selinux_nlmsg_init(void)
-{
- if (selinux_android_netlink_route) {
- nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READPRIV,
- RTM_GETLINK);
- } else {
- nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READ,
- RTM_GETLINK);
- }
-
- if (selinux_android_netlink_getneigh) {
- nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_GETNEIGH,
- RTM_GETNEIGH);
- nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_GETNEIGH,
- RTM_GETNEIGHTBL);
- } else {
- nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READ,
- RTM_GETNEIGH);
- nlmsg_set_perm_for_type(NETLINK_ROUTE_SOCKET__NLMSG_READ,
- RTM_GETNEIGHTBL);
- }
-}
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 649c0fec5e8a..6ca297821d45 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -70,12 +70,9 @@
#include "ebitmap.h"
#include "audit.h"
-int selinux_android_netlink_route;
-int selinux_android_netlink_getneigh;
int selinux_policycap_netpeer;
int selinux_policycap_openperm;
int selinux_policycap_alwaysnetwork;
-int selinux_android_netlink_getneigh;
static DEFINE_RWLOCK(policy_rwlock);
@@ -1994,10 +1991,6 @@ static void security_load_policycaps(void)
POLICYDB_CAPABILITY_OPENPERM);
selinux_policycap_alwaysnetwork = ebitmap_get_bit(&policydb.policycaps,
POLICYDB_CAPABILITY_ALWAYSNETWORK);
-
- selinux_android_netlink_route = policydb.android_netlink_route;
- selinux_android_netlink_getneigh = policydb.android_netlink_getneigh;
- selinux_nlmsg_init();
}
static int security_preserve_bools(struct policydb *p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment