mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-27 18:40:51 +00:00
samsung: add initial Samsung project with Exynos device
This commit is contained in:
parent
025f14a851
commit
2003b29911
6
projects/Samsung/bootloader/config
Normal file
6
projects/Samsung/bootloader/config
Normal file
@ -0,0 +1,6 @@
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_LZO=y
|
||||
CONFIG_LZMA=y
|
||||
CONFIG_BOOTDELAY=0
|
||||
#CC_OPTIMIZE_FOR_SIZE=n
|
||||
#CC_OPTIMIZE_LIBS_FOR_SPEED=y
|
11
projects/Samsung/bootloader/install
Normal file
11
projects/Samsung/bootloader/install
Normal file
@ -0,0 +1,11 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
echo "$BOOTLOADER: copying u-boot-dtb.bin"
|
||||
cp -av u-boot-dtb.bin $INSTALL/usr/share/bootloader
|
||||
|
||||
echo "$BOOTLOADER: copying odroid firmware"
|
||||
FIPDIR="$(get_build_dir exynos-boot-fip)"
|
||||
cp -av $FIPDIR/bl1.bin.hardkernel $INSTALL/usr/share/bootloader
|
||||
cp -av $FIPDIR/bl2.bin.hardkernel.720k_uboot $INSTALL/usr/share/bootloader
|
||||
cp -av $FIPDIR/tzsw.bin.hardkernel $INSTALL/usr/share/bootloader
|
43
projects/Samsung/bootloader/mkimage
Normal file
43
projects/Samsung/bootloader/mkimage
Normal file
@ -0,0 +1,43 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
. config/options ""
|
||||
|
||||
mkimage_uboot(){
|
||||
echo "image: writing u-boot to $(basename $DISK)"
|
||||
dd if="$INSTALL/usr/share/bootloader/bl1.bin.hardkernel" of="$DISK" bs=512 seek=1 conv=notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
||||
dd if="$INSTALL/usr/share/bootloader/bl2.bin.hardkernel.720k_uboot" of="$DISK" bs=512 seek=31 conv=notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
||||
dd if="$INSTALL/usr/share/bootloader/u-boot-dtb.bin" of="$DISK" bs=512 seek=63 conv=notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
||||
dd if="$INSTALL/usr/share/bootloader/tzsw.bin.hardkernel" of="$DISK" bs=512 seek=1503 conv=notrunc >"$SAVE_ERROR" 2>&1 || show_error
|
||||
mcopy -s -o "$INSTALL/usr/share/bootloader/u-boot-dtb.bin" ::
|
||||
}
|
||||
|
||||
mkimage_extlinux(){
|
||||
echo "image: copying exlinux.conf"
|
||||
mkdir -p "${LE_TMP}/extlinux"
|
||||
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
||||
LABEL ${DISTRO}
|
||||
LINUX /${KERNEL_NAME}
|
||||
FDT /${DTB}
|
||||
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
||||
}
|
||||
|
||||
mkimage_dtb(){
|
||||
if [ "$DTB" != "@@DTB_NAME@@" ]; then
|
||||
echo "image: copying device tree"
|
||||
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/$DTB" ::
|
||||
else
|
||||
echo "image: copying device trees"
|
||||
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb" ::
|
||||
fi
|
||||
}
|
||||
|
||||
case "${UBOOT_SYSTEM}" in
|
||||
odroid*)
|
||||
mkimage_uboot
|
||||
mkimage_extlinux
|
||||
mkimage_dtb
|
||||
;;
|
||||
esac
|
8
projects/Samsung/bootloader/release
Normal file
8
projects/Samsung/bootloader/release
Normal file
@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
SRCDIR="$BUILD/image/system/usr/share/bootloader"
|
||||
DSTDIR="$RELEASE_DIR/3rdparty/bootloader"
|
||||
|
||||
mkdir -p "$DSTDIR/dtb"
|
||||
cp -a "$SRCDIR"/*xu4.dtb "$DSTDIR/dtb"
|
36
projects/Samsung/bootloader/update.sh
Normal file
36
projects/Samsung/bootloader/update.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
[ -z "$SYSTEM_ROOT" ] && SYSTEM_ROOT=""
|
||||
[ -z "$BOOT_ROOT" ] && BOOT_ROOT="/flash"
|
||||
[ -z "$BOOT_PART" ] && BOOT_PART=$(df "$BOOT_ROOT" | tail -1 | awk {' print $1 '})
|
||||
|
||||
# identify the boot device
|
||||
if [ -z "$BOOT_DISK" ]; then
|
||||
case $BOOT_PART in
|
||||
/dev/sd[a-z][0-9]*)
|
||||
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,[0-9]*,,g")
|
||||
;;
|
||||
/dev/mmcblk*)
|
||||
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,p[0-9]*,,g")
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# mount $BOOT_ROOT rw
|
||||
mount -o remount,rw $BOOT_ROOT
|
||||
|
||||
# update extlinux device trees
|
||||
if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then
|
||||
for dtbfile in $BOOT_ROOT/*.dtb ; do
|
||||
dtb=$(basename $dtbfile)
|
||||
echo "Updating $dtb"
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true
|
||||
done
|
||||
fi
|
||||
|
||||
# mount $BOOT_ROOT ro
|
||||
sync
|
||||
mount -o remount,ro $BOOT_ROOT
|
5
projects/Samsung/config/kernel-firmware.dat
Normal file
5
projects/Samsung/config/kernel-firmware.dat
Normal file
@ -0,0 +1,5 @@
|
||||
ath9k_htc
|
||||
rtl_nic/rtl8153a-3.fw
|
||||
rtlwifi/rtl8192cufw_TMSC.bin
|
||||
rtlwifi/rtl8192cufw.bin
|
||||
s5p-mfc-v8.fw
|
25
projects/Samsung/devices/Exynos/options
Normal file
25
projects/Samsung/devices/Exynos/options
Normal file
@ -0,0 +1,25 @@
|
||||
################################################################################
|
||||
# setup device defaults
|
||||
################################################################################
|
||||
|
||||
# The TARGET_CPU variable controls which processor should be targeted for
|
||||
# generated code.
|
||||
case $TARGET_ARCH in
|
||||
arm)
|
||||
TARGET_CPU="cortex-a15.cortex-a7"
|
||||
TARGET_FLOAT="hard"
|
||||
TARGET_FPU="neon-vfpv4"
|
||||
;;
|
||||
esac
|
||||
|
||||
# OpenGL-ES implementation to use
|
||||
OPENGLES="libmali"
|
||||
|
||||
# Graphic drivers to use
|
||||
GRAPHIC_DRIVERS="mali"
|
||||
|
||||
# KODI Player implementation to use
|
||||
KODIPLAYER_DRIVER="$OPENGLES"
|
||||
|
||||
# Mali GPU family
|
||||
MALI_FAMILY="t620"
|
9
projects/Samsung/filesystem/usr/bin/cputemp
Executable file
9
projects/Samsung/filesystem/usr/bin/cputemp
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# XU4 has 5x sensors so read them all and report the highest value
|
||||
TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone*/temp | sort -n | tail -1)
|
||||
TEMP="$(( $TEMP / 1000 ))"
|
||||
echo "${TEMP} C"
|
@ -0,0 +1,3 @@
|
||||
load-default-script-file = yes
|
||||
default-script-file = /storage/.config/pulse-daemon.conf.d/system.pa
|
||||
default-sample-rate = 48000
|
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/pulseaudio -nF
|
||||
#
|
||||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PulseAudio 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 Lesser General Public License
|
||||
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This startup script is used only if PulseAudio is started in system
|
||||
# mode.
|
||||
|
||||
### Load several protocols
|
||||
.ifexists module-esound-protocol-unix.so
|
||||
load-module module-esound-protocol-unix
|
||||
.endif
|
||||
load-module module-native-protocol-unix
|
||||
|
||||
### Automatically restore the volume of streams and devices
|
||||
load-module module-stream-restore
|
||||
load-module module-device-restore
|
||||
|
||||
### Automatically restore the default sink/source when changed by the user
|
||||
### during runtime
|
||||
### NOTE: This should be loaded as early as possible so that subsequent modules
|
||||
### that look up the default sink/source get the right value
|
||||
load-module module-default-device-restore
|
||||
|
||||
### Automatically move streams to the default sink if the sink they are
|
||||
### connected to dies, similar for sources
|
||||
load-module module-rescue-streams
|
||||
|
||||
### Make sure we always have a sink around, even if it is a null sink.
|
||||
load-module module-always-sink
|
||||
|
||||
### Automatically suspend sinks/sources that become idle for too long
|
||||
load-module module-suspend-on-idle
|
||||
|
||||
### Enable positioned event sounds
|
||||
load-module module-position-event-sounds
|
||||
|
||||
# Set ALSA audio device manually
|
||||
# load-module module-alsa-sink device=hw:0,1
|
||||
|
||||
# Detect ALSA audio devices using udev
|
||||
load-module module-udev-detect
|
||||
|
||||
# Ensures that passthrough streams are always allowed to play on sinks
|
||||
load-module module-allow-passthrough
|
||||
|
||||
### Automatically load modules for dbus
|
||||
.ifexists module-dbus-protocol.so
|
||||
load-module module-dbus-protocol
|
||||
.endif
|
||||
|
||||
### Automatically load modules for bluetooth
|
||||
.ifexists module-bluetooth-policy.so
|
||||
load-module module-bluetooth-policy
|
||||
.endif
|
||||
|
||||
.ifexists module-bluetooth-discover.so
|
||||
load-module module-bluetooth-discover
|
||||
.endif
|
||||
|
||||
.ifexists module-zeroconf-publish.so
|
||||
load-module module-zeroconf-publish
|
||||
.endif
|
||||
|
||||
load-module module-native-protocol-tcp auth-anonymous=1
|
||||
load-module module-switch-on-connect
|
5572
projects/Samsung/linux/linux.arm.conf
Normal file
5572
projects/Samsung/linux/linux.arm.conf
Normal file
File diff suppressed because it is too large
Load Diff
98
projects/Samsung/options
Normal file
98
projects/Samsung/options
Normal file
@ -0,0 +1,98 @@
|
||||
################################################################################
|
||||
# setup system defaults
|
||||
################################################################################
|
||||
|
||||
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
|
||||
BOOTLOADER="u-boot"
|
||||
|
||||
# U-Boot firmware package(s) to use
|
||||
UBOOT_FIRMWARE="exynos-boot-fip"
|
||||
|
||||
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
|
||||
KERNEL_TARGET="zImage"
|
||||
|
||||
# Additional kernel dependencies
|
||||
KERNEL_EXTRA_DEPENDS_TARGET="lz4:host"
|
||||
|
||||
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
|
||||
KERNEL_MAKE_EXTRACMD="dtbs"
|
||||
|
||||
# Kernel to use:
|
||||
LINUX="samsung"
|
||||
|
||||
# kernel serial console
|
||||
EXTRA_CMDLINE="quiet systemd.debug_shell=ttySAC2 console=ttySAC2,115200n8 console=tty0"
|
||||
|
||||
# Default system partition offset in sectors
|
||||
SYSTEM_PART_START=3072
|
||||
|
||||
|
||||
################################################################################
|
||||
# setup build defaults
|
||||
################################################################################
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS=""
|
||||
|
||||
# SquashFS compression method (gzip / lzo / xz)
|
||||
SQUASHFS_COMPRESSION="zstd"
|
||||
|
||||
|
||||
################################################################################
|
||||
# setup project defaults
|
||||
################################################################################
|
||||
|
||||
# build and install ALSA Audio support (yes / no)
|
||||
ALSA_SUPPORT="yes"
|
||||
|
||||
# OpenGL(X) implementation to use (no / mesa)
|
||||
OPENGL="no"
|
||||
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Use a vendor specific KODI repo
|
||||
KODI_VENDOR="samsung"
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
FIRMWARE="kernel-firmware wlan-firmware"
|
||||
|
||||
# build with installer (yes / no)
|
||||
INSTALLER_SUPPORT="no"
|
||||
|
||||
# build debug with valgrind (yes / no)
|
||||
# Increases image size significantly
|
||||
VALGRIND="no"
|
||||
|
||||
# additional packages to install:
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
|
||||
ADDITIONAL_PACKAGES="dtc"
|
||||
|
||||
# additional drivers to install:
|
||||
# for a list of additional drivers see packages/linux-drivers
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS=""
|
||||
|
||||
# build and install driver addons (yes / no)
|
||||
DRIVER_ADDONS_SUPPORT="no"
|
||||
|
||||
# driver addons to install:
|
||||
# for a list of additional drivers see packages/linux-driver-addons
|
||||
# Space separated list is supported,
|
||||
DRIVER_ADDONS="crazycat dvb-latest"
|
||||
|
||||
# use the kernel CEC framework for libcec (yes / no)
|
||||
CEC_FRAMEWORK_SUPPORT="yes"
|
||||
|
||||
# debug tty path
|
||||
DEBUG_TTY="/dev/ttySAC2"
|
||||
|
||||
# set the addon project
|
||||
ADDON_PROJECT="ARMv7"
|
@ -0,0 +1,46 @@
|
||||
From abda70cb93d3882dc22592c7a5179e739e56133b Mon Sep 17 00:00:00 2001
|
||||
From: Tamseel Shams <m.shams@samsung.com>
|
||||
Date: Sun, 5 Jul 2020 03:51:47 +0000
|
||||
Subject: [PATCH 01/25] FROMLIST(v1): serial: samsung: Re-factors UART IRQ
|
||||
resource for various Samsung SoC
|
||||
|
||||
In few older Samsung SoCs like s3c2410, s3c2412
|
||||
and s3c2440, UART IP is having 2 interrupt lines.
|
||||
However, in other SoCs like s3c6400, s5pv210,
|
||||
exynos5433, and exynos4210 UART is having only 1
|
||||
interrupt line. Due to this, "platform_get_irq(platdev, 1)"
|
||||
call in the driver gives the following warning:
|
||||
"IRQ index 1 not found" on recent platforms.
|
||||
|
||||
This patch re-factors the IRQ resources handling for
|
||||
each platform and hence fixing the above warnings seen
|
||||
on some platforms.
|
||||
|
||||
Signed-off-by: Tamseel Shams <m.shams@samsung.com>
|
||||
---
|
||||
drivers/tty/serial/samsung_tty.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
|
||||
index 73f951d65b93..7f05335c3a1e 100644
|
||||
--- a/drivers/tty/serial/samsung_tty.c
|
||||
+++ b/drivers/tty/serial/samsung_tty.c
|
||||
@@ -1885,10 +1885,13 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
|
||||
else {
|
||||
port->irq = ret;
|
||||
ourport->rx_irq = ret;
|
||||
- ourport->tx_irq = ret + 1;
|
||||
+ if (s3c24xx_serial_has_interrupt_mask(port))
|
||||
+ ourport->tx_irq = ret;
|
||||
+ else
|
||||
+ ourport->tx_irq = ret + 1;
|
||||
}
|
||||
|
||||
- ret = platform_get_irq(platdev, 1);
|
||||
+ ret = platform_get_irq_optional(platdev, 1);
|
||||
if (ret > 0)
|
||||
ourport->tx_irq = ret;
|
||||
/*
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 4ebb0fa9bdf877355ceaabc6ede0960002ebbfb1 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Mon, 21 Oct 2019 10:58:47 +1030
|
||||
Subject: [PATCH 02/25] MEMEKA: ARM: dma-mapping: increase DMA coherent pool
|
||||
size to 2M
|
||||
|
||||
---
|
||||
arch/arm/mm/dma-mapping.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index 8a8949174b1c..80d4e66039ff 100644
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -314,7 +314,7 @@ static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp,
|
||||
pgprot_t prot, struct page **ret_page,
|
||||
const void *caller, bool want_vaddr);
|
||||
|
||||
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
|
||||
static struct gen_pool *atomic_pool __ro_after_init;
|
||||
|
||||
static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,64 @@
|
||||
From eba616b4f08a69c3398d6fd32d19a8896d36db50 Mon Sep 17 00:00:00 2001
|
||||
From: OtherCrashOverride <OtherCrashOverride@users.noreply.github.com>
|
||||
Date: Sun, 9 Apr 2017 17:31:25 +0000
|
||||
Subject: [PATCH 03/25] MEMEKA: drm/exynos/mixer: never blend the base layer
|
||||
|
||||
On Exynos there is a solid color plane that is logically below all the other display planes.
|
||||
This causes display artifacts due to alpha. The patch disables blending the base plane with
|
||||
the solid color plane (no alpha).
|
||||
|
||||
Reviewed-by: memeka <mihailescu2m@gmail.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/exynos/exynos_mixer.c | 33 +++++++++++++++------------
|
||||
1 file changed, 18 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
|
||||
index 21b726baedea..c1a527fa1df8 100644
|
||||
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
|
||||
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
|
||||
@@ -315,23 +315,26 @@ static void mixer_cfg_gfx_blend(struct mixer_context *ctx, unsigned int win,
|
||||
u32 val;
|
||||
|
||||
val = MXR_GRP_CFG_COLOR_KEY_DISABLE; /* no blank key */
|
||||
- switch (pixel_alpha) {
|
||||
- case DRM_MODE_BLEND_PIXEL_NONE:
|
||||
- break;
|
||||
- case DRM_MODE_BLEND_COVERAGE:
|
||||
- val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
- break;
|
||||
- case DRM_MODE_BLEND_PREMULTI:
|
||||
- default:
|
||||
- val |= MXR_GRP_CFG_BLEND_PRE_MUL;
|
||||
- val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
- break;
|
||||
- }
|
||||
+ if (win) {
|
||||
+ switch (pixel_alpha) {
|
||||
+ case DRM_MODE_BLEND_PIXEL_NONE:
|
||||
+ break;
|
||||
+ case DRM_MODE_BLEND_COVERAGE:
|
||||
+ val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
+ break;
|
||||
+ case DRM_MODE_BLEND_PREMULTI:
|
||||
+ default:
|
||||
+ val |= MXR_GRP_CFG_BLEND_PRE_MUL;
|
||||
+ val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- if (alpha != DRM_BLEND_ALPHA_OPAQUE) {
|
||||
- val |= MXR_GRP_CFG_WIN_BLEND_EN;
|
||||
- val |= win_alpha;
|
||||
+ if (alpha != DRM_BLEND_ALPHA_OPAQUE) {
|
||||
+ val |= MXR_GRP_CFG_WIN_BLEND_EN;
|
||||
+ val |= win_alpha;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
mixer_reg_writemask(ctx, MXR_GRAPHIC_CFG(win),
|
||||
val, MXR_GRP_CFG_MISC_MASK);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,112 @@
|
||||
From c1c6c93af475ebfa806760f8883b3f06c3c19bbe Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Thu, 24 Jan 2019 16:07:24 +1030
|
||||
Subject: [PATCH 04/25] MEMEKA: media: s5p-jpeg: Enable decoding with multiple
|
||||
buffers
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-jpeg/jpeg-core.c | 45 ++++++++++++++++-----
|
||||
1 file changed, 35 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
|
||||
index 86bda3947110..3015a9c350f2 100644
|
||||
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
|
||||
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
|
||||
@@ -1797,6 +1797,31 @@ static int exynos3250_jpeg_try_crop(struct s5p_jpeg_ctx *ctx,
|
||||
* V4L2 controls
|
||||
*/
|
||||
|
||||
+static int vidioc_decoder_cmd(struct file *file, void *priv,
|
||||
+ struct v4l2_decoder_cmd *cmd)
|
||||
+{
|
||||
+ struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
|
||||
+ struct vb2_queue *vq_src = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
|
||||
+ struct vb2_v4l2_buffer *buf;
|
||||
+
|
||||
+ switch (cmd->cmd) {
|
||||
+ case V4L2_DEC_CMD_STOP:
|
||||
+ if (cmd->flags != 0)
|
||||
+ return -EINVAL;
|
||||
+ if (!vb2_is_streaming(vq_src))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ buf = v4l2_m2m_last_src_buf(ctx->fh.m2m_ctx);
|
||||
+ buf->flags |= V4L2_BUF_FLAG_LAST;
|
||||
+
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int s5p_jpeg_g_selection(struct file *file, void *priv,
|
||||
struct v4l2_selection *s)
|
||||
{
|
||||
@@ -1831,9 +1856,6 @@ static int s5p_jpeg_g_selection(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * V4L2 controls
|
||||
- */
|
||||
static int s5p_jpeg_s_selection(struct file *file, void *fh,
|
||||
struct v4l2_selection *s)
|
||||
{
|
||||
@@ -2025,6 +2047,8 @@ static const struct v4l2_ioctl_ops s5p_jpeg_ioctl_ops = {
|
||||
.vidioc_streamon = v4l2_m2m_ioctl_streamon,
|
||||
.vidioc_streamoff = v4l2_m2m_ioctl_streamoff,
|
||||
|
||||
+ .vidioc_decoder_cmd = vidioc_decoder_cmd,
|
||||
+
|
||||
.vidioc_g_selection = s5p_jpeg_g_selection,
|
||||
.vidioc_s_selection = s5p_jpeg_s_selection,
|
||||
|
||||
@@ -2471,13 +2495,6 @@ static int s5p_jpeg_queue_setup(struct vb2_queue *vq,
|
||||
|
||||
size = q_data->size;
|
||||
|
||||
- /*
|
||||
- * header is parsed during decoding and parsed information stored
|
||||
- * in the context so we do not allow another buffer to overwrite it
|
||||
- */
|
||||
- if (ctx->mode == S5P_JPEG_DECODE)
|
||||
- count = 1;
|
||||
-
|
||||
*nbuffers = count;
|
||||
*nplanes = 1;
|
||||
sizes[0] = size;
|
||||
@@ -2588,6 +2605,7 @@ static int s5p_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
static void s5p_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
{
|
||||
struct s5p_jpeg_ctx *ctx = vb2_get_drv_priv(q);
|
||||
+ struct vb2_v4l2_buffer *buf;
|
||||
|
||||
/*
|
||||
* STREAMOFF is an acknowledgment for resolution change event.
|
||||
@@ -2600,6 +2618,11 @@ static void s5p_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
ctx->state = JPEGCTX_RUNNING;
|
||||
}
|
||||
|
||||
+ while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx)))
|
||||
+ v4l2_m2m_buf_done(buf, VB2_BUF_STATE_ERROR);
|
||||
+ while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx)))
|
||||
+ v4l2_m2m_buf_done(buf, VB2_BUF_STATE_ERROR);
|
||||
+
|
||||
pm_runtime_put(ctx->jpeg->dev);
|
||||
}
|
||||
|
||||
@@ -2839,6 +2862,8 @@ static irqreturn_t exynos3250_jpeg_irq(int irq, void *dev_id)
|
||||
v4l2_m2m_buf_done(src_buf, state);
|
||||
if (curr_ctx->mode == S5P_JPEG_ENCODE)
|
||||
vb2_set_plane_payload(&dst_buf->vb2_buf, 0, payload_size);
|
||||
+ if (src_buf->flags & V4L2_BUF_FLAG_LAST)
|
||||
+ dst_buf->flags |= V4L2_BUF_FLAG_LAST;
|
||||
v4l2_m2m_buf_done(dst_buf, state);
|
||||
|
||||
curr_ctx->subsampling =
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 8ffeeccf93279efefc2a76aae04766b7ad6c0634 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 10 Jul 2018 11:24:56 +0930
|
||||
Subject: [PATCH 05/25] MEMEKA: media: exynos-gsc: fix v4l2 SELECTION api
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/exynos-gsc/gsc-core.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h
|
||||
index 8e5a9acb78aa..235d687614f0 100644
|
||||
--- a/drivers/media/platform/exynos-gsc/gsc-core.h
|
||||
+++ b/drivers/media/platform/exynos-gsc/gsc-core.h
|
||||
@@ -474,9 +474,9 @@ static inline struct gsc_frame *ctx_get_frame(struct gsc_ctx *ctx,
|
||||
{
|
||||
struct gsc_frame *frame;
|
||||
|
||||
- if (V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE == type) {
|
||||
+ if (V4L2_BUF_TYPE_VIDEO_OUTPUT == type || V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE == type) {
|
||||
frame = &ctx->s_frame;
|
||||
- } else if (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == type) {
|
||||
+ } else if (V4L2_BUF_TYPE_VIDEO_CAPTURE == type || V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == type) {
|
||||
frame = &ctx->d_frame;
|
||||
} else {
|
||||
pr_err("Wrong buffer/video queue type (%d)", type);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,81 @@
|
||||
From a47cabb4e0626125ea91fa25616e449705e1e783 Mon Sep 17 00:00:00 2001
|
||||
From: Thierry Escande <thierry.escande@collabora.com>
|
||||
Date: Wed, 26 Oct 2016 10:52:05 +0200
|
||||
Subject: [PATCH 06/25] MEMEKA: videobuf2-dc: Move vb2_dc_get_base_sgt() above
|
||||
mmap callbacks
|
||||
|
||||
This patch moves vb2_dc_get_base_sgt() function above mmap buffers
|
||||
callbacks, particularly vb2_dc_alloc() and vb2_dc_mmap() from where it
|
||||
will be called for cacheable MMAP support introduced in the next patch.
|
||||
|
||||
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
.../common/videobuf2/videobuf2-dma-contig.c | 44 +++++++++----------
|
||||
1 file changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
index f4b4a7c135eb..8accf13fe439 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
@@ -62,6 +62,28 @@ static unsigned long vb2_dc_get_contiguous_size(struct sg_table *sgt)
|
||||
return size;
|
||||
}
|
||||
|
||||
+static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct sg_table *sgt;
|
||||
+
|
||||
+ sgt = kmalloc(sizeof(*sgt), GFP_KERNEL);
|
||||
+ if (!sgt) {
|
||||
+ dev_err(buf->dev, "failed to alloc sg table\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ ret = dma_get_sgtable_attrs(buf->dev, sgt, buf->cookie, buf->dma_addr,
|
||||
+ buf->size, buf->attrs);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(buf->dev, "failed to get scatterlist from DMA API\n");
|
||||
+ kfree(sgt);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return sgt;
|
||||
+}
|
||||
+
|
||||
/*********************************************/
|
||||
/* callbacks for all buffers */
|
||||
/*********************************************/
|
||||
@@ -358,28 +380,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = {
|
||||
.release = vb2_dc_dmabuf_ops_release,
|
||||
};
|
||||
|
||||
-static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf)
|
||||
-{
|
||||
- int ret;
|
||||
- struct sg_table *sgt;
|
||||
-
|
||||
- sgt = kmalloc(sizeof(*sgt), GFP_KERNEL);
|
||||
- if (!sgt) {
|
||||
- dev_err(buf->dev, "failed to alloc sg table\n");
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- ret = dma_get_sgtable_attrs(buf->dev, sgt, buf->cookie, buf->dma_addr,
|
||||
- buf->size, buf->attrs);
|
||||
- if (ret < 0) {
|
||||
- dev_err(buf->dev, "failed to get scatterlist from DMA API\n");
|
||||
- kfree(sgt);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- return sgt;
|
||||
-}
|
||||
-
|
||||
static struct dma_buf *vb2_dc_get_dmabuf(void *buf_priv, unsigned long flags)
|
||||
{
|
||||
struct vb2_dc_buf *buf = buf_priv;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,69 @@
|
||||
From a25f859386e35782c139861c6d1fe7821274d2d0 Mon Sep 17 00:00:00 2001
|
||||
From: Heng-Ruey Hsu <henryhsu@chromium.org>
|
||||
Date: Wed, 26 Oct 2016 10:52:06 +0200
|
||||
Subject: [PATCH 07/25] MEMEKA: videobuf2-dc: Support cacheable MMAP
|
||||
|
||||
DMA allocations for MMAP type are uncached by default. But for
|
||||
some cases, CPU has to access the buffers. ie: memcpy for format
|
||||
converter. Supporting cacheable MMAP improves huge performance.
|
||||
|
||||
This patch enables cacheable memory for DMA coherent allocator in mmap
|
||||
buffer allocation if non-consistent DMA attribute is set and kernel
|
||||
mapping is present. Even if userspace doesn't mmap the buffer, sync
|
||||
still should be happening if kernel mapping is present.
|
||||
If not done in allocation, it is enabled when memory is mapped from
|
||||
userspace (if non-consistent DMA attribute is set).
|
||||
|
||||
Signed-off-by: Heng-Ruey Hsu <henryhsu@chromium.org>
|
||||
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>
|
||||
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
|
||||
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
.../common/videobuf2/videobuf2-dma-contig.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
index 8accf13fe439..cf65bded46a9 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
@@ -152,6 +152,10 @@ static void vb2_dc_put(void *buf_priv)
|
||||
sg_free_table(buf->sgt_base);
|
||||
kfree(buf->sgt_base);
|
||||
}
|
||||
+ if (buf->dma_sgt) {
|
||||
+ sg_free_table(buf->dma_sgt);
|
||||
+ kfree(buf->dma_sgt);
|
||||
+ }
|
||||
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
|
||||
buf->attrs);
|
||||
put_device(buf->dev);
|
||||
@@ -193,6 +197,14 @@ static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
|
||||
buf->handler.put = vb2_dc_put;
|
||||
buf->handler.arg = buf;
|
||||
|
||||
+ /*
|
||||
+ * Enable cache maintenance. Even if userspace doesn't mmap the buffer,
|
||||
+ * sync still should be happening if kernel mapping is present.
|
||||
+ */
|
||||
+ if (!(buf->attrs & DMA_ATTR_NO_KERNEL_MAPPING) &&
|
||||
+ buf->attrs & DMA_ATTR_NON_CONSISTENT)
|
||||
+ buf->dma_sgt = vb2_dc_get_base_sgt(buf);
|
||||
+
|
||||
refcount_set(&buf->refcount, 1);
|
||||
|
||||
return buf;
|
||||
@@ -222,6 +234,10 @@ static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
|
||||
|
||||
vma->vm_ops->open(vma);
|
||||
|
||||
+ /* Enable cache maintenance if not enabled in allocation. */
|
||||
+ if (!buf->dma_sgt && buf->attrs & DMA_ATTR_NON_CONSISTENT)
|
||||
+ buf->dma_sgt = vb2_dc_get_base_sgt(buf);
|
||||
+
|
||||
pr_debug("%s: mapped dma addr 0x%08lx at 0x%08lx, size %ld\n",
|
||||
__func__, (unsigned long)buf->dma_addr, vma->vm_start,
|
||||
buf->size);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 96a150ab1edd5dcfd06f3d564b0cbdde4b49c6cc Mon Sep 17 00:00:00 2001
|
||||
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Wed, 15 Feb 2017 14:08:49 +0100
|
||||
Subject: [PATCH 08/25] MEMEKA: ARM: dma-mapping: add support for
|
||||
non-consistent dma_mmap
|
||||
|
||||
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
arch/arm/mm/dma-mapping.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index 80d4e66039ff..afaf2e91b0bc 100644
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -567,7 +567,8 @@ static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot)
|
||||
{
|
||||
prot = (attrs & DMA_ATTR_WRITE_COMBINE) ?
|
||||
pgprot_writecombine(prot) :
|
||||
- pgprot_dmacoherent(prot);
|
||||
+ (attrs & DMA_ATTR_NON_CONSISTENT) ?
|
||||
+ prot : pgprot_dmacoherent(prot);
|
||||
return prot;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,36 @@
|
||||
From f0d2809c31442d62fe568fa32eab20f7e0baf7d8 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Mon, 30 Oct 2017 09:31:09 +1030
|
||||
Subject: [PATCH 09/25] MEMEKA: media: s5p-mfc: use cacheable DMA buffers to
|
||||
improve performance
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
index eba2b9f040df..37f2113a00ec 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
@@ -858,7 +858,7 @@ static int s5p_mfc_open(struct file *file)
|
||||
* We'll do mostly sequential access, so sacrifice TLB efficiency for
|
||||
* faster allocation.
|
||||
*/
|
||||
- q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
|
||||
+ q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
|
||||
q->mem_ops = &vb2_dma_contig_memops;
|
||||
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
||||
ret = vb2_queue_init(q);
|
||||
@@ -893,7 +893,7 @@ static int s5p_mfc_open(struct file *file)
|
||||
* We'll do mostly sequential access, so sacrifice TLB efficiency for
|
||||
* faster allocation.
|
||||
*/
|
||||
- q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
|
||||
+ q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
|
||||
q->mem_ops = &vb2_dma_contig_memops;
|
||||
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
||||
ret = vb2_queue_init(q);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,52 @@
|
||||
From beba0c663769d49b752c6b8f11f8341d56b16102 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 10 Jul 2018 22:01:38 +0930
|
||||
Subject: [PATCH 10/25] MEMEKA: media: s5p-mfc: copy timestamp and timecode in
|
||||
encoder output
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
|
||||
index 912fe0c5ab18..d48e7b57d96a 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
|
||||
@@ -1208,6 +1208,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
||||
{
|
||||
struct s5p_mfc_dev *dev = ctx->dev;
|
||||
struct s5p_mfc_buf *mb_entry;
|
||||
+ struct s5p_mfc_buf *dst_buf;
|
||||
unsigned long enc_y_addr = 0, enc_c_addr = 0;
|
||||
unsigned long mb_y_addr, mb_c_addr;
|
||||
int slice_type;
|
||||
@@ -1227,8 +1228,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
||||
&mb_entry->b->vb2_buf, 0);
|
||||
mb_c_addr = vb2_dma_contig_plane_dma_addr(
|
||||
&mb_entry->b->vb2_buf, 1);
|
||||
+ dst_buf = list_entry(ctx->dst_queue.next,
|
||||
+ struct s5p_mfc_buf, list);
|
||||
if ((enc_y_addr == mb_y_addr) &&
|
||||
(enc_c_addr == mb_c_addr)) {
|
||||
+ dst_buf->b->timecode = mb_entry->b->timecode;
|
||||
+ dst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;
|
||||
list_del(&mb_entry->list);
|
||||
ctx->src_queue_cnt--;
|
||||
vb2_buffer_done(&mb_entry->b->vb2_buf,
|
||||
@@ -1241,8 +1246,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
||||
&mb_entry->b->vb2_buf, 0);
|
||||
mb_c_addr = vb2_dma_contig_plane_dma_addr(
|
||||
&mb_entry->b->vb2_buf, 1);
|
||||
+ dst_buf = list_entry(ctx->dst_queue.next,
|
||||
+ struct s5p_mfc_buf, list);
|
||||
if ((enc_y_addr == mb_y_addr) &&
|
||||
(enc_c_addr == mb_c_addr)) {
|
||||
+ dst_buf->b->timecode = mb_entry->b->timecode;
|
||||
+ dst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;
|
||||
list_del(&mb_entry->list);
|
||||
ctx->ref_queue_cnt--;
|
||||
vb2_buffer_done(&mb_entry->b->vb2_buf,
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,32 @@
|
||||
From 06d0e059b754aef63e8ca0d901d6759fb9ed15e7 Mon Sep 17 00:00:00 2001
|
||||
From: OtherCrashOverride <OtherCrashOverride@users.noreply.github.com>
|
||||
Date: Fri, 19 May 2017 12:59:51 +0000
|
||||
Subject: [PATCH 11/25] MEMEKA: media: s5p-mfc: stop streaming before releasing
|
||||
queues
|
||||
|
||||
If streaming is active when the MFC device is closed, it will generate an IOMMU page-fault.
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
index 37f2113a00ec..8c39528be39e 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
@@ -941,6 +941,11 @@ static int s5p_mfc_release(struct file *file)
|
||||
mfc_debug_enter();
|
||||
if (dev)
|
||||
mutex_lock(&dev->mfc_mutex);
|
||||
+
|
||||
+ /* stop streaming */
|
||||
+ vb2_streamoff(&ctx->vq_src, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
|
||||
+ vb2_streamoff(&ctx->vq_dst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
|
||||
+
|
||||
vb2_queue_release(&ctx->vq_src);
|
||||
vb2_queue_release(&ctx->vq_dst);
|
||||
if (dev) {
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,34 @@
|
||||
From b67896608244f63641885f1e186c9f2add9447cc Mon Sep 17 00:00:00 2001
|
||||
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Fri, 19 Jul 2019 11:27:34 +0200
|
||||
Subject: [PATCH 12/25] MEMEKA: phy: exynos5-usbdrd: Calibrating makes sense
|
||||
only for USB2.0 PHY
|
||||
|
||||
PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling
|
||||
calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY.
|
||||
|
||||
Fixes: d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800")
|
||||
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
index e510732afb8b..7f6279fb4f8f 100644
|
||||
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
@@ -714,7 +714,9 @@ static int exynos5_usbdrd_phy_calibrate(struct phy *phy)
|
||||
struct phy_usb_instance *inst = phy_get_drvdata(phy);
|
||||
struct exynos5_usbdrd_phy *phy_drd = to_usbdrd_phy(inst);
|
||||
|
||||
- return exynos5420_usbdrd_phy_calibrate(phy_drd);
|
||||
+ if (inst->phy_cfg->id == EXYNOS5_DRDPHY_UTMI)
|
||||
+ return exynos5420_usbdrd_phy_calibrate(phy_drd);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct phy_ops exynos5_usbdrd_phy_ops = {
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From 5e218f158f89780e48be29c11da270ff1f6f968d Mon Sep 17 00:00:00 2001
|
||||
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Thu, 21 Nov 2019 11:11:45 +0100
|
||||
Subject: [PATCH 13/25] MEMEKA: clk: samsung: exynos5420: Keep top G3D clocks
|
||||
enabled
|
||||
|
||||
All top clocks on G3D path has to be enabled all the time to allow proper
|
||||
G3D power domain operation. This is achieved by adding CRITICAL flag to
|
||||
"mout_sw_aclk_g3d" clock, what keeps this clock and all its parents
|
||||
enabled.
|
||||
|
||||
This fixes following imprecise abort issue observed on Odroid XU3/XU4
|
||||
after enabling Panfrost driver by commit 1a5a85c56402 "ARM: dts: exynos:
|
||||
Add Mali/GPU node on Exynos5420 and enable it on Odroid XU3/4"):
|
||||
|
||||
panfrost 11800000.gpu: clock rate = 400000000
|
||||
panfrost 11800000.gpu: failed to get regulator: -517
|
||||
panfrost 11800000.gpu: regulator init failed -517
|
||||
Power domain G3D disable failed
|
||||
...
|
||||
panfrost 11800000.gpu: clock rate = 400000000
|
||||
8<--- cut here ---
|
||||
Unhandled fault: imprecise external abort (0x1406) at 0x00000000
|
||||
pgd = (ptrval)
|
||||
[00000000] *pgd=00000000
|
||||
Internal error: : 1406 [#1] PREEMPT SMP ARM
|
||||
Modules linked in:
|
||||
CPU: 7 PID: 53 Comm: kworker/7:1 Not tainted 5.4.0-rc8-next-20191119-00032-g56f1001191a6 #6923
|
||||
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
|
||||
Workqueue: events deferred_probe_work_func
|
||||
PC is at panfrost_gpu_soft_reset+0x94/0x110
|
||||
LR is at ___might_sleep+0x128/0x2dc
|
||||
...
|
||||
[<c05c231c>] (panfrost_gpu_soft_reset) from [<c05c2704>] (panfrost_gpu_init+0x10/0x67c)
|
||||
[<c05c2704>] (panfrost_gpu_init) from [<c05c15d0>] (panfrost_device_init+0x158/0x2cc)
|
||||
[<c05c15d0>] (panfrost_device_init) from [<c05c0cb0>] (panfrost_probe+0x80/0x178)
|
||||
[<c05c0cb0>] (panfrost_probe) from [<c05cfaa0>] (platform_drv_probe+0x48/0x9c)
|
||||
[<c05cfaa0>] (platform_drv_probe) from [<c05cd20c>] (really_probe+0x1c4/0x474)
|
||||
[<c05cd20c>] (really_probe) from [<c05cd694>] (driver_probe_device+0x78/0x1bc)
|
||||
[<c05cd694>] (driver_probe_device) from [<c05cb374>] (bus_for_each_drv+0x74/0xb8)
|
||||
[<c05cb374>] (bus_for_each_drv) from [<c05ccfa8>] (__device_attach+0xd4/0x16c)
|
||||
[<c05ccfa8>] (__device_attach) from [<c05cc110>] (bus_probe_device+0x88/0x90)
|
||||
[<c05cc110>] (bus_probe_device) from [<c05cc634>] (deferred_probe_work_func+0x4c/0xd0)
|
||||
[<c05cc634>] (deferred_probe_work_func) from [<c0149df0>] (process_one_work+0x300/0x864)
|
||||
[<c0149df0>] (process_one_work) from [<c014a3ac>] (worker_thread+0x58/0x5a0)
|
||||
[<c014a3ac>] (worker_thread) from [<c0151174>] (kthread+0x12c/0x160)
|
||||
[<c0151174>] (kthread) from [<c01010b4>] (ret_from_fork+0x14/0x20)
|
||||
Exception stack(0xee03dfb0 to 0xee03dff8)
|
||||
...
|
||||
Code: e594300c e5933020 e3130c01 1a00000f (ebefff50).
|
||||
---[ end trace badde2b74a65a540 ]---
|
||||
|
||||
In the above case, the Panfrost driver disables G3D clocks after failure
|
||||
of getting the needed regulator and return with -EPROVE_DEFER code. This
|
||||
causes G3D power domain disable failure and then, during second probe
|
||||
an imprecise abort is triggered due to undefined power domain state.
|
||||
|
||||
Fixes: 45f10dabb56b ("clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path")
|
||||
Fixes: c9f7567aff31 ("clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU")
|
||||
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
|
||||
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/clk/samsung/clk-exynos5420.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
|
||||
index edb2363c735a..1a5289d81a9f 100644
|
||||
--- a/drivers/clk/samsung/clk-exynos5420.c
|
||||
+++ b/drivers/clk/samsung/clk-exynos5420.c
|
||||
@@ -713,7 +713,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
|
||||
MUX(0, "mout_sw_aclk266_g2d", mout_sw_aclk266_g2d_p,
|
||||
SRC_TOP12, 12, 1),
|
||||
MUX_F(0, "mout_sw_aclk_g3d", mout_sw_aclk_g3d_p, SRC_TOP12, 16, 1,
|
||||
- CLK_SET_RATE_PARENT, 0),
|
||||
+ CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0),
|
||||
MUX(0, "mout_sw_aclk300_jpeg", mout_sw_aclk300_jpeg_p,
|
||||
SRC_TOP12, 20, 1),
|
||||
MUX(CLK_MOUT_SW_ACLK300, "mout_sw_aclk300_disp1",
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 20570c820357eb0cfee14342328a3e6920e8a320 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 10 Jul 2018 22:13:03 +0930
|
||||
Subject: [PATCH 14/25] MEMEKA: thermal: exynos: add support for 8 trip points
|
||||
on Exynos5422 TMU
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/thermal/samsung/exynos_tmu.c | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
|
||||
index e9a90bc23b11..b49df21fa0e7 100644
|
||||
--- a/drivers/thermal/samsung/exynos_tmu.c
|
||||
+++ b/drivers/thermal/samsung/exynos_tmu.c
|
||||
@@ -915,8 +915,6 @@ static int exynos_map_dt_data(struct platform_device *pdev)
|
||||
case SOC_ARCH_EXYNOS4412:
|
||||
case SOC_ARCH_EXYNOS5250:
|
||||
case SOC_ARCH_EXYNOS5260:
|
||||
- case SOC_ARCH_EXYNOS5420:
|
||||
- case SOC_ARCH_EXYNOS5420_TRIMINFO:
|
||||
data->tmu_set_trip_temp = exynos4412_tmu_set_trip_temp;
|
||||
data->tmu_set_trip_hyst = exynos4412_tmu_set_trip_hyst;
|
||||
data->tmu_initialize = exynos4412_tmu_initialize;
|
||||
@@ -935,6 +933,22 @@ static int exynos_map_dt_data(struct platform_device *pdev)
|
||||
data->min_efuse_value = 0;
|
||||
data->max_efuse_value = 100;
|
||||
break;
|
||||
+ case SOC_ARCH_EXYNOS5420:
|
||||
+ case SOC_ARCH_EXYNOS5420_TRIMINFO:
|
||||
+ data->tmu_set_trip_temp = exynos4412_tmu_set_trip_temp;
|
||||
+ data->tmu_set_trip_hyst = exynos4412_tmu_set_trip_hyst;
|
||||
+ data->tmu_initialize = exynos4412_tmu_initialize;
|
||||
+ data->tmu_control = exynos4210_tmu_control;
|
||||
+ data->tmu_read = exynos4412_tmu_read;
|
||||
+ data->tmu_set_emulation = exynos4412_tmu_set_emulation;
|
||||
+ data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
|
||||
+ data->ntrip = 8;
|
||||
+ data->gain = 8;
|
||||
+ data->reference_voltage = 16;
|
||||
+ data->efuse_value = 55;
|
||||
+ data->min_efuse_value = 16;
|
||||
+ data->max_efuse_value = 76;
|
||||
+ break;
|
||||
case SOC_ARCH_EXYNOS5433:
|
||||
data->tmu_set_trip_temp = exynos5433_tmu_set_trip_temp;
|
||||
data->tmu_set_trip_hyst = exynos5433_tmu_set_trip_hyst;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,45 @@
|
||||
From f8f90c73fe3c5b24c806ae17af657321afb47f4f Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 22 Jan 2019 11:55:07 +1030
|
||||
Subject: [PATCH 15/25] MEMEKA: arm: dts: exynos5422: enable Exynos5422 TMU
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
|
||||
index ab27ff8bc3dc..4a4710efb429 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
|
||||
@@ -1030,22 +1030,27 @@
|
||||
|
||||
&tmu_cpu0 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_cpu1 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_cpu2 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_cpu3 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_gpu {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,138 @@
|
||||
From c6272f5973722d3d396e7123ebb3e1fcd35ba5cc Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Date: Wed, 7 Nov 2018 18:09:44 +0100
|
||||
Subject: [PATCH 16/25] MEMEKA: thermal: add irq-mode configuration for trip
|
||||
point
|
||||
|
||||
This patch adds support irq mode in trip point.
|
||||
When that flag is set in DT, there is no need for polling
|
||||
in thermal framework. Crossing the trip point will rise an IRQ.
|
||||
The naming convention for tip point 'type' can be confussing
|
||||
and 'passive' (whic is passive cooling) might be interpretted wrongly.
|
||||
|
||||
This mechanism prevents from missue and adds explicit setting
|
||||
for hardware which support interrupts for pre-configured temperature
|
||||
threshold.
|
||||
|
||||
Cc: Zhang Rui <rui.zhang@intel.com>
|
||||
Cc: Eduardo Valentin <edubezval@gmail.com>
|
||||
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
|
||||
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/thermal/of-thermal.c | 17 +++++++++++++++++
|
||||
drivers/thermal/thermal_core.c | 10 ++++++++--
|
||||
include/linux/thermal.h | 5 +++++
|
||||
3 files changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
|
||||
index 874a47d6923f..1549561e28b2 100644
|
||||
--- a/drivers/thermal/of-thermal.c
|
||||
+++ b/drivers/thermal/of-thermal.c
|
||||
@@ -315,6 +315,20 @@ static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+of_thermal_get_trip_irq_mode(struct thermal_zone_device *tz, int trip,
|
||||
+ bool *mode)
|
||||
+{
|
||||
+ struct __thermal_zone *data = tz->devdata;
|
||||
+
|
||||
+ if (trip >= data->ntrips || trip < 0)
|
||||
+ return -EDOM;
|
||||
+
|
||||
+ *mode = data->trips[trip].irq_mode;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip,
|
||||
int *temp)
|
||||
{
|
||||
@@ -397,6 +411,7 @@ static struct thermal_zone_device_ops of_thermal_ops = {
|
||||
.set_mode = of_thermal_set_mode,
|
||||
|
||||
.get_trip_type = of_thermal_get_trip_type,
|
||||
+ .get_trip_irq_mode = of_thermal_get_trip_irq_mode,
|
||||
.get_trip_temp = of_thermal_get_trip_temp,
|
||||
.set_trip_temp = of_thermal_set_trip_temp,
|
||||
.get_trip_hyst = of_thermal_get_trip_hyst,
|
||||
@@ -860,6 +875,8 @@ static int thermal_of_populate_trip(struct device_node *np,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ trip->irq_mode = of_property_read_bool(np, "irq-mode");
|
||||
+
|
||||
/* Required for cooling map matching */
|
||||
trip->np = np;
|
||||
of_node_get(np);
|
||||
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
|
||||
index 9a321dc548c8..ef23a33d34b6 100644
|
||||
--- a/drivers/thermal/thermal_core.c
|
||||
+++ b/drivers/thermal/thermal_core.c
|
||||
@@ -410,6 +410,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz,
|
||||
static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
|
||||
{
|
||||
enum thermal_trip_type type;
|
||||
+ bool irq_mode = false;
|
||||
|
||||
/* Ignore disabled trip points */
|
||||
if (test_bit(trip, &tz->trips_disabled))
|
||||
@@ -423,9 +424,14 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
|
||||
handle_non_critical_trips(tz, trip);
|
||||
/*
|
||||
* Alright, we handled this trip successfully.
|
||||
- * So, start monitoring again.
|
||||
+ * So, start monitoring in polling mode if
|
||||
+ * trip is not using irq HW support.
|
||||
*/
|
||||
- monitor_thermal_zone(tz);
|
||||
+ if (tz->ops->get_trip_irq_mode)
|
||||
+ tz->ops->get_trip_irq_mode(tz, trip, &irq_mode);
|
||||
+
|
||||
+ if (!irq_mode)
|
||||
+ monitor_thermal_zone(tz);
|
||||
}
|
||||
|
||||
static void update_temperature(struct thermal_zone_device *tz)
|
||||
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
|
||||
index c91b1e344d56..c4ce2b875b73 100644
|
||||
--- a/include/linux/thermal.h
|
||||
+++ b/include/linux/thermal.h
|
||||
@@ -92,6 +92,7 @@ struct thermal_zone_device_ops {
|
||||
enum thermal_device_mode);
|
||||
int (*get_trip_type) (struct thermal_zone_device *, int,
|
||||
enum thermal_trip_type *);
|
||||
+ int (*get_trip_irq_mode) (struct thermal_zone_device *, int, bool *);
|
||||
int (*get_trip_temp) (struct thermal_zone_device *, int, int *);
|
||||
int (*set_trip_temp) (struct thermal_zone_device *, int, int);
|
||||
int (*get_trip_hyst) (struct thermal_zone_device *, int, int *);
|
||||
@@ -185,6 +186,7 @@ struct thermal_zone_device {
|
||||
struct thermal_attr *trip_temp_attrs;
|
||||
struct thermal_attr *trip_type_attrs;
|
||||
struct thermal_attr *trip_hyst_attrs;
|
||||
+ struct thermal_attr *trip_irq_mode_attrs;
|
||||
void *devdata;
|
||||
int trips;
|
||||
unsigned long trips_disabled; /* bitmap for disabled trips */
|
||||
@@ -353,6 +355,8 @@ struct thermal_zone_of_device_ops {
|
||||
* @temperature: temperature value in miliCelsius
|
||||
* @hysteresis: relative hysteresis in miliCelsius
|
||||
* @type: trip point type
|
||||
+ * @irq_mode: to not use polling in framework set support of HW irq (which will
|
||||
+ * be triggered when temperature reaches this level).
|
||||
*/
|
||||
|
||||
struct thermal_trip {
|
||||
@@ -360,6 +364,7 @@ struct thermal_trip {
|
||||
int temperature;
|
||||
int hysteresis;
|
||||
enum thermal_trip_type type;
|
||||
+ bool irq_mode;
|
||||
};
|
||||
|
||||
/* Function declarations */
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,130 @@
|
||||
From 61aea8433aba4b8b40dfc777b59afc157a8fd32a Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Date: Wed, 7 Nov 2018 18:09:45 +0100
|
||||
Subject: [PATCH 17/25] MEMEKA: thermal: add new sysfs file for irq-mode
|
||||
|
||||
Patch adds show functions for irq-mode feature.
|
||||
It allocates new attributes and extends the old list.
|
||||
|
||||
Cc: Zhang Rui <rui.zhang@intel.com>
|
||||
Cc: Eduardo Valentin <edubezval@gmail.com>
|
||||
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
|
||||
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/thermal/thermal_sysfs.c | 53 +++++++++++++++++++++++++++++++--
|
||||
1 file changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
|
||||
index aa99edb4dff7..e3ede8af79cc 100644
|
||||
--- a/drivers/thermal/thermal_sysfs.c
|
||||
+++ b/drivers/thermal/thermal_sysfs.c
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "thermal_core.h"
|
||||
|
||||
+#define TRIP_ATTR_NUM 4
|
||||
+
|
||||
/* sys I/F for thermal zone */
|
||||
|
||||
static ssize_t
|
||||
@@ -166,6 +168,28 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr,
|
||||
return sprintf(buf, "%d\n", temperature);
|
||||
}
|
||||
|
||||
+static ssize_t
|
||||
+trip_point_irq_mode_show(struct device *dev, struct device_attribute *attr,
|
||||
+ char *buf)
|
||||
+{
|
||||
+ struct thermal_zone_device *tz = to_thermal_zone(dev);
|
||||
+ int trip, ret;
|
||||
+ bool mode;
|
||||
+
|
||||
+ if (!tz->ops->get_trip_irq_mode)
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ if (sscanf(attr->attr.name, "trip_point_%d_irq", &trip) != 1)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ ret = tz->ops->get_trip_irq_mode(tz, trip, &mode);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return sprintf(buf, "%d\n", mode);
|
||||
+}
|
||||
+
|
||||
static ssize_t
|
||||
trip_point_hyst_store(struct device *dev, struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
@@ -520,10 +544,19 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
if (!tz->trip_type_attrs)
|
||||
return -ENOMEM;
|
||||
|
||||
+ tz->trip_irq_mode_attrs = kcalloc(tz->trips,
|
||||
+ sizeof(*tz->trip_irq_mode_attrs),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!tz->trip_irq_mode_attrs) {
|
||||
+ kfree(tz->trip_type_attrs);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
tz->trip_temp_attrs = kcalloc(tz->trips, sizeof(*tz->trip_temp_attrs),
|
||||
GFP_KERNEL);
|
||||
if (!tz->trip_temp_attrs) {
|
||||
kfree(tz->trip_type_attrs);
|
||||
+ kfree(tz->trip_irq_mode_attrs);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -533,14 +566,17 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
GFP_KERNEL);
|
||||
if (!tz->trip_hyst_attrs) {
|
||||
kfree(tz->trip_type_attrs);
|
||||
+ kfree(tz->trip_irq_mode_attrs);
|
||||
kfree(tz->trip_temp_attrs);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
- attrs = kcalloc(tz->trips * 3 + 1, sizeof(*attrs), GFP_KERNEL);
|
||||
+ attrs = kcalloc(tz->trips * TRIP_ATTR_NUM + 1, sizeof(*attrs),
|
||||
+ GFP_KERNEL);
|
||||
if (!attrs) {
|
||||
kfree(tz->trip_type_attrs);
|
||||
+ kfree(tz->trip_irq_mode_attrs);
|
||||
kfree(tz->trip_temp_attrs);
|
||||
if (tz->ops->get_trip_hyst)
|
||||
kfree(tz->trip_hyst_attrs);
|
||||
@@ -559,6 +595,19 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
tz->trip_type_attrs[indx].attr.show = trip_point_type_show;
|
||||
attrs[indx] = &tz->trip_type_attrs[indx].attr.attr;
|
||||
|
||||
+ /* create trip irq_mode attribute */
|
||||
+ snprintf(tz->trip_irq_mode_attrs[indx].name,
|
||||
+ THERMAL_NAME_LENGTH, "trip_point_%d_irq", indx);
|
||||
+
|
||||
+ sysfs_attr_init(&tz->trip_irq_mode_attrs[indx].attr.attr);
|
||||
+ tz->trip_irq_mode_attrs[indx].attr.attr.name =
|
||||
+ tz->trip_irq_mode_attrs[indx].name;
|
||||
+ tz->trip_irq_mode_attrs[indx].attr.attr.mode = S_IRUGO;
|
||||
+ tz->trip_irq_mode_attrs[indx].attr.show =
|
||||
+ trip_point_irq_mode_show;
|
||||
+ attrs[indx + tz->trips * 3] =
|
||||
+ &tz->trip_irq_mode_attrs[indx].attr.attr;
|
||||
+
|
||||
/* create trip temp attribute */
|
||||
snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH,
|
||||
"trip_point_%d_temp", indx);
|
||||
@@ -595,7 +644,7 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
attrs[indx + tz->trips * 2] =
|
||||
&tz->trip_hyst_attrs[indx].attr.attr;
|
||||
}
|
||||
- attrs[tz->trips * 3] = NULL;
|
||||
+ attrs[tz->trips * TRIP_ATTR_NUM] = NULL;
|
||||
|
||||
tz->trips_attribute_group.attrs = attrs;
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,68 @@
|
||||
From c7eed0d079bb5febcb1f6a460ec9cba83bf579ea Mon Sep 17 00:00:00 2001
|
||||
From: "k.konieczny@partner.samsung.com" <k.konieczny@partner.samsung.com>
|
||||
Date: Tue, 8 Oct 2019 15:49:23 +0200
|
||||
Subject: [PATCH 18/25] MEMEKA: devfreq: exynos-bus: workaround
|
||||
dev_pm_opp_set_rate() errors on Exynos5422/5800 SoCs
|
||||
|
||||
Commit 4294a779bd8d ("PM / devfreq: exynos-bus: Convert to use
|
||||
dev_pm_opp_set_rate()") introduced errors:
|
||||
exynos-bus: new bus device registered: soc:bus_wcore ( 84000 KHz ~ 400000 KHz)
|
||||
exynos-bus: new bus device registered: soc:bus_noc ( 67000 KHz ~ 100000 KHz)
|
||||
exynos-bus: new bus device registered: soc:bus_fsys_apb (100000 KHz ~ 200000 KHz)
|
||||
...
|
||||
exynos-bus soc:bus_wcore: dev_pm_opp_set_rate: failed to find current OPP for freq 532000000 (-34)
|
||||
exynos-bus soc:bus_noc: dev_pm_opp_set_rate: failed to find current OPP for freq 111000000 (-34)
|
||||
exynos-bus soc:bus_fsys_apb: dev_pm_opp_set_rate: failed to find current OPP for freq 222000000 (-34)
|
||||
|
||||
They are caused by incorrect PLL assigned to clock source, which results
|
||||
in clock rate outside of OPP range. Add workaround for this in
|
||||
exynos_bus_parse_of() by adjusting clock rate to those present in OPP.
|
||||
|
||||
Fixes: 4294a779bd8d ("PM / devfreq: exynos-bus: Convert to use dev_pm_opp_set_rate()")
|
||||
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
|
||||
Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/devfreq/exynos-bus.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
|
||||
index 8fa8eb541373..5b167eadb21e 100644
|
||||
--- a/drivers/devfreq/exynos-bus.c
|
||||
+++ b/drivers/devfreq/exynos-bus.c
|
||||
@@ -243,7 +243,7 @@ static int exynos_bus_parse_of(struct device_node *np,
|
||||
{
|
||||
struct device *dev = bus->dev;
|
||||
struct dev_pm_opp *opp;
|
||||
- unsigned long rate;
|
||||
+ unsigned long rate, opp_rate;
|
||||
int ret;
|
||||
|
||||
/* Get the clock to provide each bus with source clock */
|
||||
@@ -267,13 +267,21 @@ static int exynos_bus_parse_of(struct device_node *np,
|
||||
}
|
||||
|
||||
rate = clk_get_rate(bus->clk);
|
||||
-
|
||||
- opp = devfreq_recommended_opp(dev, &rate, 0);
|
||||
+ opp_rate = rate;
|
||||
+ opp = devfreq_recommended_opp(dev, &opp_rate, 0);
|
||||
if (IS_ERR(opp)) {
|
||||
dev_err(dev, "failed to find dev_pm_opp\n");
|
||||
ret = PTR_ERR(opp);
|
||||
goto err_opp;
|
||||
}
|
||||
+ /*
|
||||
+ * FIXME: U-boot leaves clock source at incorrect PLL, this results
|
||||
+ * in clock rate outside defined OPP rate. Work around this bug by
|
||||
+ * setting clock rate to recommended one.
|
||||
+ */
|
||||
+ if (rate > opp_rate)
|
||||
+ clk_set_rate(bus->clk, opp_rate);
|
||||
+
|
||||
bus->curr_freq = dev_pm_opp_get_freq(opp);
|
||||
dev_pm_opp_put(opp);
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,75 @@
|
||||
From 8ca78a11396a1d1f5d7aa49d3c3f2ecd89aa07bd Mon Sep 17 00:00:00 2001
|
||||
From: Anand Moon <moon.linux@yahoo.com>
|
||||
Date: Sun, 12 Jul 2015 18:41:20 +0530
|
||||
Subject: [PATCH 19/25] MEMEKA: regulator: s2mps11: call shutdown function to
|
||||
poweroff
|
||||
|
||||
Added .shutdown function to s2mps11 to help poweroff the board successfully.
|
||||
The device driver clears the register to turn off the PMIC.
|
||||
|
||||
s2mps11-pmic: S2MPS11_REG_CTRL1 reg value 16:00000000000000000000000000010000
|
||||
|
||||
Console log.
|
||||
|
||||
* Unmounting temporary filesystems... [ OK ]
|
||||
* Deactivating swap... [ OK ]
|
||||
* Unmounting local filesystems... [ OK ]
|
||||
* Will now halt
|
||||
[ 209.020280] reboot: Power down
|
||||
[ 209.122039] Power down failed, please power off system manually.
|
||||
|
||||
Change-Id: If6ea0dec154b00ceeaaddbac393c67dc35c26279
|
||||
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/regulator/s2mps11.c | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
|
||||
index 23d288278957..b3ee46955986 100644
|
||||
--- a/drivers/regulator/s2mps11.c
|
||||
+++ b/drivers/regulator/s2mps11.c
|
||||
@@ -1243,6 +1243,31 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void s2mps11_pmic_shutdown(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
+ unsigned int reg_val, ret;
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_CTRL1, ®_val);
|
||||
+ if (ret < 0) {
|
||||
+ dev_crit(&pdev->dev, "could not read S2MPS11_REG_CTRL1 value\n");
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * s2mps11-pmic: S2MPS11_REG_CTRL1 reg value
|
||||
+ * is 00000000000000000000000000010000
|
||||
+ * clear the S2MPS11_REG_CTRL1 0x10 value to shutdown.
|
||||
+ */
|
||||
+ if (reg_val & BIT(4)) {
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic,
|
||||
+ S2MPS11_REG_CTRL1,
|
||||
+ BIT(4), BIT(0));
|
||||
+ if (ret)
|
||||
+ dev_crit(&pdev->dev,
|
||||
+ "could not write S2MPS11_REG_CTRL1 value\n");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static const struct platform_device_id s2mps11_pmic_id[] = {
|
||||
{ "s2mps11-regulator", S2MPS11X},
|
||||
{ "s2mps13-regulator", S2MPS13X},
|
||||
@@ -1258,6 +1283,7 @@ static struct platform_driver s2mps11_pmic_driver = {
|
||||
.name = "s2mps11-pmic",
|
||||
},
|
||||
.probe = s2mps11_pmic_probe,
|
||||
+ .shutdown = s2mps11_pmic_shutdown,
|
||||
.id_table = s2mps11_pmic_id,
|
||||
};
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,92 @@
|
||||
From 92384233014a73d60dcde47a0a73e090258c071a Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Fri, 18 Jan 2019 14:36:21 +1030
|
||||
Subject: [PATCH 20/25] MEMEKA: regulator: s2mps11: add ethernet power reset in
|
||||
shutdown function
|
||||
|
||||
Ethernet device cannot be detected on warm boot sometimes. This patch is
|
||||
to add the power reset routines for ethernet device using PMIC. Then
|
||||
ethernet device can be reset hardware-wise.
|
||||
|
||||
Change-Id: Iffbe2966da7e4679f63b91ab79241167391792df
|
||||
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/regulator/s2mps11.c | 54 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
|
||||
index b3ee46955986..5c4d4827a173 100644
|
||||
--- a/drivers/regulator/s2mps11.c
|
||||
+++ b/drivers/regulator/s2mps11.c
|
||||
@@ -1117,6 +1117,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
|
||||
regulator_desc_s2mpu02_buck7(7),
|
||||
};
|
||||
|
||||
+static int s2mps11_pmic_ethonoff(struct platform_device *pdev, bool onoff)
|
||||
+{
|
||||
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
+ unsigned int reg_val = 0;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L15CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L17CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (onoff) {
|
||||
+ /* ETH VDD0 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* ETH VDD0 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
@@ -1266,6 +1317,9 @@ static void s2mps11_pmic_shutdown(struct platform_device *pdev)
|
||||
"could not write S2MPS11_REG_CTRL1 value\n");
|
||||
}
|
||||
}
|
||||
+ s2mps11_pmic_ethonoff(pdev, false);
|
||||
+ mdelay(10);
|
||||
+ s2mps11_pmic_ethonoff(pdev, true);
|
||||
}
|
||||
|
||||
static const struct platform_device_id s2mps11_pmic_id[] = {
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 8cf133244d795e59ac3e1bdeefe88f60953d7818 Mon Sep 17 00:00:00 2001
|
||||
From: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
Date: Thu, 14 Nov 2019 12:19:37 +1030
|
||||
Subject: [PATCH 21/25] MEMEKA: fix eMMC clock settings
|
||||
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-exynos.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-exynos.h b/drivers/mmc/host/dw_mmc-exynos.h
|
||||
index 0280d394a32a..7088e39de5d2 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-exynos.h
|
||||
+++ b/drivers/mmc/host/dw_mmc-exynos.h
|
||||
@@ -61,7 +61,7 @@
|
||||
/* Fixed clock divider */
|
||||
#define EXYNOS4210_FIXED_CIU_CLK_DIV 2
|
||||
#define EXYNOS4412_FIXED_CIU_CLK_DIV 4
|
||||
-#define HS400_FIXED_CIU_CLK_DIV 1
|
||||
+#define HS400_FIXED_CIU_CLK_DIV 2
|
||||
|
||||
/* Minimal required clock frequency for cclkin, unit: HZ */
|
||||
#define EXYNOS_CCLKIN_MIN 50000000
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,31 @@
|
||||
From c7f3cddf852d75a07df26f0997fc07b38f55d54d Mon Sep 17 00:00:00 2001
|
||||
From: Brian Kim <brian.kim@hardkernel.com>
|
||||
Date: Tue, 21 Nov 2017 18:44:03 +0900
|
||||
Subject: [PATCH 22/25] MEMEKA: ODROID-XU4: arm: Set the system revision
|
||||
information
|
||||
|
||||
wiringPi library refers to this information in '/proc/cpuinfo' file.
|
||||
|
||||
Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
|
||||
Change-Id: I4a3368499cecf862eddb1430c6b436283f62d2c7
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
arch/arm/kernel/setup.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
|
||||
index d8e18cdd96d3..e302d6579c2a 100644
|
||||
--- a/arch/arm/kernel/setup.c
|
||||
+++ b/arch/arm/kernel/setup.c
|
||||
@@ -90,7 +90,7 @@ EXPORT_SYMBOL(cacheid);
|
||||
|
||||
unsigned int __atags_pointer __initdata;
|
||||
|
||||
-unsigned int system_rev;
|
||||
+unsigned int system_rev = 0x0100;
|
||||
EXPORT_SYMBOL(system_rev);
|
||||
|
||||
const char *system_serial;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,25 @@
|
||||
From d91b8b8c7d58e6a26eaddf3014239f79f5fe869b Mon Sep 17 00:00:00 2001
|
||||
From: MastaG <mastag@gmail.com>
|
||||
Date: Tue, 17 Dec 2019 09:33:19 +0100
|
||||
Subject: [PATCH 23/25] MEMEKA: fix ODROID-XU3 headphone-jack volume
|
||||
|
||||
---
|
||||
sound/soc/codecs/max98090.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
|
||||
index 032adc14562d..6448a4186618 100644
|
||||
--- a/sound/soc/codecs/max98090.c
|
||||
+++ b/sound/soc/codecs/max98090.c
|
||||
@@ -651,7 +651,7 @@ static const struct snd_kcontrol_new max98090_snd_controls[] = {
|
||||
|
||||
SOC_DOUBLE_R_TLV("Headphone Volume", M98090_REG_LEFT_HP_VOLUME,
|
||||
M98090_REG_RIGHT_HP_VOLUME, M98090_HPVOLL_SHIFT,
|
||||
- M98090_HPVOLL_NUM - 1, 0, max98090_hp_tlv),
|
||||
+ M98090_HPVOLL_NUM - 1 + 24, 0, max98090_hp_tlv),
|
||||
|
||||
SOC_DOUBLE_R_RANGE_TLV("Speaker Volume",
|
||||
M98090_REG_LEFT_SPK_VOLUME, M98090_REG_RIGHT_SPK_VOLUME,
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,116 @@
|
||||
From 38150d5d3558052609824a56b97178eb3b0668c1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Thu, 12 Dec 2019 13:48:45 +0000
|
||||
Subject: [PATCH 24/25] HACK: revert mm: emit tracepoint when RSS changes
|
||||
|
||||
The correct fix is modifying the mali-midgard driver to adapt to the changes
|
||||
in newer kernels, but until that's done we need to revert this.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
include/linux/mm.h | 14 +++-----------
|
||||
include/trace/events/kmem.h | 28 ----------------------------
|
||||
mm/memory.c | 6 ------
|
||||
3 files changed, 3 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index 465e8ad671f8..474bbd14b065 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -1848,27 +1848,19 @@ static inline unsigned long get_mm_counter(struct mm_struct *mm, int member)
|
||||
return (unsigned long)val;
|
||||
}
|
||||
|
||||
-void mm_trace_rss_stat(struct mm_struct *mm, int member, long count);
|
||||
-
|
||||
static inline void add_mm_counter(struct mm_struct *mm, int member, long value)
|
||||
{
|
||||
- long count = atomic_long_add_return(value, &mm->rss_stat.count[member]);
|
||||
-
|
||||
- mm_trace_rss_stat(mm, member, count);
|
||||
+ atomic_long_add(value, &mm->rss_stat.count[member]);
|
||||
}
|
||||
|
||||
static inline void inc_mm_counter(struct mm_struct *mm, int member)
|
||||
{
|
||||
- long count = atomic_long_inc_return(&mm->rss_stat.count[member]);
|
||||
-
|
||||
- mm_trace_rss_stat(mm, member, count);
|
||||
+ atomic_long_inc(&mm->rss_stat.count[member]);
|
||||
}
|
||||
|
||||
static inline void dec_mm_counter(struct mm_struct *mm, int member)
|
||||
{
|
||||
- long count = atomic_long_dec_return(&mm->rss_stat.count[member]);
|
||||
-
|
||||
- mm_trace_rss_stat(mm, member, count);
|
||||
+ atomic_long_dec(&mm->rss_stat.count[member]);
|
||||
}
|
||||
|
||||
/* Optimized variant when page is already known not to be PageAnon */
|
||||
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
|
||||
index f65b1f6db22d..788e049f899c 100644
|
||||
--- a/include/trace/events/kmem.h
|
||||
+++ b/include/trace/events/kmem.h
|
||||
@@ -335,34 +335,6 @@ static unsigned int __maybe_unused mm_ptr_to_hash(const void *ptr)
|
||||
#define __PTR_TO_HASHVAL
|
||||
#endif
|
||||
|
||||
-TRACE_EVENT(rss_stat,
|
||||
-
|
||||
- TP_PROTO(struct mm_struct *mm,
|
||||
- int member,
|
||||
- long count),
|
||||
-
|
||||
- TP_ARGS(mm, member, count),
|
||||
-
|
||||
- TP_STRUCT__entry(
|
||||
- __field(unsigned int, mm_id)
|
||||
- __field(unsigned int, curr)
|
||||
- __field(int, member)
|
||||
- __field(long, size)
|
||||
- ),
|
||||
-
|
||||
- TP_fast_assign(
|
||||
- __entry->mm_id = mm_ptr_to_hash(mm);
|
||||
- __entry->curr = !!(current->mm == mm);
|
||||
- __entry->member = member;
|
||||
- __entry->size = (count << PAGE_SHIFT);
|
||||
- ),
|
||||
-
|
||||
- TP_printk("mm_id=%u curr=%d member=%d size=%ldB",
|
||||
- __entry->mm_id,
|
||||
- __entry->curr,
|
||||
- __entry->member,
|
||||
- __entry->size)
|
||||
- );
|
||||
#endif /* _TRACE_KMEM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index f703fe8c8346..796c5a62e173 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -72,8 +72,6 @@
|
||||
#include <linux/oom.h>
|
||||
#include <linux/numa.h>
|
||||
|
||||
-#include <trace/events/kmem.h>
|
||||
-
|
||||
#include <asm/io.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pgalloc.h>
|
||||
@@ -154,10 +152,6 @@ static int __init init_zero_pfn(void)
|
||||
}
|
||||
core_initcall(init_zero_pfn);
|
||||
|
||||
-void mm_trace_rss_stat(struct mm_struct *mm, int member, long count)
|
||||
-{
|
||||
- trace_rss_stat(mm, member, count);
|
||||
-}
|
||||
|
||||
#if defined(SPLIT_RSS_COUNTING)
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,106 @@
|
||||
From ca94000c34d98c1bd83bdcabeee8cb79958c56e1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 29 Apr 2020 10:37:08 +0000
|
||||
Subject: [PATCH 25/25] WIP: ARM: dts: exynos5422: HC1/XU3/XU4 model name is
|
||||
ODROID not Odroid
|
||||
|
||||
Cosmetic change to model and audio card name for HC1/XU3/XU4 to
|
||||
put ODROID in capitals (as per Hardkernel branding). Also fixup
|
||||
some unneeded backslashes and wrap lines per kernel standards.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 ++--
|
||||
arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 2 +-
|
||||
arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 5 +++--
|
||||
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 5 +++--
|
||||
arch/arm/boot/dts/exynos5422-odroidxu4.dts | 6 +++---
|
||||
5 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidhc1.dts b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
|
||||
index 812659260278..b90da73510cf 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidhc1.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
|
||||
@@ -11,8 +11,8 @@
|
||||
#include "exynos5422-odroid-core.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid HC1";
|
||||
- compatible = "hardkernel,odroid-hc1", "samsung,exynos5800", \
|
||||
+ model = "Hardkernel ODROID HC1";
|
||||
+ compatible = "hardkernel,odroid-hc1", "samsung,exynos5800",
|
||||
"samsung,exynos5";
|
||||
|
||||
pwmleds {
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
|
||||
index c3c2d85267da..26961dcea010 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
|
||||
@@ -13,7 +13,7 @@
|
||||
/ {
|
||||
sound: sound {
|
||||
compatible = "samsung,odroid-xu3-audio";
|
||||
- model = "Odroid-XU3";
|
||||
+ model = "ODROID-XU3";
|
||||
|
||||
samsung,audio-widgets =
|
||||
"Headphone", "Headphone Jack",
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
|
||||
index 98feecad5489..d0084033199a 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
|
||||
@@ -14,8 +14,9 @@
|
||||
#include "exynos54xx-odroidxu-leds.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid XU3 Lite";
|
||||
- compatible = "hardkernel,odroid-xu3-lite", "samsung,exynos5800", "samsung,exynos5";
|
||||
+ model = "Hardkernel ODROID XU3 Lite";
|
||||
+ compatible = "hardkernel,odroid-xu3-lite", "samsung,exynos5800",
|
||||
+ "samsung,exynos5";
|
||||
};
|
||||
|
||||
&arm_a7_pmu {
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
|
||||
index db0bc17a667b..3ff7ec514e20 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
|
||||
@@ -13,8 +13,9 @@
|
||||
#include "exynos54xx-odroidxu-leds.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid XU3";
|
||||
- compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
|
||||
+ model = "Hardkernel ODROID XU3";
|
||||
+ compatible = "hardkernel,odroid-xu3", "samsung,exynos5800",
|
||||
+ "samsung,exynos5";
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu4.dts b/arch/arm/boot/dts/exynos5422-odroidxu4.dts
|
||||
index 892d389d6d09..d2061b244537 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu4.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu4.dts
|
||||
@@ -13,8 +13,8 @@
|
||||
#include "exynos5422-odroidxu3-common.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid XU4";
|
||||
- compatible = "hardkernel,odroid-xu4", "samsung,exynos5800", \
|
||||
+ model = "Hardkernel ODROID XU4";
|
||||
+ compatible = "hardkernel,odroid-xu4", "samsung,exynos5800",
|
||||
"samsung,exynos5";
|
||||
|
||||
pwmleds {
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
sound: sound {
|
||||
compatible = "samsung,odroid-xu3-audio";
|
||||
- model = "Odroid-XU4";
|
||||
+ model = "ODROID-XU4";
|
||||
|
||||
samsung,audio-routing = "I2S Playback", "Mixer DAI TX";
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
85
projects/Samsung/patches/u-boot/0001-add-xu4-defconfig.patch
Normal file
85
projects/Samsung/patches/u-boot/0001-add-xu4-defconfig.patch
Normal file
@ -0,0 +1,85 @@
|
||||
From a0597efafeee67acd0ef763300957c765c64738d Mon Sep 17 00:00:00 2001
|
||||
From: chewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 27 Apr 2020 03:02:53 +0000
|
||||
Subject: [PATCH] add xu4 defconfig
|
||||
|
||||
---
|
||||
configs/odroid-xu4_defconfig | 66 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
create mode 100644 configs/odroid-xu4_defconfig
|
||||
|
||||
diff --git a/configs/odroid-xu4_defconfig b/configs/odroid-xu4_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..31d9e67805
|
||||
--- /dev/null
|
||||
+++ b/configs/odroid-xu4_defconfig
|
||||
@@ -0,0 +1,66 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_CPU_INIT=y
|
||||
+CONFIG_ARCH_EXYNOS=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x43E00000
|
||||
+CONFIG_ARCH_EXYNOS5=y
|
||||
+CONFIG_ENV_SIZE=0x4000
|
||||
+CONFIG_ENV_OFFSET=0x310000
|
||||
+CONFIG_NR_DRAM_BANKS=8
|
||||
+CONFIG_IDENT_STRING=" for ODROID-XU4"
|
||||
+CONFIG_DISTRO_DEFAULTS=y
|
||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_BEST_MATCH=y
|
||||
+CONFIG_SILENT_CONSOLE=y
|
||||
+CONFIG_CONSOLE_MUX=y
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_BOARD_TYPES=y
|
||||
+CONFIG_SYS_PROMPT="ODROID# "
|
||||
+CONFIG_CMD_THOR_DOWNLOAD=y
|
||||
+CONFIG_CMD_DFU=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+CONFIG_CMD_EXT4_WRITE=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3"
|
||||
+#CONFIG_ENV_IS_IN_MMC is not set
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_ADC=y
|
||||
+CONFIG_ADC_EXYNOS=y
|
||||
+CONFIG_DFU_MMC=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_SMC911X=y
|
||||
+CONFIG_SMC911X_BASE=0x5000000
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_S2MPS11=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_S2MPS11=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_DWC3=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+CONFIG_USB_DWC3_PHY_SAMSUNG=y
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_MANUFACTURER="Samsung"
|
||||
+CONFIG_USB_GADGET_VENDOR_NUM=0x04e8
|
||||
+CONFIG_USB_GADGET_PRODUCT_NUM=0x6601
|
||||
+CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
+CONFIG_USB_FUNCTION_THOR=y
|
||||
+CONFIG_USB_HOST_ETHER=y
|
||||
+CONFIG_VIDEO_BRIDGE=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
--
|
||||
2.17.1
|
||||
|
Loading…
Reference in New Issue
Block a user