Merge pull request #2776 from MilhouseVH/linux4170

linux (Generic): update to linux-4.17.2
This commit is contained in:
CvH 2018-06-17 21:53:12 +02:00 committed by GitHub
commit dd4eaa1487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 29161 additions and 1353 deletions

View File

@ -264,6 +264,18 @@ kernel_config_path() {
done
}
kernel_make() {
LDFLAGS="" make CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
ARCH="$TARGET_KERNEL_ARCH" \
HOSTCC="$TOOLCHAIN/bin/host-gcc" \
HOSTCXX="$TOOLCHAIN/bin/host-g++" \
HOSTCFLAGS="$HOST_CFLAGS" \
HOSTLDFLAGS="$HOST_LDFLAGS" \
HOSTCXXFLAGS="$HOST_CXXFLAGS" \
DEPMOD="$TOOLCHAIN/bin/depmod" \
"$@"
}
# get kernel module dir
get_module_dir() {
if [ -n "${_CACHED_KERNEL_MODULE_DIR}" ]; then

View File

@ -47,7 +47,7 @@ pre_make_target() {
}
make_target() {
make SRCDIR=$(kernel_path) untar
kernel_make SRCDIR=$(kernel_path) untar
# copy config file
if [ "$PROJECT" = Generic ]; then
@ -72,7 +72,7 @@ make_target() {
fi
# add menuconfig to edit .config
make VER=$KERNEL_VER SRCDIR=$(kernel_path)
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
}
makeinstall_target() {

View File

@ -47,7 +47,7 @@ pre_make_target() {
make_target() {
cp -RP $(get_build_dir media_tree)/* $PKG_BUILD/linux
make VER=$KERNEL_VER SRCDIR=$(kernel_path) stagingconfig
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) stagingconfig
# hack to workaround media_build bug
if [ $LINUX = "amlogic-3.14" -o $LINUX = "amlogic-3.10" ]; then
@ -56,7 +56,7 @@ make_target() {
sed -e 's/CONFIG_VIDEO_S5C73M3=m/# CONFIG_VIDEO_S5C73M3 is not set/g' -i v4l/.config
fi
make VER=$KERNEL_VER SRCDIR=$(kernel_path)
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
}
makeinstall_target() {

View File

@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC 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.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8188EU"
PKG_VERSION="c5113ff"
PKG_SHA256="c80bdf4740696eb2b903089efbb913b218c2f71a5c791dc91e43dd578528a440"
PKG_VERSION="277e396"
PKG_SHA256="5a3582ddd259b072d47956070f1df2985045c4005db3871fc152e43bc0f579e8"
PKG_ARCH="any"
PKG_LICENSE="GPL"
# realtek: PKG_SITE="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true"

View File

@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC 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.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8192CU"
PKG_VERSION="8757801"
PKG_SHA256="8738f74fbfb003dd4de77c482d70fca9dacb05ab4eb44147a8046fb4d5531ee7"
PKG_VERSION="756f2ec"
PKG_SHA256="83e0858914dfe1455df9fd824ade8776746b8730143ae3946f7b7f9556fd9365"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/pvaret/rtl8192cu-fixes"

View File

@ -1,259 +0,0 @@
diff -Naur a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
--- a/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:32:35.544763290 +0100
+++ b/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:33:02.888918609 +0100
@@ -57,7 +57,7 @@
}
#define CHAN2G(_channel, _freq, _flags) { \
- .band = IEEE80211_BAND_2GHZ, \
+ .band = NL80211_BAND_2GHZ, \
.center_freq = (_freq), \
.hw_value = (_channel), \
.flags = (_flags), \
@@ -66,7 +66,7 @@
}
#define CHAN5G(_channel, _flags) { \
- .band = IEEE80211_BAND_5GHZ, \
+ .band = NL80211_BAND_5GHZ, \
.center_freq = 5000 + (5 * (_channel)), \
.hw_value = (_channel), \
.flags = (_flags), \
@@ -166,18 +166,18 @@
}
struct ieee80211_supported_band *rtw_spt_band_alloc(
- enum ieee80211_band band
+ enum nl80211_band band
)
{
struct ieee80211_supported_band *spt_band = NULL;
int n_channels, n_bitrates;
- if(band == IEEE80211_BAND_2GHZ)
+ if(band == NL80211_BAND_2GHZ)
{
n_channels = RTW_2G_CHANNELS_NUM;
n_bitrates = RTW_G_RATES_NUM;
}
- else if(band == IEEE80211_BAND_5GHZ)
+ else if(band == NL80211_BAND_5GHZ)
{
n_channels = RTW_5G_CHANNELS_NUM;
n_bitrates = RTW_A_RATES_NUM;
@@ -201,12 +201,12 @@
spt_band->n_channels = n_channels;
spt_band->n_bitrates = n_bitrates;
- if(band == IEEE80211_BAND_2GHZ)
+ if(band == NL80211_BAND_2GHZ)
{
rtw_2g_channels_init(spt_band->channels);
rtw_2g_rates_init(spt_band->bitrates);
}
- else if(band == IEEE80211_BAND_5GHZ)
+ else if(band == NL80211_BAND_5GHZ)
{
rtw_5g_channels_init(spt_band->channels);
rtw_5g_rates_init(spt_band->bitrates);
@@ -226,13 +226,13 @@
if(!spt_band)
return;
- if(spt_band->band == IEEE80211_BAND_2GHZ)
+ if(spt_band->band == NL80211_BAND_2GHZ)
{
size = sizeof(struct ieee80211_supported_band)
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
+ sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM;
}
- else if(spt_band->band == IEEE80211_BAND_5GHZ)
+ else if(spt_band->band == NL80211_BAND_5GHZ)
{
size = sizeof(struct ieee80211_supported_band)
+ sizeof(struct ieee80211_channel)*RTW_5G_CHANNELS_NUM
@@ -301,12 +301,12 @@
/* see 802.11 17.3.8.3.2 and Annex J
* there are overlapping channel numbers in 5GHz and 2GHz bands */
- if (band == IEEE80211_BAND_5GHZ) {
+ if (band == NL80211_BAND_5GHZ) {
if (chan >= 182 && chan <= 196)
return 4000 + chan * 5;
else
return 5000 + chan * 5;
- } else { /* IEEE80211_BAND_2GHZ */
+ } else { /* NL80211_BAND_2GHZ */
if (chan == 14)
return 2484;
else if (chan < 14)
@@ -391,9 +391,9 @@
DBG_871X("%s, got sr, but ssid mismatch, to remove this bss\n", __func__);
if (pselect_network->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
pselect_bss = cfg80211_get_bss(wiphy, NULL/*notify_channel*/,
@@ -424,9 +424,9 @@
channel = pnetwork->network.Configuration.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
@@ -569,9 +569,9 @@
return _FALSE;
if (pnetwork->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
@@ -626,9 +626,9 @@
u16 channel = cur_network->network.Configuration.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
#endif
@@ -3097,9 +3097,9 @@
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
channel = pmlmeext->cur_channel;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#ifdef COMPAT_KERNEL_RELEASE
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
@@ -3142,9 +3142,9 @@
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
channel = pmlmeext->cur_channel;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
pmgmt_frame = mgmt_buf;
pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame;
@@ -3950,9 +3950,9 @@
indicate:
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
@@ -3990,9 +3990,9 @@
indicate:
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
@@ -4020,9 +4020,9 @@
DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action);
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
@@ -5199,7 +5199,7 @@
#endif
};
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
{
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
@@ -5223,7 +5223,7 @@
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
/*
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
*base on ant_num
*rx_mask: RX mask
*if rx_ant =1 rx_mask[0]=0xff;==>MCS0-MCS7
@@ -5268,16 +5268,16 @@
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
{
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
if(bands)
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
}
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
{
- bands = wiphy->bands[IEEE80211_BAND_5GHZ];
+ bands = wiphy->bands[NL80211_BAND_5GHZ];
if(bands)
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_5GHZ, rf_type);
}
}
@@ -5348,9 +5348,9 @@
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
- wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
+ wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) && LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
@@ -5456,8 +5456,8 @@
pwdev_priv = wdev_to_priv(wdev);
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]);
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_5GHZ]);
wiphy_free(wdev->wiphy);

View File

@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC 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.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8192DU"
PKG_VERSION="5cb0486"
PKG_SHA256="1506bd7c3e255708aa9fa3cbc103eb26d8b98467647c0b8ed15a45f1281dd070"
PKG_VERSION="a9deaec"
PKG_SHA256="af71aa79c0382f056f2c7091b45a3c2d79b9c2848eb6bb1ffed22b6f0a63cbfd"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/lwfinger/rtl8192du"

View File

@ -0,0 +1,64 @@
From d295ee29d71a7969047fbe5042cec471408632c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Peron?=
<1859302+clementperon@users.noreply.github.com>
Date: Wed, 6 Jun 2018 17:40:54 +0200
Subject: [PATCH] Change __vfs_read_alt to __vfs_read
For kernel from 4.1 to 4.10 there is no call_read_iter used in new_sync_read.
Why create a new __vfs_read_alt whereas the __vfs_read is exported and seems to do exactly the same.
Remove __vfs_read_alt code and it's dependencies and use the __vfs_read function instead
---
os_dep/osdep_service.c | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 286096a..9dd3d2b 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -40,36 +40,6 @@ atomic_t _malloc_cnt = ATOMIC_INIT(0);
atomic_t _malloc_size = ATOMIC_INIT(0);
#endif /* DBG_MEMORY_LEAK */
-
-static ssize_t new_sync_read(struct file *filp, void __user *buf, __kernel_size_t len, loff_t *ppos)
-{
- struct iovec iov;
- struct kiocb kiocb;
- struct iov_iter iter;
- ssize_t ret;
-
- iov.iov_base = buf;
- iov.iov_len = len;
- init_sync_kiocb(&kiocb, filp);
- kiocb.ki_pos = *ppos;
- iov_iter_init(&iter, READ, &iov, 1, len);
-
- ret = call_read_iter(filp, &kiocb, &iter);
- BUG_ON(ret == -EIOCBQUEUED);
- *ppos = kiocb.ki_pos;
- return ret;
-}
-
-static ssize_t __vfs_read_alt(struct file *file, char __user *buf, size_t count,
- loff_t *pos)
-{
- if (file->f_op->read)
- return file->f_op->read(file, buf, count, pos);
- else if (file->f_op->read_iter)
- return new_sync_read(file, (void *)buf, (__kernel_size_t)count, pos);
- else
- return -EINVAL;
-}
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
@@ -1086,7 +1056,7 @@ static int readFile(struct file *fp,char *buf,int len)
while(sum<len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
- rlen = __vfs_read_alt(fp, buf+sum, len-sum, &fp->f_pos);
+ rlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);
#else
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
#endif

View File

@ -0,0 +1,27 @@
From 9e477ff7fb1626f188e0d3314799371a5cce8681 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 13 Jun 2018 18:54:09 +0100
Subject: [PATCH] fix vfs_read with 4.14.y+
---
os_dep/osdep_service.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 9dd3d2b..bd1df96 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -1055,7 +1055,9 @@ static int readFile(struct file *fp,char *buf,int len)
return -EPERM;
while(sum<len) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
+ rlen = kernel_read(fp, buf+sum, len-sum, &fp->f_pos);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
rlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);
#else
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
--
2.14.1

View File

@ -0,0 +1,25 @@
From fb85a57a5cd6241cc8c066c5efc5b43781b0e42d Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 13 Jun 2018 06:43:10 +0100
Subject: [PATCH] aarch64/4.4.y: implicit declaration of function
'csum_ipv6_magic'
---
core/rtw_br_ext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index da9c5e5..19af0fe 100644
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -51,6 +51,7 @@
#include <linux/icmpv6.h>
#include <net/ndisc.h>
#include <net/checksum.h>
+#include <net/ip6_checksum.h>
#endif
#endif
--
2.14.1

View File

@ -0,0 +1,26 @@
diff --git a/include/ieee80211.h b/include/ieee80211.h
index 3c28a0b..2268fbd 100644
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -969,18 +969,18 @@ enum ieee80211_state {
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+static __inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));

View File

@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC 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.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8192EU"
PKG_VERSION="49a0fb5"
PKG_SHA256="b09e37edd3882e05c7d430914fb3b78b82dad8e54830a69f72c241bc0b18bf46"
PKG_VERSION="77bb7c3"
PKG_SHA256="9cb7e5382edeb4b6323fae40aecfa041aa4ef80233ffaebf2be99fc7900b6a7f"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Mange/rtl8192eu-linux-driver"

View File

@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC 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.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8812AU"
PKG_VERSION="da70677"
PKG_SHA256="2a8950db3314833b32cf7ea2720509d05210ce11daa01d8f19c2ecc70c705fe2"
PKG_VERSION="af07b27"
PKG_SHA256="a2c3c9554ec0a586e879684ba87b08bdbde5cd30231b4794f3a10ef822e461fc"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/paspro/rtl8812au"

View File

@ -37,7 +37,7 @@ pre_make_target() {
}
make_target() {
make -C "$(kernel_path)" M="$PKG_BUILD/driver"
kernel_make -C "$(kernel_path)" M="$PKG_BUILD/driver"
make FD628Service
}

View File

@ -1,19 +1,20 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC 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.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Downloadlocation:
@ -36,7 +37,7 @@ PKG_IS_KERNEL_PKG="yes"
make_target() {
cd x86-64
KBUILD_NOPEDANTIC=1 make V=1 CC=$CC -C $(kernel_path) M=`pwd` BINARCH=$TARGET_KERNEL_ARCH
KBUILD_NOPEDANTIC=1 kernel_make V=1 CC=$CC -C $(kernel_path) M=`pwd` BINARCH=$TARGET_KERNEL_ARCH
}
makeinstall_target() {

View File

@ -0,0 +1,61 @@
From a893fac9b9e883f39a545e8ce87926cecc26ba12 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Sun, 10 Jun 2018 19:13:17 +0100
Subject: [PATCH] add 4.15.y support
Credit: https://github.com/UnitedRPMs/broadcom-wl-dkms/blob/5147b5f1867273e2762f777fd724b6523c3ab8dd/008-linux415.patch
---
x86-64/src/wl/sys/wl_linux.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c
index f7149da..89a3831 100644
--- a/x86-64/src/wl/sys/wl_linux.c
+++ b/x86-64/src/wl/sys/wl_linux.c
@@ -97,7 +97,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);
#include <wlc_wowl.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void wl_timer(struct timer_list *tl);
+#else
static void wl_timer(ulong data);
+#endif
static void _wl_timer(wl_timer_t *t);
static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
@@ -2296,10 +2300,17 @@ wl_timer_task(wl_task_t *task)
atomic_dec(&t->wl->callbacks);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void
+wl_timer(struct timer_list *tl)
+{
+ wl_timer_t *t = (wl_timer_t *)tl;
+#else
static void
wl_timer(ulong data)
{
wl_timer_t *t = (wl_timer_t *)data;
+#endif
if (!WL_ALL_PASSIVE_ENAB(t->wl))
_wl_timer(t);
@@ -2351,9 +2362,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname
bzero(t, sizeof(wl_timer_t));
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ timer_setup(&t->timer, wl_timer, 0);
+#else
init_timer(&t->timer);
t->timer.data = (ulong) t;
t->timer.function = wl_timer;
+#endif
t->wl = wl;
t->fn = fn;
t->arg = arg;
--
2.14.1

View File

@ -0,0 +1,177 @@
From 6bc816ae3ef424bc52b2736aeb1eb08ab09f38a9 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Sun, 10 Jun 2018 19:32:39 +0100
Subject: [PATCH] fix kernel warnings
Credit: https://github.com/UnitedRPMs/broadcom-wl-dkms/blob/master/wl-kmod-008_fix_kernel_warnings.patch
---
x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 88 +++++++++++++++++++++++-----------
1 file changed, 60 insertions(+), 28 deletions(-)
diff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
index 2e8625d..4da9b38 100644
--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
@@ -1983,7 +1983,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
if (dtoh32(bi->length) > WL_BSS_INFO_MAX) {
WL_DBG(("Beacon is larger than buffer. Discarding\n"));
- return err;
+ return -E2BIG;
}
notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +
WL_BSS_INFO_MAX, GFP_KERNEL);
@@ -2007,9 +2007,15 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
beacon_proberesp->capab_info = cpu_to_le16(bi->capability);
wl_rst_ie(wl);
- wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
- wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
- offsetof(struct wl_cfg80211_bss_info, frame_buf));
+ err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
+ if (err)
+ goto inform_single_bss_out;
+
+ err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
+ offsetof(struct wl_cfg80211_bss_info, frame_buf));
+ if (err)
+ goto inform_single_bss_out;
+
notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
wl_get_ielen(wl);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
@@ -2021,14 +2027,14 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
#endif
if (freq == 0) {
WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ err = -EINVAL;
+ goto inform_single_bss_out;
}
channel = ieee80211_get_channel(wiphy, freq);
if (unlikely(!channel)) {
WL_ERR(("ieee80211_get_channel error\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ err = -EINVAL;
+ goto inform_single_bss_out;
}
WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
@@ -2036,28 +2042,35 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
mgmt->u.beacon.capab_info, &bi->BSSID));
signal = notif_bss_info->rssi * 100;
- cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
- le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
- if (unlikely(!cbss)) {
- WL_ERR(("cfg80211_inform_bss_frame error\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ if (!wl->scan_request) {
+ cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
+ le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
+ if (unlikely(!cbss)) {
+ WL_ERR(("cfg80211_inform_bss_frame error\n"));
+ err = -ENOMEM;
+ goto inform_single_bss_out;
+ }
}
-
- notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
- notify_ielen = le32_to_cpu(bi->ie_length);
+ else {
+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ notify_ielen = le32_to_cpu(bi->ie_length);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+ cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
#else
- cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+ cbss = cfg80211_inform_bss(wiphy, channel,
+ wl->active_scan ? CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
+ (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
#endif
-
- if (unlikely(!cbss))
- return -ENOMEM;
+ if (unlikely(!cbss)) {
+ WL_ERR(("cfg80211_inform_bss error\n"));
+ err = -ENOMEM;
+ goto inform_single_bss_out;
+ }
+ }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, cbss);
@@ -2065,6 +2078,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
cfg80211_put_bss(cbss);
#endif
+inform_single_bss_out:
kfree(notif_bss_info);
return err;
@@ -2331,6 +2345,9 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
if (err)
goto update_bss_info_out;
+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
+ ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
+
ie = ((u8 *)bi) + bi->ie_offset;
ie_len = bi->ie_length;
} else {
@@ -2343,12 +2360,20 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
ie_len = bss->len_information_elements;
#endif
wl->conf->channel = *bss->channel;
+ }
+
+ if (bss) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, bss);
#else
cfg80211_put_bss(bss);
#endif
}
+ else {
+ WL_DBG(("Could not update BSS\n"));
+ err = -EINVAL;
+ goto update_bss_info_out;
+ }
tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
if (tim) {
@@ -2375,10 +2400,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
s32 err = 0;
- wl_get_assoc_ies(wl);
+ err = wl_get_assoc_ies(wl);
+ if (err)
+ return err;
+
memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
- wl_update_bss_info(wl);
+
+ err = wl_update_bss_info(wl);
+ if (err)
+ return err;
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
{
struct cfg80211_roam_info roam_info = {
--
2.14.1

View File

@ -48,11 +48,11 @@ pre_make_target() {
make_target() {
if [ "$MESON_FAMILY" = "gxm" ] ; then
LDFLAGS="" make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
EXTRA_CFLAGS="-DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_BACKEND=gpu" \
CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_BACKEND=gpu modules
else
LDFLAGS="" make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
EXTRA_CFLAGS="-DCONFIG_MALI450=y" \
CONFIG_MALI400=m CONFIG_MALI450=y
fi
@ -60,11 +60,11 @@ make_target() {
makeinstall_target() {
if [ "$MESON_FAMILY" = "gxm" ] ; then
LDFLAGS="" make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \
modules_install
else
LDFLAGS="" make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \
modules_install
fi

View File

@ -35,7 +35,7 @@ pre_make_target() {
}
make_target() {
make KDIR=$(kernel_path)
kernel_make KDIR=$(kernel_path)
}
makeinstall_target() {

View File

@ -35,7 +35,7 @@ pre_make_target() {
}
make_target() {
make KDIR=$(kernel_path)
kernel_make KDIR=$(kernel_path)
}
makeinstall_target() {

View File

@ -18,8 +18,8 @@
################################################################################
PKG_NAME="iwlwifi-firmware"
PKG_VERSION="7968340"
PKG_SHA256="8771a4a6a61f6403cfdb2c01f1e77bf71b468435417b3d7c361594fbb8715221"
PKG_VERSION="e8e1c45"
PKG_SHA256="54409b92dc7a7edf4a0be6919c09f07c018d87d9fe0ea1335dc18bc152061b8e"
PKG_ARCH="any"
PKG_LICENSE="Free-to-use"
PKG_SITE="https://github.com/LibreELEC/iwlwifi-firmware"

View File

@ -61,8 +61,8 @@ case "$LINUX" in
PKG_URL="https://github.com/raspberrypi/linux/archive/$PKG_VERSION.tar.gz"
;;
*)
PKG_VERSION="4.14.48"
PKG_SHA256="80a0608f611fe7a5c54556402cdc2880a21301e1c4e1b19d4c1db82ad2bf22b9"
PKG_VERSION="4.17.2"
PKG_SHA256="4cebcd6f4ddc49e68543a6d920582d9e0eca431be89f9c1b85fd4ecf1dd87b9c"
PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_PATCH_DIRS="default"
;;
@ -86,8 +86,6 @@ if [ "$PKG_BUILD_PERF" != "no" ] && grep -q ^CONFIG_PERF_EVENTS= $PKG_KERNEL_CFG
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET binutils elfutils libunwind zlib openssl"
fi
PKG_MAKE_OPTS_HOST="ARCH=${HEADERS_ARCH:-$TARGET_KERNEL_ARCH} headers_check"
if [ "$TARGET_ARCH" = "x86_64" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET intel-ucode:host kernel-firmware"
fi
@ -97,12 +95,6 @@ if [ "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then
fi
post_patch() {
sed -i -e "s|^HOSTCC[[:space:]]*=.*$|HOSTCC = $TOOLCHAIN/bin/host-gcc|" \
-e "s|^HOSTCXX[[:space:]]*=.*$|HOSTCXX = $TOOLCHAIN/bin/host-g++|" \
-e "s|^ARCH[[:space:]]*?=.*$|ARCH = $TARGET_KERNEL_ARCH|" \
-e "s|^CROSS_COMPILE[[:space:]]*?=.*$|CROSS_COMPILE = $TARGET_KERNEL_PREFIX|" \
$PKG_BUILD/Makefile
cp $PKG_KERNEL_CFG_FILE $PKG_BUILD/.config
if [ ! "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then
sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$BUILD/image/initramfs.cpio\"|" $PKG_BUILD/.config
@ -147,8 +139,27 @@ post_patch() {
fi
}
make_host() {
make \
ARCH=${HEADERS_ARCH:-$TARGET_KERNEL_ARCH} \
HOSTCC="$TOOLCHAIN/bin/host-gcc" \
HOSTCXX="$TOOLCHAIN/bin/host-g++" \
HOSTCFLAGS="$HOST_CFLAGS" \
HOSTCXXFLAGS="$HOST_CXXFLAGS" \
HOSTLDFLAGS="$HOST_LDFLAGS" \
headers_check
}
makeinstall_host() {
make ARCH=${HEADERS_ARCH:-$TARGET_KERNEL_ARCH} INSTALL_HDR_PATH=dest headers_install
make \
ARCH=${HEADERS_ARCH:-$TARGET_KERNEL_ARCH} \
HOSTCC="$TOOLCHAIN/bin/host-gcc" \
HOSTCXX="$TOOLCHAIN/bin/host-g++" \
HOSTCFLAGS="$HOST_CFLAGS" \
HOSTCXXFLAGS="$HOST_CXXFLAGS" \
HOSTLDFLAGS="$HOST_LDFLAGS" \
INSTALL_HDR_PATH=dest \
headers_install
mkdir -p $SYSROOT_PREFIX/usr/include
cp -R dest/include/* $SYSROOT_PREFIX/usr/include
}
@ -165,15 +176,17 @@ pre_make_target() {
sed -i "s|CONFIG_EXTRA_FIRMWARE=.*|CONFIG_EXTRA_FIRMWARE=\"${FW_LIST}\"|" $PKG_BUILD/.config
fi
make oldconfig
kernel_make oldconfig
# regdb
cp $(get_build_dir wireless-regdb)/db.txt $PKG_BUILD/net/wireless/db.txt
# regdb (backward compatability with pre-4.15 kernels)
if grep -q ^CONFIG_CFG80211_INTERNAL_REGDB= $PKG_BUILD/.config ; then
cp $(get_build_dir wireless-regdb)/db.txt $PKG_BUILD/net/wireless/db.txt
fi
}
make_target() {
LDFLAGS="" make modules
LDFLAGS="" make INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) DEPMOD="$TOOLCHAIN/bin/depmod" modules_install
kernel_make modules
kernel_make INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) modules_install
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/build
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/source
@ -219,11 +232,11 @@ make_target() {
if [ "$BOOTLOADER" = "u-boot" -a -n "$KERNEL_UBOOT_EXTRA_TARGET" ]; then
for extra_target in "$KERNEL_UBOOT_EXTRA_TARGET"; do
LDFLAGS="" make $extra_target
kernel_make $extra_target
done
fi
LDFLAGS="" make $KERNEL_TARGET $KERNEL_MAKE_EXTRACMD
kernel_make $KERNEL_TARGET $KERNEL_MAKE_EXTRACMD
if [ "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then
DTB_BLOBS=($(ls arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/*.dtb 2>/dev/null || true))
@ -306,4 +319,9 @@ post_install() {
# bluez looks in /etc/firmware/
ln -sf /$(get_full_firmware_dir)/ $INSTALL/etc/firmware
# regdb and signature is now loaded as firmware by 4.15+
if grep -q ^CONFIG_CFG80211_REQUIRE_SIGNED_REGDB= $PKG_BUILD/.config; then
cp $(get_build_dir wireless-regdb)/regulatory.db{,.p7s} $INSTALL/$(get_full_firmware_dir)
fi
}

View File

@ -1,14 +1,20 @@
commit 58c5e239ba0402207cfecef8ea1bf52edea092e4
commit 5a596921a4636e62843a59b7eab7b87b70a6d296
Author: Lukas Rusak <lorusak@gmail.com>
Date: Mon Jan 15 09:50:43 2018 -0800
Date: Sun May 6 22:03:11 2018 -0700
drivers/hid: add ouya controller driver
HID: add ouya HID driver
This driver is a simple implementation to get the controller working and mapped properly.
This driver does not include functionality for the touchpad (yet). The original driver
was taken from from the ouya linux tree and has been simplified. It seems there may have
been other versions of the controller present that had a broken report descriptor. I have
removed that for now.
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 779c5ae47..02f79b0a4 100644
index 60252fd796f6..6be2c454e72e 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -633,6 +633,12 @@ config HID_ORTEK
@@ -659,6 +659,12 @@ config HID_ORTEK
- Ortek WKB-2000
- Skycable wireless presenter
@ -16,16 +22,16 @@ index 779c5ae47..02f79b0a4 100644
+ tristate "OUYA Game Controller"
+ depends on USB_HID
+ ---help---
+ Support for OUYA Game Controller.
+ Support for OUYA Game Controller.
+
config HID_PANTHERLORD
tristate "Pantherlord/GreenAsia game controller"
depends on HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 235bd2a7b..d3431f77b 100644
index 17a8bd97da9d..4425890934e4 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -68,6 +68,7 @@ obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
obj-$(CONFIG_HID_NTI) += hid-nti.o
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
@ -33,218 +39,91 @@ index 235bd2a7b..d3431f77b 100644
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0c3f60813..cd64cafe5 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1884,6 +1884,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },
#endif
#if IS_ENABLED(CONFIG_HID_ACRUX)
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0xf705) },
#endif
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 5da3d6256..b6bb209ed 100644
index 0b5cc910f62e..0528efb825fa 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -843,6 +843,9 @@
@@ -859,6 +859,9 @@
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
#define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003
+#define USB_VENDOR_ID_OUYA 0x2836
+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001
+#define USB_VENDOR_ID_OUYA 0x2836
+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001
+
#define USB_VENDOR_ID_PLANTRONICS 0x047f
#define USB_VENDOR_ID_PANASONIC 0x04da
diff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c
new file mode 100644
index 000000000..7792c23ba
index 000000000000..4344a47b40af
--- /dev/null
+++ b/drivers/hid/hid-ouya.c
@@ -0,0 +1,260 @@
@@ -0,0 +1,131 @@
+/*
+ * HID driver for OUYA Game Controller(s)
+ *
+ * Copyright (c) 2013 OUYA
+ * Copyright (c) 2013 Gregorios Leach <optikflux@gmail.com>
+ * Copyright (c) 2018 Lukas Rusak <lorusak@gmail.com>
+ */
+
+#include <linux/device.h>
+#include <linux/input.h>
+#include <linux/hid.h>
+#include <linux/input.h>
+#include <linux/module.h>
+
+#include "hid-ids.h"
+
+#define OUYA_TOUCHPAD_FIXUP (1 << 0)
+
+struct ouya_sc {
+ unsigned long quirks;
+static const unsigned int ouya_absmap[] = {
+ [0x30] = ABS_X, /* left stick X */
+ [0x31] = ABS_Y, /* left stick Y */
+ [0x32] = ABS_Z, /* L2 */
+ [0x33] = ABS_RX, /* right stick X */
+ [0x34] = ABS_RY, /* right stick Y */
+ [0x35] = ABS_RZ, /* R2 */
+};
+
+/* Fixed report descriptor */
+static __u8 ouya_rdesc_fixed[] = {
+
+ 0x05, 0x01, /* Usage Page (Desktop), */
+ 0x09, 0x05, /* Usage (Game Pad), */
+
+ 0xA1, 0x01, /* Collection (Application), */
+ 0x85, 0x07, /* Report ID (7), */
+
+ 0xA1, 0x00, /* Collection (Physical), */
+ 0x09, 0x30, /* Usage (X), */
+ 0x09, 0x31, /* Usage (Y), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
+ 0x35, 0x00, /* Physical Minimum (0), */
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
+ 0x95, 0x02, /* Report Count (2), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0xC0, /* End Collection, */
+
+ 0xA1, 0x00, /* Collection (Physical), */
+ 0x09, 0x33, /* Usage (Rx), */
+ 0x09, 0x34, /* Usage (Ry), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
+ 0x35, 0x00, /* Physical Minimum (0), */
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
+ 0x95, 0x02, /* Report Count (2), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0xC0, /* End Collection, */
+
+ 0xA1, 0x00, /* Collection (Physical), */
+ 0x09, 0x32, /* Usage (Z), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
+ 0x35, 0x00, /* Physical Minimum (0), */
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0xC0, /* End Collection, */
+
+ 0xA1, 0x00, /* Collection (Physical), */
+ 0x09, 0x35, /* Usage (Rz), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
+ 0x35, 0x00, /* Physical Minimum (0), */
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0xC0, /* End Collection, */
+
+ 0x05, 0x09, /* Usage Page (Button), */
+ 0x19, 0x01, /* Usage Minimum (01h), */
+ 0x29, 0x10, /* Usage Maximum (10h), */
+ 0x95, 0x10, /* Report Count (16), */
+ 0x75, 0x01, /* Report Size (1), */
+ 0x81, 0x02, /* Input (Variable), */
+
+ /* ORIGINAL REPORT DESCRIPTOR FOR TOUCHPAD INPUT */
+ /* 06 00 ff a1 02 09 02 15 00 26 ff 00 35 00 46 ff 00 95 03 75 08 81 02 c0 */
+
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
+ 0x09, 0x02, /* Usage (Mouse), */
+ 0x09, 0x01, /* Usage (Pointer), */
+ 0xA1, 0x00, /* Collection (Physical), */
+ 0x05, 0x09, /* Usage Page (Button), */
+ 0x19, 0x01, /* Usage Minimum (01h), */
+ 0x29, 0x03, /* Usage Maximum (03h), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x25, 0x01, /* Logical Maximum (1), */
+ 0x95, 0x03, /* Report Count (3), */
+ 0x75, 0x01, /* Report Size (1), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x75, 0x05, /* Report Size (5), */
+ 0x81, 0x01, /* Input (Constant), */
+ 0x05, 0x01, /* Usage Page (Desktop), */
+ 0x09, 0x30, /* Usage (X), */
+ 0x09, 0x31, /* Usage (Y), */
+ 0x15, 0x81, /* Logical Minimum (-127), */
+ 0x25, 0x7f, /* Logical Maximum (127), */
+ 0x95, 0x02, /* Report Count (2), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x81, 0x06, /* Input (Relative), */
+ 0xC0, /* End Collection, */
+
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
+ 0xA1, 0x02, /* Collection (Logical), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x95, 0x07, /* Report Count (7), */
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
+ 0x09, 0x01, /* Usage (Pointer), */
+ 0x91, 0x02, /* Output (Variable), */
+ 0xC0, /* End Collection, */
+
+ 0xC0, /* End Collection */
+
+
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
+ 0x05, 0x0C, /* Usage Page (Consumer), */
+ 0x09, 0x01, /* Usage (Consumer Control), */
+
+ 0xA1, 0x01, /* Collection (Application), */
+ 0x85, 0x03, /* Report ID (3), */
+ 0x05, 0x01, /* Usage Page (Desktop), */
+ 0x09, 0x06, /* Usage (Keyboard), */
+ 0xA1, 0x02, /* Collection (Logical), */
+ 0x05, 0x06, /* Usage Page (Generic), */
+ 0x09, 0x20, /* Usage (Battery Strgth), */
+ 0x15, 0x00, /* Logical Minimum (0), */
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
+ 0x75, 0x08, /* Report Size (8), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0x06, 0xBC, 0xFF, /* Usage Page (Custom), */
+
+ 0x0A, 0xAD, 0xBD, /* UNKNOWN */
+
+ 0x75, 0x08, /* Report Size (8), */
+ 0x95, 0x06, /* Report Count (6), */
+ 0x81, 0x02, /* Input (Variable), */
+ 0xC0, /* End Collection, */
+
+ 0xC0, /* End Collection */
+
+ 0x00
+static const unsigned int ouya_keymap[] = {
+ [0x1] = BTN_SOUTH, /* O */
+ [0x2] = BTN_WEST, /* U */
+ [0x3] = BTN_NORTH, /* Y */
+ [0x4] = BTN_EAST, /* A */
+ [0x5] = BTN_TL, /* L1 */
+ [0x6] = BTN_TR, /* R1 */
+ [0x7] = BTN_THUMBL, /* L3 */
+ [0x8] = BTN_THUMBR, /* R3 */
+ [0x9] = BTN_DPAD_UP, /* Up */
+ [0xa] = BTN_DPAD_DOWN, /* Down */
+ [0xb] = BTN_DPAD_LEFT, /* Left */
+ [0xc] = BTN_DPAD_RIGHT, /* Right */
+ [0xd] = BTN_TL2, /* L2 */
+ [0xe] = BTN_TR2, /* R2 */
+ [0xf] = BTN_MODE, /* Power */
+};
+
+static __u8 *ouya_report_fixup(struct hid_device *hdev, __u8 *rdesc,
+ unsigned int *rsize)
+{
+ struct ouya_sc *sc = hid_get_drvdata(hdev);
+
+ if (sc->quirks & OUYA_TOUCHPAD_FIXUP) {
+ rdesc = ouya_rdesc_fixed;
+ *rsize = sizeof(ouya_rdesc_fixed);
+ }
+ return rdesc;
+}
+
+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,
+ struct hid_field *field, struct hid_usage *usage,
+ unsigned long **bit, int *max)
+{
+ struct ouya_sc *sc = hid_get_drvdata(hdev);
+ if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
+ unsigned int key = usage->hid & HID_USAGE;
+
+ if (!(sc->quirks & OUYA_TOUCHPAD_FIXUP)) {
+ return 0;
+ }
+ if (key >= ARRAY_SIZE(ouya_keymap))
+ return -1;
+
+ if ((usage->hid & 0x90000) == 0x90000 &&
+ (field->physical & 0xff000000) == 0xff000000 &&
+ usage->collection_index == 5 &&
+ field->report_count == 3) {
+ key = ouya_keymap[key];
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);
+
+ hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_MOUSE + (usage->hid - 0x90001));
+ return 1;
+
+ } else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {
+ unsigned int abs = usage->hid & HID_USAGE;
+
+ if (abs >= ARRAY_SIZE(ouya_absmap))
+ return -1;
+
+ abs = ouya_absmap[abs];
+ hid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);
+
+ return 1;
+ }
@ -255,22 +134,6 @@ index 000000000..7792c23ba
+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)
+{
+ int ret;
+ struct ouya_sc *sc;
+
+ sc = kzalloc(sizeof(*sc), GFP_KERNEL);
+ if (sc == NULL) {
+ hid_err(hdev, "can't alloc ouya descriptor\n");
+ return -ENOMEM;
+ }
+
+ if(((hdev->version & 0xff00) == 0x0100 && (hdev->version & 0xff) >= 0x04) ||
+ ((hdev->version & 0xff00) == 0xe100 && (hdev->version & 0xff) >= 0x3a)) {
+ hid_info(hdev, "ouya controller - new version\n");
+ sc->quirks = OUYA_TOUCHPAD_FIXUP;
+ } else {
+ sc->quirks = 0;
+ }
+ hid_set_drvdata(hdev, sc);
+
+ ret = hid_parse(hdev);
+ if (ret) {
@ -278,8 +141,7 @@ index 000000000..7792c23ba
+ goto err_free;
+ }
+
+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT |
+ HID_CONNECT_HIDDEV_FORCE);
+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);
+ if (ret) {
+ hid_err(hdev, "hw start failed\n");
+ goto err_free;
@ -288,7 +150,6 @@ index 000000000..7792c23ba
+ return 0;
+
+err_free:
+ kfree(sc);
+ return ret;
+}
+
@ -307,10 +168,9 @@ index 000000000..7792c23ba
+static struct hid_driver ouya_driver = {
+ .name = "ouya",
+ .id_table = ouya_devices,
+ .input_mapping = ouya_input_mapping,
+ .probe = ouya_probe,
+ .remove = ouya_remove,
+ .input_mapping = ouya_input_mapping,
+ .report_fixup = ouya_report_fixup
+};
+
+static int __init ouya_init(void)
@ -325,3 +185,22 @@ index 000000000..7792c23ba
+
+module_init(ouya_init);
+module_exit(ouya_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Lukas Rusak <lorusak@gmail.com>");
+MODULE_AUTHOR("Gregorios Leach <optikflux@gmail.com>");
+MODULE_DESCRIPTION("Ouya Controller Driver");
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 587e2681a53f..b5adc13e0df1 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
#endif
+#if IS_ENABLED(CONFIG_HID_OUYA)
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
+#endif
#if IS_ENABLED(CONFIG_HID_PANTHERLORD)
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },

View File

@ -1,177 +0,0 @@
From 91310f578291eabef1316eed38f79b05b8eaf568 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Mon, 19 Jun 2017 20:01:53 +0100
Subject: [PATCH] Spinel Plus remote 0.2
---
drivers/hid/Kconfig | 6 +++
drivers/hid/Makefile | 1 +
drivers/hid/hid-core.c | 4 ++
drivers/hid/hid-ids.h | 4 ++
drivers/hid/hid-spinelplus.c | 95 ++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 110 insertions(+)
create mode 100644 drivers/hid/hid-spinelplus.c
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 84500fd..6b625cf 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -808,6 +808,12 @@ config HID_STEELSERIES
---help---
Support for Steelseries SRW-S1 steering wheel
+config HID_SPINELPLUS
+ tristate "Spinel Plus remote control"
+ depends on USB_HID
+ ---help---
+ Say Y here if you have a Spinel Plus (0471:206c/20cc/0613/2168) remote
+
config HID_SUNPLUS
tristate "Sunplus wireless desktop"
depends on HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 4e22940..3205d88 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -92,6 +92,7 @@ obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o
obj-$(CONFIG_HID_SONY) += hid-sony.o
obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o
+obj-$(CONFIG_HID_SPINELPLUS) += hid-spinelplus.o
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 32bcb50..11985b4 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2291,6 +2291,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
#if IS_ENABLED(CONFIG_HID_ZYDACRON)
{ HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
#endif
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4) },
{ }
};
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index f3cd724..b67d5e5 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -841,6 +841,10 @@
#define USB_VENDOR_ID_PHILIPS 0x0471
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1 0x206c
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2 0x20cc
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3 0x0613
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4 0x2168
#define USB_VENDOR_ID_PI_ENGINEERING 0x05f3
#define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff
diff --git a/drivers/hid/hid-spinelplus.c b/drivers/hid/hid-spinelplus.c
new file mode 100644
index 0000000..381c7b3
--- /dev/null
+++ b/drivers/hid/hid-spinelplus.c
@@ -0,0 +1,95 @@
+/*
+ * HID driver for "PHILIPS MCE USB IR Receiver- Spinel plus" remotes
+ *
+ * Copyright (c) 2010 Panagiotis Skintzos
+ *
+ * Renamed to Spinel, cleanup and modified to also support
+ * Spinel Plus 0471:20CC by Stephan Raue 2012.
+ */
+
+/*
+ * 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.
+ */
+
+#include <linux/device.h>
+#include <linux/input.h>
+#include <linux/hid.h>
+#include <linux/module.h>
+
+#include "hid-ids.h"
+
+#define spinelplus_map_key(c) set_bit(EV_REP, hi->input->evbit); \
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
+
+static int spinelplus_input_mapping(struct hid_device *hdev,
+ struct hid_input *hi, struct hid_field *field, struct hid_usage *usage,
+ unsigned long **bit, int *max)
+{
+ switch (usage->hid) {
+ case 0xffbc000d: spinelplus_map_key(KEY_MEDIA); break;
+ case 0xffbc0024: spinelplus_map_key(KEY_MEDIA); break;
+ case 0xffbc0027: spinelplus_map_key(KEY_ZOOM); break;
+ case 0xffbc0033: spinelplus_map_key(KEY_HOME); break;
+ case 0xffbc0035: spinelplus_map_key(KEY_CAMERA); break;
+ case 0xffbc0036: spinelplus_map_key(KEY_EPG); break;
+ case 0xffbc0037: spinelplus_map_key(KEY_DVD); break;
+ case 0xffbc0038: spinelplus_map_key(KEY_HOME); break;
+ case 0xffbc0039: spinelplus_map_key(KEY_MP3); break;
+ case 0xffbc003a: spinelplus_map_key(KEY_VIDEO); break;
+ case 0xffbc005a: spinelplus_map_key(KEY_TEXT); break;
+ case 0xffbc005b: spinelplus_map_key(KEY_RED); break;
+ case 0xffbc005c: spinelplus_map_key(KEY_GREEN); break;
+ case 0xffbc005d: spinelplus_map_key(KEY_YELLOW); break;
+ case 0xffbc005e: spinelplus_map_key(KEY_BLUE); break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+static int spinelplus_probe(struct hid_device *hdev,
+ const struct hid_device_id *id)
+{
+ int ret;
+ /* Connect only to hid input (not hiddev & hidraw)*/
+ unsigned int cmask = HID_CONNECT_HIDINPUT;
+
+ ret = hid_parse(hdev);
+ if (ret) {
+ dev_err(&hdev->dev, "parse failed\n");
+ goto err_free;
+ }
+
+ ret = hid_hw_start(hdev, cmask);
+ if (ret) {
+ dev_err(&hdev->dev, "hw start failed\n");
+ goto err_free;
+ }
+
+ return 0;
+err_free:
+ return ret;
+}
+
+static const struct hid_device_id spinelplus_devices[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4) },
+ { }
+};
+MODULE_DEVICE_TABLE(hid, spinelplus_devices);
+
+static struct hid_driver spinelplus_driver = {
+ .name = "SpinelPlus",
+ .id_table = spinelplus_devices,
+ .input_mapping = spinelplus_input_mapping,
+ .probe = spinelplus_probe,
+};
+
+module_hid_driver(spinelplus_driver);
+
+MODULE_LICENSE("GPL");
--
2.7.4

View File

@ -0,0 +1,242 @@
From 997fbfe5508bc7d29fdf0a7a103f3864d4db380a Mon Sep 17 00:00:00 2001
Message-Id: <997fbfe5508bc7d29fdf0a7a103f3864d4db380a.1528140572.git.jan.steffens@gmail.com>
In-Reply-To: <b7e3d341f20581dcd72d3640fa8f6f99fd766d21.1528140572.git.jan.steffens@gmail.com>
References: <b7e3d341f20581dcd72d3640fa8f6f99fd766d21.1528140572.git.jan.steffens@gmail.com>
From: Jani Nikula <jani.nikula@intel.com>
Date: Wed, 16 May 2018 11:01:10 +0300
Subject: [PATCH 2/2] Revert "drm/i915/edp: Allow alternate fixed mode for eDP
if available."
This reverts commit dc911f5bd8aacfcf8aabd5c26c88e04c837a938e.
Per the report, no matter what display mode you select with xrandr, the
i915 driver will always select the alternate fixed mode. For the
reporter this means that the display will always run at 40Hz which is
quite annoying. This may be due to the mode comparison.
But there are some other potential issues. The choice of alt_fixed_mode
seems dubious. It's the first non-preferred mode, but there are no
guarantees that the only difference would be refresh rate. Similarly,
there may be more than one preferred mode in the probed modes list, and
the commit changes the preferred mode selection to choose the last one
on the list instead of the first.
(Note that the probed modes list is the raw, unfiltered, unsorted list
of modes from drm_add_edid_modes(), not the pretty result after a
drm_helper_probe_single_connector_modes() call.)
Finally, we already have eerily similar code in place to find the
downclock mode for DRRS that seems like could be reused here.
Back to the drawing board.
Note: This is a hand-crafted revert due to conflicts. If it fails to
backport, please just try reverting the original commit directly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
Reported-by: Rune Petersen <rune@megahurts.dk>
Reported-by: Mark Spencer <n7u4722r35@ynzlx.anonbox.net>
Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
Cc: Clint Taylor <clinton.a.taylor@intel.com>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.14+
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180516080110.22770-1-jani.nikula@intel.com
---
drivers/gpu/drm/i915/intel_dp.c | 38 ++++--------------------------
drivers/gpu/drm/i915/intel_drv.h | 2 --
drivers/gpu/drm/i915/intel_dsi.c | 2 +-
drivers/gpu/drm/i915/intel_dvo.c | 2 +-
drivers/gpu/drm/i915/intel_lvds.c | 3 +--
drivers/gpu/drm/i915/intel_panel.c | 6 -----
6 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b7b4cfdeb974..48cb8df5ae97 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1671,23 +1671,6 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
return bpp;
}
-static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
- struct drm_display_mode *m2)
-{
- bool bres = false;
-
- if (m1 && m2)
- bres = (m1->hdisplay == m2->hdisplay &&
- m1->hsync_start == m2->hsync_start &&
- m1->hsync_end == m2->hsync_end &&
- m1->htotal == m2->htotal &&
- m1->vdisplay == m2->vdisplay &&
- m1->vsync_start == m2->vsync_start &&
- m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
- return bres;
-}
-
bool
intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
@@ -1734,16 +1717,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,
pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
- struct drm_display_mode *panel_mode =
- intel_connector->panel.alt_fixed_mode;
- struct drm_display_mode *req_mode = &pipe_config->base.mode;
-
- if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
- panel_mode = intel_connector->panel.fixed_mode;
-
- drm_mode_debug_printmodeline(panel_mode);
-
- intel_fixed_panel_mode(panel_mode, adjusted_mode);
+ intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
+ adjusted_mode);
if (INTEL_GEN(dev_priv) >= 9) {
int ret;
@@ -6121,7 +6096,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_connector *connector = &intel_connector->base;
struct drm_display_mode *fixed_mode = NULL;
- struct drm_display_mode *alt_fixed_mode = NULL;
struct drm_display_mode *downclock_mode = NULL;
bool has_dpcd;
struct drm_display_mode *scan;
@@ -6176,14 +6150,13 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
}
intel_connector->edid = edid;
- /* prefer fixed mode from EDID if available, save an alt mode also */
+ /* prefer fixed mode from EDID if available */
list_for_each_entry(scan, &connector->probed_modes, head) {
if ((scan->type & DRM_MODE_TYPE_PREFERRED)) {
fixed_mode = drm_mode_duplicate(dev, scan);
downclock_mode = intel_dp_drrs_init(
intel_connector, fixed_mode);
- } else if (!alt_fixed_mode) {
- alt_fixed_mode = drm_mode_duplicate(dev, scan);
+ break;
}
}
@@ -6220,8 +6193,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
pipe_name(pipe));
}
- intel_panel_init(&intel_connector->panel, fixed_mode, alt_fixed_mode,
- downclock_mode);
+ intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
intel_connector->panel.backlight.power = intel_edp_backlight_power;
intel_panel_setup_backlight(connector, pipe);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index a80fbad9be0f..7f3e83f17adb 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -269,7 +269,6 @@ struct intel_encoder {
struct intel_panel {
struct drm_display_mode *fixed_mode;
- struct drm_display_mode *alt_fixed_mode;
struct drm_display_mode *downclock_mode;
/* backlight */
@@ -1820,7 +1819,6 @@ void intel_overlay_reset(struct drm_i915_private *dev_priv);
/* intel_panel.c */
int intel_panel_init(struct intel_panel *panel,
struct drm_display_mode *fixed_mode,
- struct drm_display_mode *alt_fixed_mode,
struct drm_display_mode *downclock_mode);
void intel_panel_fini(struct intel_panel *panel);
void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 51a1d6868b1e..cf39ca90d887 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -1846,7 +1846,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
connector->display_info.width_mm = fixed_mode->width_mm;
connector->display_info.height_mm = fixed_mode->height_mm;
- intel_panel_init(&intel_connector->panel, fixed_mode, NULL, NULL);
+ intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
intel_panel_setup_backlight(connector, INVALID_PIPE);
intel_dsi_add_properties(intel_connector);
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index eb0c559b2715..a70d767313aa 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -536,7 +536,7 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
*/
intel_panel_init(&intel_connector->panel,
intel_dvo_get_current_mode(intel_encoder),
- NULL, NULL);
+ NULL);
intel_dvo->panel_wants_dither = true;
}
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index e125d16a1aa7..d278f24ba6ae 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -1175,8 +1175,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
out:
mutex_unlock(&dev->mode_config.mutex);
- intel_panel_init(&intel_connector->panel, fixed_mode, NULL,
- downclock_mode);
+ intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
intel_panel_setup_backlight(connector, INVALID_PIPE);
lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 41d00b1603e3..b443278e569c 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1928,30 +1928,24 @@ intel_panel_init_backlight_funcs(struct intel_panel *panel)
int intel_panel_init(struct intel_panel *panel,
struct drm_display_mode *fixed_mode,
- struct drm_display_mode *alt_fixed_mode,
struct drm_display_mode *downclock_mode)
{
intel_panel_init_backlight_funcs(panel);
panel->fixed_mode = fixed_mode;
- panel->alt_fixed_mode = alt_fixed_mode;
panel->downclock_mode = downclock_mode;
return 0;
}
void intel_panel_fini(struct intel_panel *panel)
{
struct intel_connector *intel_connector =
container_of(panel, struct intel_connector, panel);
if (panel->fixed_mode)
drm_mode_destroy(intel_connector->base.dev, panel->fixed_mode);
- if (panel->alt_fixed_mode)
- drm_mode_destroy(intel_connector->base.dev,
- panel->alt_fixed_mode);
-
if (panel->downclock_mode)
drm_mode_destroy(intel_connector->base.dev,
panel->downclock_mode);
--
2.17.1

View File

@ -0,0 +1,55 @@
From 70c30b1ea706affcb117e3cd3065690abca5ba69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Winiarski?= <michal.winiarski@intel.com>
Date: Mon, 21 May 2018 10:38:01 -0400
Subject: [PATCH] media: rc: nuvoton: Tweak the interrupt enabling dance
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It appears that we need to enable CIR device before attempting to touch
some of the registers. Previously, this was not a big issue, since we
were rarely seeing nvt_close() getting called.
Unfortunately, since commit cb84343fced1 ("media: lirc: do not call close()
or open() on unregistered devices") the initial open() during probe from
rc_setup_rx_device() is no longer successful, which means that userspace
clients will actually end up calling nvt_open()/nvt_close(). Since
nvt_open() is broken, the device doesn't seem to work as expected.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199597
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
drivers/media/rc/nuvoton-cir.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 5e1d866a61a5..ce8949b6549d 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -922,6 +922,9 @@ static int nvt_open(struct rc_dev *dev)
struct nvt_dev *nvt = dev->priv;
unsigned long flags;
+ /* enable the CIR logical device */
+ nvt_enable_logical_dev(nvt, LOGICAL_DEV_CIR);
+
spin_lock_irqsave(&nvt->lock, flags);
/* set function enable flags */
@@ -937,9 +940,6 @@ static int nvt_open(struct rc_dev *dev)
spin_unlock_irqrestore(&nvt->lock, flags);
- /* enable the CIR logical device */
- nvt_enable_logical_dev(nvt, LOGICAL_DEV_CIR);
-
return 0;
}
--
2.11.0

View File

@ -1,66 +0,0 @@
From 039b4125aef0d84c831aeb6e9fdca41b47852f50 Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Sun, 13 May 2018 12:31:42 +0200
Subject: [PATCH] media: rc: ite-cir: lower timeout and extend allowed timeout
range
The minimum possible timeout of ite-cir is 8 samples, which is
typically about 70us. The driver however changes the FIFO trigger
level from the hardware's default of 1 byte to 17 bytes, so the minimum
usable timeout value is 17 * 8 samples, which is typically about 1.2ms.
Tests showed that using timeouts down to 1.2ms actually work fine.
The current default timeout of 200ms is much longer than necessary and
the maximum timeout of 1s seems to have been chosen a bit arbitrarily.
So change the minimum timeout to the driver's limit of 17 * 8 samples
and bring timeout and maximum timeout in line with the settings
of many other receivers.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/media/rc/ite-cir.c | 8 +++++---
drivers/media/rc/ite-cir.h | 7 -------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 65e104c7ddfc..de77d22c30a7 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1561,9 +1561,11 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
rdev->close = ite_close;
rdev->s_idle = ite_s_idle;
rdev->s_rx_carrier_range = ite_set_rx_carrier_range;
- rdev->min_timeout = ITE_MIN_IDLE_TIMEOUT;
- rdev->max_timeout = ITE_MAX_IDLE_TIMEOUT;
- rdev->timeout = ITE_IDLE_TIMEOUT;
+ /* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */
+ rdev->min_timeout = 17 * 8 * ITE_BAUDRATE_DIVISOR *
+ itdev->params.sample_period;
+ rdev->timeout = IR_DEFAULT_TIMEOUT;
+ rdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *
itdev->params.sample_period;
rdev->tx_resolution = ITE_BAUDRATE_DIVISOR *
diff --git a/drivers/media/rc/ite-cir.h b/drivers/media/rc/ite-cir.h
index 0e8ebc880d1f..9cb24ac01350 100644
--- a/drivers/media/rc/ite-cir.h
+++ b/drivers/media/rc/ite-cir.h
@@ -154,13 +154,6 @@ struct ite_dev {
/* default carrier freq for when demodulator is off (Hz) */
#define ITE_DEFAULT_CARRIER_FREQ 38000
-/* default idling timeout in ns (0.2 seconds) */
-#define ITE_IDLE_TIMEOUT 200000000UL
-
-/* limit timeout values */
-#define ITE_MIN_IDLE_TIMEOUT 100000000UL
-#define ITE_MAX_IDLE_TIMEOUT 1000000000UL
-
/* convert bits to us */
#define ITE_BITS_TO_NS(bits, sample_period) \
((u32) ((bits) * ITE_BAUDRATE_DIVISOR * sample_period))
--
2.11.0

View File

@ -0,0 +1,75 @@
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index be8c2f0..da196b4 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -656,6 +656,7 @@ enum intel_sbi_destination {
#define QUIRK_BACKLIGHT_PRESENT (1<<3)
#define QUIRK_PIN_SWIZZLED_PAGES (1<<5)
#define QUIRK_INCREASE_T12_DELAY (1<<6)
+#define QUIRK_INCREASE_DDI_DISABLED_TIME (1<<7)
struct intel_fbdev;
struct intel_fbc_work;
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index ca73387..bc3d012 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1791,6 +1791,9 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)
I915_WRITE(TRANS_DDI_FUNC_CTL(cpu_transcoder), temp);
}
+/* Quirk time computed based on 24fps frame time of 41.25ms */
+#define DDI_DISABLED_QUIRK_TIME 42
+
void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
enum transcoder cpu_transcoder)
{
@@ -1800,6 +1803,11 @@ void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK | TRANS_DDI_DP_VC_PAYLOAD_ALLOC);
val |= TRANS_DDI_PORT_NONE;
I915_WRITE(reg, val);
+
+ if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME) {
+ msleep(DDI_DISABLED_QUIRK_TIME);
+ DRM_DEBUG_KMS("Quirk Increase DDI disabled time\n");
+ }
}
int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8251e18..40e0306 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14749,6 +14749,17 @@ static void quirk_increase_t12_delay(struct drm_device *dev)
DRM_INFO("Applying T12 delay quirk\n");
}
+/* GeminiLake NUC HDMI outputs require additional off time
+ * this allows the onboard retimer to correctly sync to signal
+ */
+static void quirk_increase_ddi_disabled_time(struct drm_device *dev)
+{
+ struct drm_i915_private *dev_priv = to_i915(dev);
+
+ dev_priv->quirks |= QUIRK_INCREASE_DDI_DISABLED_TIME;
+ DRM_INFO("Applying Increase DDI Disabled quirk\n");
+}
+
struct intel_quirk {
int device;
int subsystem_vendor;
@@ -14835,6 +14846,14 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
/* Toshiba Satellite P50-C-18C */
{ 0x191B, 0x1179, 0xF840, quirk_increase_t12_delay },
+
+ /* GeminiLake NUC */
+ { 0x3185, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
+ { 0x3184, 0x8086, 0x2072, quirk_increase_ddi_disabled_time },
+ /* ASRock ITX*/
+ { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
+ { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time },
+
};
static void intel_init_quirks(struct drm_device *dev)

View File

@ -52,9 +52,10 @@ make_target() {
echo "UBOOT_SYSTEM must be set to build an image"
echo "see './scripts/uboot_helper' for more information"
else
CROSS_COMPILE="$TARGET_KERNEL_PREFIX" LDFLAGS="" ARCH=arm make mrproper
CROSS_COMPILE="$TARGET_KERNEL_PREFIX" LDFLAGS="" ARCH=arm make $($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config)
CROSS_COMPILE="$TARGET_KERNEL_PREFIX" LDFLAGS="" ARCH=arm make HOSTCC="$HOST_CC" HOSTSTRIP="true"
[ "${BUILD_WITH_DEBUG}" = "yes" ] && PKG_DEBUG=1 || PKG_DEBUG=0
DEBUG=${PKG_DEBUG} CROSS_COMPILE="$TARGET_KERNEL_PREFIX" LDFLAGS="" ARCH=arm make mrproper
DEBUG=${PKG_DEBUG} CROSS_COMPILE="$TARGET_KERNEL_PREFIX" LDFLAGS="" ARCH=arm make $($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config)
DEBUG=${PKG_DEBUG} CROSS_COMPILE="$TARGET_KERNEL_PREFIX" LDFLAGS="" ARCH=arm make HOSTCC="$HOST_CC" HOSTSTRIP="true"
fi
}

View File

@ -0,0 +1,37 @@
diff -Naur xorg-server-1.20.0/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h ../6.42/build.LibreELEC-Generic.x86_64-8.2.5-6.42.2/xorg-server-1.19.6/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
--- xorg-server-1.20.0/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h 2018-05-10 18:32:35.000000000 +0200
+++ xorg-server-1.20.0/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h 2018-06-03 20:05:55.564739662 +0200
@@ -205,3 +205,33 @@
CHIPSET(0x67DF, POLARIS10_, POLARIS10)
CHIPSET(0x98E4, STONEY_, STONEY)
+
+CHIPSET(0x6980, POLARIS12_, POLARIS12)
+CHIPSET(0x6981, POLARIS12_, POLARIS12)
+CHIPSET(0x6985, POLARIS12_, POLARIS12)
+CHIPSET(0x6986, POLARIS12_, POLARIS12)
+CHIPSET(0x6987, POLARIS12_, POLARIS12)
+CHIPSET(0x6995, POLARIS12_, POLARIS12)
+CHIPSET(0x6997, POLARIS12_, POLARIS12)
+CHIPSET(0x699F, POLARIS12_, POLARIS12)
+
+CHIPSET(0x694C, VEGAM_, VEGAM)
+CHIPSET(0x694E, VEGAM_, VEGAM)
+
+CHIPSET(0x6860, VEGA10_, VEGA10)
+CHIPSET(0x6861, VEGA10_, VEGA10)
+CHIPSET(0x6862, VEGA10_, VEGA10)
+CHIPSET(0x6863, VEGA10_, VEGA10)
+CHIPSET(0x6864, VEGA10_, VEGA10)
+CHIPSET(0x6867, VEGA10_, VEGA10)
+CHIPSET(0x6868, VEGA10_, VEGA10)
+CHIPSET(0x687F, VEGA10_, VEGA10)
+CHIPSET(0x686C, VEGA10_, VEGA10)
+
+CHIPSET(0x69A0, VEGA12_, VEGA12)
+CHIPSET(0x69A1, VEGA12_, VEGA12)
+CHIPSET(0x69A2, VEGA12_, VEGA12)
+CHIPSET(0x69A3, VEGA12_, VEGA12)
+CHIPSET(0x69AF, VEGA12_, VEGA12)
+
+CHIPSET(0x15DD, RAVEN_, RAVEN)

View File

@ -70,7 +70,7 @@ make_target() {
esac
# Compile device trees
LDFLAGS="" make $DTB_LIST_FILTERED
kernel_make $DTB_LIST_FILTERED
mv arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/*.dtb $PKG_BUILD
popd > /dev/null

View File

@ -55,10 +55,11 @@ post_unpack() {
make_target() {
if [ -n "$PKG_URL" ]; then
[ "${BUILD_WITH_DEBUG}" = "yes" ] && PKG_DEBUG=1 || PKG_DEBUG=0
export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH
CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper
CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make $UBOOT_CONFIG
CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true"
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make $UBOOT_CONFIG
DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true"
fi
}

File diff suppressed because it is too large Load Diff

View File

@ -92,7 +92,7 @@
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS bcm_sta intel_nuc_led"
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="yes"
DRIVER_ADDONS_SUPPORT="NO"
# driver addons to install:
# for a list of additinoal drivers see packages/linux-driver-addons