* Bunch of CRC errors in next with arm: move exports to definitions
From: Arnd Bergmann @ 2016-10-18 9:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161018045944.o3j4odeuq4kj6gzx@earth>
On Tuesday, October 18, 2016 6:59:44 AM CEST Sebastian Reichel wrote:
> Hi,
>
> On Mon, Aug 22, 2016 at 09:25:13AM -0700, Tony Lindgren wrote:
> > Looks like starting with next-20160818 I'm now getting close to
> > 800 lines of WARNINGs on ARM with omap2plus_defconfig while doing
> > make modules:
> >
> > Building modules, stage 2.
> > MODPOST 399 modules
> > WARNING: "__memzero" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > WARNING: "memset" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > WARNING: "memcpy" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > WARNING: "_set_bit" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > WARNING: "_test_and_set_bit" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > WARNING: "_clear_bit" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > WARNING: "__aeabi_uidivmod" [sound/usb/snd-usb-audio.ko] has no CRC!
> > WARNING: "_test_and_clear_bit" [sound/usb/snd-usb-audio.ko] has no CRC!
> > WARNING: "arm_copy_to_user" [sound/usb/snd-usb-audio.ko] has no CRC!
> > WARNING: "__aeabi_uidiv" [sound/usb/snd-usb-audio.ko] has no CRC!
> > ...
> > WARNING: "memset" [crypto/drbg.ko] has no CRC!
> > WARNING: "memcpy" [crypto/ctr.ko] has no CRC!
> > WARNING: "memcpy" [crypto/cmac.ko] has no CRC!
> > WARNING: "__memzero" [crypto/cmac.ko] has no CRC!
> > WARNING: "memcpy" [crypto/ccm.ko] has no CRC!
> > WARNING: "__memzero" [crypto/ccm.ko] has no CRC!
>
> Any update on this one? I just updated my power-supply next branch
> to v4.9-rc1 and now get almost 18000 CRC warnings for allmodconfig.
> (I use arm-linux-gnueabihf-gcc (Debian 6.1.1-9) 6.1.1 20160705)
Nick did a patch to fix this in general, and in powerpc specifically,
I sent a patch yesterday to fix the ARM specific symbols.
Arnd
^ permalink raw reply
* [RFC PATCH] mtd: nand: Add OX820 NAND Support
From: Neil Armstrong @ 2016-10-18 9:09 UTC (permalink / raw)
To: linux-arm-kernel
Add NAND driver to support the Oxford Semiconductor OX820 NAND Controller.
This is a simple memory mapped NAND controller with single chip select and
software ECC.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
.../devicetree/bindings/mtd/oxnas-nand.txt | 24 ++++
drivers/mtd/nand/Kconfig | 5 +
drivers/mtd/nand/Makefile | 1 +
drivers/mtd/nand/oxnas_nand.c | 144 +++++++++++++++++++++
4 files changed, 174 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/oxnas-nand.txt
create mode 100644 drivers/mtd/nand/oxnas_nand.c
diff --git a/Documentation/devicetree/bindings/mtd/oxnas-nand.txt b/Documentation/devicetree/bindings/mtd/oxnas-nand.txt
new file mode 100644
index 0000000..83b684d
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/oxnas-nand.txt
@@ -0,0 +1,24 @@
+* Oxford Semiconductor OXNAS NAND Controller
+
+Please refer to nand.txt for generic information regarding MTD NAND bindings.
+
+Required properties:
+ - compatible: "oxsemi,ox820-nand"
+ - reg: Base address and length for NAND mapped memory.
+
+Optional Properties:
+ - clocks: phandle to the NAND gate clock if needed.
+ - resets: phandle to the NAND reset control if needed.
+
+Example:
+
+nand: nand at 41000000 {
+ compatible = "oxsemi,ox820-nand";
+ reg = <0x41000000 0x100000>;
+ nand-ecc-mode = "soft";
+ clocks = <&stdclk CLK_820_NAND>;
+ resets = <&reset RESET_NAND>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "disabled";
+};
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 7b7a887..c023125 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -426,6 +426,11 @@ config MTD_NAND_ORION
No board specific support is done by this driver, each board
must advertise a platform_device for the driver to attach.
+config MTD_NAND_OXNAS
+ tristate "NAND Flash support for Oxford Semiconductor SoC"
+ help
+ This enables the NAND flash controller on Oxford Semiconductor SoCs.
+
config MTD_NAND_FSL_ELBC
tristate "NAND support for Freescale eLBC controllers"
depends on FSL_SOC
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index cafde6f..05fc054 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o
obj-$(CONFIG_MTD_NAND_ORION) += orion_nand.o
+obj-$(CONFIG_MTD_NAND_OXNAS) += oxnas_nand.o
obj-$(CONFIG_MTD_NAND_FSL_ELBC) += fsl_elbc_nand.o
obj-$(CONFIG_MTD_NAND_FSL_IFC) += fsl_ifc_nand.o
obj-$(CONFIG_MTD_NAND_FSL_UPM) += fsl_upm.o
diff --git a/drivers/mtd/nand/oxnas_nand.c b/drivers/mtd/nand/oxnas_nand.c
new file mode 100644
index 0000000..ee402ab
--- /dev/null
+++ b/drivers/mtd/nand/oxnas_nand.c
@@ -0,0 +1,144 @@
+/*
+ * Oxford Semiconductor OXNAS NAND driver
+ *
+ * Heavily based on plat_nand.c :
+ * Author: Vitaly Wool <vitalywool@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/clk.h>
+#include <linux/reset.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+
+/* nand commands */
+#define NAND_CMD_ALE BIT(18)
+#define NAND_CMD_CLE BIT(19)
+#define NAND_CMD_CS 0
+#define NAND_CMD_RESET 0xff
+#define NAND_CMD (NAND_CMD_CS | NAND_CMD_CLE)
+#define NAND_ADDR (NAND_CMD_CS | NAND_CMD_ALE)
+#define NAND_DATA (NAND_CMD_CS)
+
+struct oxnas_nand_data {
+ struct nand_chip chip;
+ void __iomem *io_base;
+ struct clk *clk;
+};
+
+static void oxnas_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
+ unsigned int ctrl)
+{
+ struct nand_chip *this = mtd->priv;
+ unsigned long nandaddr = (unsigned long) this->IO_ADDR_W;
+
+ if (ctrl & NAND_CTRL_CHANGE) {
+ nandaddr &= ~(NAND_CMD | NAND_ADDR);
+ if (ctrl & NAND_CLE)
+ nandaddr |= NAND_CMD;
+ else if (ctrl & NAND_ALE)
+ nandaddr |= NAND_ADDR;
+ this->IO_ADDR_W = (void __iomem *) nandaddr;
+ }
+
+ if (cmd != NAND_CMD_NONE)
+ writeb(cmd, (void __iomem *) nandaddr);
+}
+
+/*
+ * Probe for the NAND device.
+ */
+static int oxnas_nand_probe(struct platform_device *pdev)
+{
+ struct oxnas_nand_data *data;
+ struct mtd_info *mtd;
+ struct resource *res;
+ int err = 0;
+
+ /* Allocate memory for the device structure (and zero it) */
+ data = devm_kzalloc(&pdev->dev, sizeof(struct oxnas_nand_data),
+ GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ data->io_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(data->io_base))
+ return PTR_ERR(data->io_base);
+
+ data->clk = devm_clk_get(&pdev->dev, NULL);
+ if (IS_ERR(data->clk))
+ data->clk = NULL;
+
+ nand_set_flash_node(&data->chip, pdev->dev.of_node);
+ mtd = nand_to_mtd(&data->chip);
+ mtd->dev.parent = &pdev->dev;
+ mtd->priv = &data->chip;
+
+ data->chip.IO_ADDR_R = data->io_base;
+ data->chip.IO_ADDR_W = data->io_base;
+ data->chip.cmd_ctrl = oxnas_nand_cmd_ctrl;
+ data->chip.chip_delay = 30;
+ data->chip.ecc.mode = NAND_ECC_SOFT;
+ data->chip.ecc.algo = NAND_ECC_HAMMING;
+
+ platform_set_drvdata(pdev, data);
+
+ clk_prepare_enable(data->clk);
+ device_reset_optional(&pdev->dev);
+
+ /* Scan to find existence of the device */
+ if (nand_scan(mtd, 1)) {
+ err = -ENXIO;
+ goto out;
+ }
+
+ err = mtd_device_parse_register(mtd, NULL, NULL, NULL, 0);
+ if (!err)
+ return err;
+
+ nand_release(mtd);
+out:
+ return err;
+}
+
+static int oxnas_nand_remove(struct platform_device *pdev)
+{
+ struct oxnas_nand_data *data = platform_get_drvdata(pdev);
+
+ nand_release(nand_to_mtd(&data->chip));
+
+ return 0;
+}
+
+static const struct of_device_id oxnas_nand_match[] = {
+ { .compatible = "oxsemi,ox820-nand" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, oxnas_nand_match);
+
+static struct platform_driver oxnas_nand_driver = {
+ .probe = oxnas_nand_probe,
+ .remove = oxnas_nand_remove,
+ .driver = {
+ .name = "oxnas_nand",
+ .of_match_table = oxnas_nand_match,
+ },
+};
+
+module_platform_driver(oxnas_nand_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Vitaly Wool");
+MODULE_DESCRIPTION("Oxnas NAND driver");
+MODULE_ALIAS("platform:oxnas_nand");
--
2.7.0
^ permalink raw reply related
* [STLinux Kernel] [PATCH 02/19] phy: stih41x-usb: Remove usb phy driver and dt binding documentation.
From: Kishon Vijay Abraham I @ 2016-10-18 9:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <59fa8f92-114b-7b5f-fd2f-46c4f02b545e@st.com>
On Tuesday 18 October 2016 02:22 PM, Patrice Chotard wrote:
>
>
> On 10/18/2016 09:47 AM, Patrice Chotard wrote:
>> Hi
>>
>> On 09/23/2016 05:06 PM, Rob Herring wrote:
>>> On Wed, Sep 14, 2016 at 02:27:40PM +0100, Peter Griffin wrote:
>>>> This phy is only used on STiH415/6 based silicon, and support for
>>>> these SoC's is being removed from the kernel.
>>>>
>>>> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
>>>> Cc: <kishon@ti.com>
>>>> ---
>>>> .../devicetree/bindings/phy/phy-stih41x-usb.txt | 24 ---
>>>
>>> Acked-by: Rob Herring <robh@kernel.org>
>>
>> Applied on sti-dt-for-4.10 branch
>
>
> Sorry, i did a mistake, these patch should go in linux-phy tree.
> Kishon will you take care of it ?
sure, will queue this.
Thanks
Kishon
>
> Thanks
>
>>
>> Thanks
>>
>>
>>>
>>>> drivers/phy/Kconfig | 8 -
>>>> drivers/phy/Makefile | 1 -
>>>> drivers/phy/phy-stih41x-usb.c | 188 ---------------------
>>>> 4 files changed, 221 deletions(-)
>>>> delete mode 100644 Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt
>>>> delete mode 100644 drivers/phy/phy-stih41x-usb.c
>>
>> _______________________________________________
>> Kernel mailing list
>> Kernel at stlinux.com
>> http://www.stlinux.com/mailman/listinfo/kernel
>>
^ permalink raw reply
* [STLinux Kernel] [PATCH 18/19] stmmac: dwmac-sti: Remove obsolete STi platforms
From: Patrice Chotard @ 2016-10-18 8:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <dcbb8065-b272-0a2f-8efb-c55217712caf@st.com>
On 10/18/2016 10:05 AM, Patrice Chotard wrote:
>
>
> On 09/23/2016 05:11 PM, Rob Herring wrote:
>> On Wed, Sep 14, 2016 at 02:27:56PM +0100, Peter Griffin wrote:
>>> This patch removes support for STiH415/6 SoC's from the
>>> dwmac-sti driver and dt binding doc, as support for these
>>> platforms is being removed from the kernel. It also removes
>>> STiD127 related code, which has never actually been supported
>>> upstream.
>>>
>>> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
>>> Cc: <peppe.cavallaro@st.com>
>>> Cc: <alexandre.torgue@st.com>
>>> Cc: <netdev@vger.kernel.org>
>>> ---
>>> .../devicetree/bindings/net/sti-dwmac.txt | 3 +-
>>
>> Acked-by: Rob Herring <robh@kernel.org>
>
>
> Applied on sti-dt-for-4.10 branch
Sorry, i did a mistake, these patch should go in stmmac tree.
Peppe or Alexandre will you take care of it ?
Thanks
>
> Thanks
>
>>
>>> drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 37 ----------------------
>>> 2 files changed, 1 insertion(+), 39 deletions(-)
>
> _______________________________________________
> Kernel mailing list
> Kernel at stlinux.com
> http://www.stlinux.com/mailman/listinfo/kernel
>
^ permalink raw reply
* [PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition"
From: Arnd Bergmann @ 2016-10-18 8:57 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476773192-23715-1-git-send-email-robert.jarzmik@free.fr>
On Tuesday, October 18, 2016 8:46:32 AM CEST Robert Jarzmik wrote:
> This reverts commit c91134d9194478144ba579ca6efeddf628055650.
>
> The conversion of the pxa architecture is now finished for all
> drivers, so this functions has fullfilled its purpose and can
> now be removed.
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Nice!
That reminds me, do you have plans to work on the conversion away from
IORESOURCE_DMA and pxad_filter_fn towards the dma_slave_map interface?
I see that all pxa drivers already use dma_request_slave_channel_compat,
so this should be fairly straightforward to do, changing only the
driver and the arch/arm/mach-pxa/devices.c file.
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply
* [STLinux Kernel] [PATCH 02/19] phy: stih41x-usb: Remove usb phy driver and dt binding documentation.
From: Patrice Chotard @ 2016-10-18 8:52 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <778bd4b2-9e82-326b-f6e0-43360323d453@st.com>
On 10/18/2016 09:47 AM, Patrice Chotard wrote:
> Hi
>
> On 09/23/2016 05:06 PM, Rob Herring wrote:
>> On Wed, Sep 14, 2016 at 02:27:40PM +0100, Peter Griffin wrote:
>>> This phy is only used on STiH415/6 based silicon, and support for
>>> these SoC's is being removed from the kernel.
>>>
>>> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
>>> Cc: <kishon@ti.com>
>>> ---
>>> .../devicetree/bindings/phy/phy-stih41x-usb.txt | 24 ---
>>
>> Acked-by: Rob Herring <robh@kernel.org>
>
> Applied on sti-dt-for-4.10 branch
Sorry, i did a mistake, these patch should go in linux-phy tree.
Kishon will you take care of it ?
Thanks
>
> Thanks
>
>
>>
>>> drivers/phy/Kconfig | 8 -
>>> drivers/phy/Makefile | 1 -
>>> drivers/phy/phy-stih41x-usb.c | 188 ---------------------
>>> 4 files changed, 221 deletions(-)
>>> delete mode 100644 Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt
>>> delete mode 100644 drivers/phy/phy-stih41x-usb.c
>
> _______________________________________________
> Kernel mailing list
> Kernel at stlinux.com
> http://www.stlinux.com/mailman/listinfo/kernel
>
^ permalink raw reply
* [PATCH] drm/sun4i: Add a few formats
From: Maxime Ripard @ 2016-10-18 8:46 UTC (permalink / raw)
To: linux-arm-kernel
The planes can do more than what was previously exposed. Add support for
them.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
drivers/gpu/drm/sun4i/sun4i_layer.c | 6 ++++++
2 files changed, 26 insertions(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index afb7ddf660ef..b184a476a480 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
*mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
break;
+ case DRM_FORMAT_ARGB4444:
+ *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
+ break;
+
+ case DRM_FORMAT_ARGB1555:
+ *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
+ break;
+
+ case DRM_FORMAT_RGBA5551:
+ *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
+ break;
+
+ case DRM_FORMAT_RGBA4444:
+ *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
+ break;
+
case DRM_FORMAT_XRGB8888:
*mode = SUN4I_BACKEND_LAY_FBFMT_XRGB8888;
break;
@@ -104,6 +120,10 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
*mode = SUN4I_BACKEND_LAY_FBFMT_RGB888;
break;
+ case DRM_FORMAT_RGB565:
+ *mode = SUN4I_BACKEND_LAY_FBFMT_RGB565;
+ break;
+
default:
return -EINVAL;
}
diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index f0035bf5efea..5d53c977bca5 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -73,12 +73,18 @@ static const struct drm_plane_funcs sun4i_backend_layer_funcs = {
static const uint32_t sun4i_backend_layer_formats_primary[] = {
DRM_FORMAT_ARGB8888,
DRM_FORMAT_RGB888,
+ DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888,
};
static const uint32_t sun4i_backend_layer_formats_overlay[] = {
DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_ARGB4444,
+ DRM_FORMAT_ARGB1555,
+ DRM_FORMAT_RGBA5551,
+ DRM_FORMAT_RGBA4444,
DRM_FORMAT_RGB888,
+ DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888,
};
--
2.9.3
^ permalink raw reply related
* [STLinux Kernel] [PATCH 01/19] phy: phy-miphy365x: Remove miphy365 driver and dt binding documentation.
From: Patrice Chotard @ 2016-10-18 8:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <12506413-515f-1a33-a642-ede60287ca3b@st.com>
On 10/18/2016 09:47 AM, Patrice Chotard wrote:
> Hi
>
> On 09/23/2016 05:06 PM, Rob Herring wrote:
>> On Wed, Sep 14, 2016 at 02:27:39PM +0100, Peter Griffin wrote:
>>> This phy is only used on STiH415/6 based silicon, and support for
>>> these SoC's is being removed from the kernel.
>>>
>>> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
>>> Cc: <kishon@ti.com>
>>> ---
>>> .../devicetree/bindings/phy/phy-miphy365x.txt | 77 ---
>>
>> Acked-by: Rob Herring <robh@kernel.org>
>
> Applied on sti-dt-for-4.10 branch
Sorry, i did a mistake, these patch should go in linux-phy tree.
Kishon will you take care of it ?
Thanks
>
> Thanks
>
>>
>>> drivers/phy/Kconfig | 10 -
>>> drivers/phy/Makefile | 1 -
>>> drivers/phy/phy-miphy365x.c | 625 ---------------------
>>> 4 files changed, 713 deletions(-)
>>> delete mode 100644 Documentation/devicetree/bindings/phy/phy-miphy365x.txt
>>> delete mode 100644 drivers/phy/phy-miphy365x.c
>
>
> _______________________________________________
> Kernel mailing list
> Kernel at stlinux.com
> http://www.stlinux.com/mailman/listinfo/kernel
>
^ permalink raw reply
* [PATCH v2] arm64: kernel: numa: fix ACPI boot cpu numa node mapping
From: Hanjun Guo @ 2016-10-18 8:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161017145649.6189-1-lorenzo.pieralisi@arm.com>
On 2016/10/17 22:56, Lorenzo Pieralisi wrote:
> Commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must
> bind to node0") removed the numa cpu<->node mapping restriction whereby
> logical cpu 0 always corresponds to numa node 0; removing the
> restriction was correct, in that it does not really exist in practice
> but the commit only updated the early mapping of logical cpu 0 to its
> real numa node for the DT boot path, missing the ACPI one, leading to
> boot failures on ACPI systems owing to missing cpu<->node map for
> logical cpu 0.
>
> Fix the issue by updating the ACPI boot path with code that carries out
> the early cpu<->node mapping also for the boot cpu (ie cpu 0), mirroring
> what is currently done in the DT boot path.
>
> Fixes: 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0")
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Laszlo Ersek <lersek@redhat.com>
> Reported-by: Laszlo Ersek <lersek@redhat.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Hanjun Guo <hanjun.guo@linaro.org>
Thanks for the quick response and fix,
Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
By the way, I got another boot failure [1] when we have multi
NUMA nodes system with some memory-less nodes (only one node
have memory), we are looking into it now, this patch needs
to be merged first.
Thanks
Hanjun
[1]: boot failure log:
[ 0.000000] NUMA: Adding memblock [0x0 - 0x3fffffff] on node 0
[ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0x3fffffff]
[ 0.000000] NUMA: Adding memblock [0x1400000000 - 0x17ffffffff] on node 1
[ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x1400000000-0x17ffffffff]
[ 0.000000] NUMA: Adding memblock [0x1000000000 - 0x13ffffffff] on node 0
[ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x1000000000-0x13ffffffff]
[ 0.000000] NUMA: Initmem setup node 0 [mem 0x00000000-0x13fbffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x13fbffe500-0x13fbffffff]
[ 0.000000] NUMA: Initmem setup node 1 [mem 0x1400000000-0x17fbffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x17fbfec500-0x17fbfedfff]
[ 0.000000] NUMA: Initmem setup node 2 [mem
0x00000000-0xffffffffffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x17fbfeaa00-0x17fbfec4ff]
[ 0.000000] NUMA: NODE_DATA(2) on node 1
[ 0.000000] NUMA: Initmem setup node 3 [mem
0x00000000-0xffffffffffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x17fbfe8f00-0x17fbfea9ff]
[ 0.000000] NUMA: NODE_DATA(3) on node 1
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x00000017fbffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000024fff]
[ 0.000000] node 0: [mem 0x0000000000026000-0x00000000319dffff]
[ 0.000000] node 0: [mem 0x00000000319e0000-0x0000000031a4ffff]
[ 0.000000] node 0: [mem 0x0000000031a50000-0x0000000031b2ffff]
[ 0.000000] node 0: [mem 0x0000000031b30000-0x0000000031b3ffff]
[ 0.000000] node 0: [mem 0x0000000031b40000-0x0000000039baffff]
[ 0.000000] node 0: [mem 0x0000000039bb0000-0x000000003a143fff]
[ 0.000000] node 0: [mem 0x000000003a144000-0x000000003f12ffff]
[ 0.000000] node 0: [mem 0x000000003f130000-0x000000003f15ffff]
[ 0.000000] node 0: [mem 0x000000003f160000-0x000000003fbfffff]
[ 0.000000] node 0: [mem 0x0000001040000000-0x00000013fbffffff]
[ 0.000000] node 1: [mem 0x0000001400000000-0x00000017fbffffff]
[ 0.000000] Initmem setup node 0 [mem
0x0000000000000000-0x00000013fbffffff]
[ 0.000000] Initmem setup node 1 [mem
0x0000001400000000-0x00000017fbffffff]
[ 0.000000] Could not find start_pfn for node 2
[ 0.000000] Initmem setup node 2 [mem
0x0000000000000000-0x0000000000000000]
[ 0.000000] Could not find start_pfn for node 3
[ 0.000000] Initmem setup node 3 [mem
0x0000000000000000-0x0000000000000000]
[ 0.000000] psci: probing for conduit method from ACPI.
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] kernel BUG at mm/percpu.c:1916!
[ 0.000000] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted
4.9.0-rc1-00083-g3dd62e5 #680
[ 0.000000] Hardware name: Hisilicon Hi1616 Evaluation Board (DT)
[ 0.000000] task: ffff000008d5e980 task.stack: ffff000008d50000
[ 0.000000] PC is at pcpu_embed_first_chunk+0x464/0x754
[ 0.000000] LR is at pcpu_embed_first_chunk+0x3f8/0x754
[ 0.000000] pc : [<ffff000008c65af0>] lr : [<ffff000008c65a84>]
pstate: 200000c5
[ 0.000000] sp : ffff000008d53e90
[ 0.000000] x29: ffff000008d53e90 [ 0.000000] x28: 0000000000000000
[ 0.000000]
[ 0.000000] x27: ffff000008d55e50 [ 0.000000] x26: 0000000000000042
[ 0.000000]
[ 0.000000] x25: ffff000008d55d28 [ 0.000000] x24: 0000000000000046
[ 0.000000]
[ 0.000000] x23: 0000000000000040 [ 0.000000] x22: ffff8017fbfcff00
[ 0.000000]
[ 0.000000] x21: ffff000008ca6e20 [ 0.000000] x20: ffff8017fbfd0518
[ 0.000000]
[ 0.000000] x19: 0000000000000042 [ 0.000000] x18: ffff000008e3fb60
[ 0.000000]
[ 0.000000] x17: 000000000000001b [ 0.000000] x16: 000000000000000b
[ 0.000000]
[ 0.000000] x15: 0000001400000000 [ 0.000000] x14: 0000000000000004
[ 0.000000]
[ 0.000000] x13: 0000000000000000 [ 0.000000] x12: 0000000000000069
[ 0.000000]
[ 0.000000] x11: 00000017fbffff00 [ 0.000000] x10: 0000000000000004
[ 0.000000]
[ 0.000000] x9 : 0000000000000000 [ 0.000000] x8 : ffff8017fbfd0f00
[ 0.000000]
[ 0.000000] x7 : 0000000000000000 [ 0.000000] x6 : 0000000000000000
[ 0.000000]
[ 0.000000] x5 : 0000000000000000 [ 0.000000] x4 : 000000000000003f
[ 0.000000]
[ 0.000000] x3 : 0000000000000040 [ 0.000000] x2 : 0000000000000040
[ 0.000000]
[ 0.000000] x1 : 0000000000000001 [ 0.000000] x0 : ffff000008ca7328
[ 0.000000]
[ 0.000000]
[ 0.000000] Process swapper (pid: 0, stack limit = 0xffff000008d50020)
[ 0.000000] Stack: (0xffff000008d53e90 to 0xffff000008d54000)
[ 0.000000] 3e80: ffff000008d53f60
ffff000008c5616c
[ 0.000000] 3ea0: ffff000008ca5a08 ffff000008e2a000 ffff000008e2a000
ffff000008d55000
[ 0.000000] 3ec0: ffff000008ca5a08 ffff8017fbfffe80 0000000000000168
000000003c96a518
[ 0.000000] 3ee0: 000000003c971b98 0000000000c50018 ffff000008d53f60
ffff000008c56078
[ 0.000000] 3f00: ffff000008d1f000 ffff000008d14000 0000000000007480
0000000000002000
[ 0.000000] 3f20: ffff000008c560b0 0000000000001000 ffff000008d55e50
ffff000008d55d28
[ 0.000000] 3f40: ffff000008ca6000 0000000000000040 0000000000000001
0000000000000040
[ 0.000000] 3f60: ffff000008d53fa0 ffff000008c508d4 ffff000008ca5a08
ffff000008e2a000
[ 0.000000] 3f80: ffff000008e2a000 ffff000008d55000 ffff000008ca5a08
ffff000008c508d0
[ 0.000000] 3fa0: ffff000008d53ff0 ffff000008c501d8 000000003c94fa98
000000001e400000
[ 0.000000] 3fc0: 000000001e400000 000000025497ba19 0000000000000000
000000003f198a08
[ 0.000000] 3fe0: 0000000000000000 ffff000008ca5a08 0000000000000000
00000000008a325c
[ 0.000000] Call trace:
[ 0.000000] Exception stack(0xffff000008d53cc0 to 0xffff000008d53df0)
[ 0.000000] 3cc0: 0000000000000042 0001000000000000 ffff000008d53e90
ffff000008c65af0
[ 0.000000] 3ce0: ffff000008d53d30 ffff0000081aa024 0000000000000001
0000000000001000
[ 0.000000] 3d00: ffff000008d53d30 ffff0000081aa034 0000000000000001
0000000000001000
[ 0.000000] 3d20: 00000017fbfcff00 0000000000000004 ffff000008d53d90
ffff0000081aa2c8
[ 0.000000] 3d40: 00000017fbfcff00 0000000000001000 0000000000000000
0000000000000000
[ 0.000000] 3d60: ffff000008ca7328 0000000000000001 0000000000000040
0000000000000040
[ 0.000000] 3d80: 000000000000003f 0000000000000000 0000000000000000
0000000000000000
[ 0.000000] 3da0: ffff8017fbfd0f00 0000000000000000 0000000000000004
00000017fbffff00
[ 0.000000] 3dc0: 0000000000000069 0000000000000000 0000000000000004
0000001400000000
[ 0.000000] 3de0: 000000000000000b 000000000000001b
[ 0.000000] [<ffff000008c65af0>] pcpu_embed_first_chunk+0x464/0x754
[ 0.000000] [<ffff000008c5616c>] setup_per_cpu_areas+0x3c/0xcc
[ 0.000000] [<ffff000008c508d4>] start_kernel+0x10c/0x398
[ 0.000000] [<ffff000008c501d8>] __primary_switched+0x5c/0x64
[ 0.000000] Code: 0b000318 17ffffd8 6b17031f 54000080 (d4210000)
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill
the idle task!
^ permalink raw reply
* Re: 4.7.6->4.8.1 Possible regression
From: Alexander Shiyan @ 2016-10-18 8:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161017181051.GI1041@n2100.armlinux.org.uk>
>???????????, 17 ??????? 2016, 21:10 +03:00 ?? Russell King - ARM Linux <linux@armlinux.org.uk>:
>
>On Mon, Oct 17, 2016 at 07:47:38PM +0300, Alexander Shiyan wrote:
>> Hello.
>>
>> After a kernel update from 4.7.6 to 4.8.1, the bug appear once kernel run "init".
>
>Please try this patch, thanks:
>
>diff --git a/arch/arm/mm/abort-lv4t.S b/arch/arm/mm/abort-lv4t.S
>index 6d8e8e3365d1..e81d09f1887d 100644
>--- a/arch/arm/mm/abort-lv4t.S
>+++ b/arch/arm/mm/abort-lv4t.S
...
Yes, this helps, thanks!
Tested-by: Alexander Shiyan <shc_work@mail.ru>
---
^ permalink raw reply
* [PATCH 5/5] drm/sun4i: Add support for the overscan profiles
From: Maxime Ripard @ 2016-10-18 8:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.bb9be34c7fd7767e31823f78a15ae1c127293c34.1476779323.git-series.maxime.ripard@free-electrons.com>
Create overscan profiles reducing the displayed zone.
For each TV standard (PAL and NTSC so far), we create 4 more reduced modes
by steps of 5% that the user will be able to select.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/sun4i/sun4i_tv.c | 60 +++++++++++++++++++--------------
1 file changed, 36 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index f99886462cb8..9ee03ba086b6 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -301,27 +301,33 @@ static const struct tv_mode *sun4i_tv_find_tv_by_mode(const struct drm_display_m
DRM_DEBUG_DRIVER("Comparing mode %s vs %s",
mode->name, tv_mode->name);
- if (!strcmp(mode->name, tv_mode->name))
+ if (!strncmp(mode->name, tv_mode->name, strlen(tv_mode->name)))
return tv_mode;
}
/* Then by number of lines */
for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
const struct tv_mode *tv_mode = &tv_modes[i];
+ int j;
- DRM_DEBUG_DRIVER("Comparing mode %s vs %s (X: %d vs %d)",
- mode->name, tv_mode->name,
- mode->vdisplay, tv_mode->vdisplay);
+ for (j = 0; j < 20; j += 5) {
+ u32 vdisplay = tv_mode->vdisplay * (100 - j) / 100;
- if (mode->vdisplay == tv_mode->vdisplay)
- return tv_mode;
+ DRM_DEBUG_DRIVER("Comparing mode with %s (%d) (X: %d vs %d)",
+ tv_mode->name, j,
+ vdisplay, tv_mode->vdisplay);
+
+ if (vdisplay == tv_mode->vdisplay)
+ return tv_mode;
+ }
}
return NULL;
}
static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode,
- struct drm_display_mode *mode)
+ struct drm_display_mode *mode,
+ int overscan)
{
DRM_DEBUG_DRIVER("Creating mode %s\n", mode->name);
@@ -329,12 +335,12 @@ static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode,
mode->clock = 13500;
mode->flags = DRM_MODE_FLAG_INTERLACE;
- mode->hdisplay = tv_mode->hdisplay;
+ mode->hdisplay = tv_mode->hdisplay * (100 - overscan) / 100;
mode->hsync_start = mode->hdisplay + tv_mode->hfront_porch;
mode->hsync_end = mode->hsync_start + tv_mode->hsync_len;
mode->htotal = mode->hsync_end + tv_mode->hback_porch;
- mode->vdisplay = tv_mode->vdisplay;
+ mode->vdisplay = tv_mode->vdisplay * (100 - overscan) / 100;
mode->vsync_start = mode->vdisplay + tv_mode->vfront_porch;
mode->vsync_end = mode->vsync_start + tv_mode->vsync_len;
mode->vtotal = mode->vsync_end + tv_mode->vback_porch;
@@ -352,10 +358,10 @@ static int sun4i_tv_atomic_check(struct drm_encoder *encoder,
return -EINVAL;
state->display_x_size = tv_mode->hdisplay;
- state->plane_x_offset = 0;
+ state->plane_x_offset = (tv_mode->hdisplay - mode->hdisplay) / 2;
state->display_y_size = tv_mode->vdisplay;
- state->plane_y_offset = 0;
+ state->plane_y_offset = (tv_mode->vdisplay - mode->vdisplay) / 2;
return 0;
}
@@ -404,7 +410,7 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
struct drm_display_mode tv_drm_mode = { 0 };
strcpy(tv_drm_mode.name, "TV");
- sun4i_tv_mode_to_drm_mode(tv_mode, &tv_drm_mode);
+ sun4i_tv_mode_to_drm_mode(tv_mode, &tv_drm_mode, 0);
drm_mode_set_crtcinfo(&tv_drm_mode, CRTC_INTERLACE_HALVE_V);
sun4i_tcon1_mode_set(tcon, &tv_drm_mode);
@@ -526,22 +532,28 @@ static int sun4i_tv_comp_get_modes(struct drm_connector *connector)
int i;
for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
- struct drm_display_mode *mode;
const struct tv_mode *tv_mode = &tv_modes[i];
-
- mode = drm_mode_create(connector->dev);
- if (!mode) {
- DRM_ERROR("Failed to create a new display mode\n");
- return 0;
+ int j;
+
+ for (j = 0; j < 20; j += 5) {
+ struct drm_display_mode *mode = drm_mode_create(connector->dev);
+ if (!mode) {
+ DRM_ERROR("Failed to create a new display mode\n");
+ return 0;
+ }
+
+ if (j)
+ sprintf(mode->name, "%s%d", tv_mode->name,
+ j);
+ else
+ strcpy(mode->name, tv_mode->name);
+
+ sun4i_tv_mode_to_drm_mode(tv_mode, mode, j);
+ drm_mode_probed_add(connector, mode);
}
-
- strcpy(mode->name, tv_mode->name);
-
- sun4i_tv_mode_to_drm_mode(tv_mode, mode);
- drm_mode_probed_add(connector, mode);
}
- return i;
+ return i * 4;
}
static int sun4i_tv_comp_mode_valid(struct drm_connector *connector,
--
git-series 0.8.10
^ permalink raw reply related
* [PATCH 4/5] drm/sun4i: Compute TCON1 mode from tv mode
From: Maxime Ripard @ 2016-10-18 8:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.bb9be34c7fd7767e31823f78a15ae1c127293c34.1476779323.git-series.maxime.ripard@free-electrons.com>
Since the mode passed in mode_set is probably going to be a scaled down
version of the TV mode, we cannot just use it.
Instead, try to retrieve the actual mode we want to set, and generate a drm
mode from that.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/sun4i/sun4i_tv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 6f8077013be3..f99886462cb8 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -401,8 +401,13 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
struct sun4i_drv *drv = tv->drv;
struct sun4i_tcon *tcon = drv->tcon;
const struct tv_mode *tv_mode = sun4i_tv_find_tv_by_mode(mode);
+ struct drm_display_mode tv_drm_mode = { 0 };
- sun4i_tcon1_mode_set(tcon, mode);
+ strcpy(tv_drm_mode.name, "TV");
+ sun4i_tv_mode_to_drm_mode(tv_mode, &tv_drm_mode);
+ drm_mode_set_crtcinfo(&tv_drm_mode, CRTC_INTERLACE_HALVE_V);
+
+ sun4i_tcon1_mode_set(tcon, &tv_drm_mode);
/* Enable and map the DAC to the output */
regmap_update_bits(tv->regs, SUN4I_TVE_EN_REG,
--
git-series 0.8.10
^ permalink raw reply related
* [PATCH 3/5] drm/sun4i: Add custom crtc state
From: Maxime Ripard @ 2016-10-18 8:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.bb9be34c7fd7767e31823f78a15ae1c127293c34.1476779323.git-series.maxime.ripard@free-electrons.com>
We'll need a custom CRTC state to deal with the overscan setup.
We'll store in it the actual display size that can be used by the
applications, and the size to use on the plane.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/sun4i/sun4i_backend.c | 18 +++++++++-----
drivers/gpu/drm/sun4i/sun4i_crtc.c | 37 ++++++++++++++++++++++++++--
drivers/gpu/drm/sun4i/sun4i_crtc.h | 16 ++++++++++++-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 10 ++++++++-
drivers/gpu/drm/sun4i/sun4i_tv.c | 14 +++++++++++-
5 files changed, 87 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index 32c0584e3c35..9b36b7104c15 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -22,6 +22,7 @@
#include <linux/reset.h>
#include "sun4i_backend.h"
+#include "sun4i_crtc.h"
#include "sun4i_drv.h"
static u32 sunxi_rgb2yuv_coef[12] = {
@@ -115,15 +116,19 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
{
struct drm_plane_state *state = plane->state;
struct drm_framebuffer *fb = state->fb;
+ struct sun4i_crtc_state *s_state = drm_crtc_state_to_sun4i_crtc_state(state->crtc->state);
+ u16 x, y;
+
DRM_DEBUG_DRIVER("Updating layer %d\n", layer);
if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
DRM_DEBUG_DRIVER("Primary layer, updating global size W: %u H: %u\n",
- state->crtc_w, state->crtc_h);
+ s_state->display_x_size,
+ s_state->display_y_size);
regmap_write(backend->regs, SUN4I_BACKEND_DISSIZE_REG,
- SUN4I_BACKEND_DISSIZE(state->crtc_w,
- state->crtc_h));
+ SUN4I_BACKEND_DISSIZE(s_state->display_x_size,
+ s_state->display_y_size));
}
/* Set the line width */
@@ -139,11 +144,12 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
state->crtc_h));
/* Set base coordinates */
+ x = s_state->plane_x_offset + state->crtc_x;
+ y = s_state->plane_y_offset + state->crtc_y;
DRM_DEBUG_DRIVER("Layer coordinates X: %d Y: %d\n",
- state->crtc_x, state->crtc_y);
+ x, y);
regmap_write(backend->regs, SUN4I_BACKEND_LAYCOOR_REG(layer),
- SUN4I_BACKEND_LAYCOOR(state->crtc_x,
- state->crtc_y));
+ SUN4I_BACKEND_LAYCOOR(x, y));
return 0;
}
diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c
index 4a192210574f..772e0ecd72db 100644
--- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
@@ -104,9 +104,42 @@ static const struct drm_crtc_helper_funcs sun4i_crtc_helper_funcs = {
.enable = sun4i_crtc_enable,
};
+struct drm_crtc_state *sun4i_crtc_duplicate_state(struct drm_crtc *crtc)
+{
+ struct sun4i_crtc_state *state = drm_crtc_state_to_sun4i_crtc_state(crtc->state);
+ struct sun4i_crtc_state *copy;
+
+ copy = kmalloc(sizeof(*copy), GFP_KERNEL);
+ if (!copy)
+ return NULL;
+
+ DRM_DEBUG_DRIVER("Copying state %p to %p", state, copy);
+
+ __drm_atomic_helper_crtc_duplicate_state(crtc, ©->base);
+
+ copy->display_x_size = state->display_x_size;
+ copy->display_y_size = state->display_y_size;
+
+ copy->plane_x_offset = state->plane_x_offset;
+ copy->plane_y_offset = state->plane_y_offset;
+
+ return ©->base;
+}
+
+void sun4i_crtc_destroy_state(struct drm_crtc *crtc,
+ struct drm_crtc_state *c_state)
+{
+ struct sun4i_crtc_state *s_state = drm_crtc_state_to_sun4i_crtc_state(c_state);
+
+ DRM_DEBUG_DRIVER("Freeing state %p", s_state);
+
+ __drm_atomic_helper_crtc_destroy_state(c_state);
+ kfree(s_state);
+}
+
static const struct drm_crtc_funcs sun4i_crtc_funcs = {
- .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
- .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
+ .atomic_destroy_state = sun4i_crtc_destroy_state,
+ .atomic_duplicate_state = sun4i_crtc_duplicate_state,
.destroy = drm_crtc_cleanup,
.page_flip = drm_atomic_helper_page_flip,
.reset = drm_atomic_helper_crtc_reset,
diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.h b/drivers/gpu/drm/sun4i/sun4i_crtc.h
index dec8ce4d9b25..625c9ac41434 100644
--- a/drivers/gpu/drm/sun4i/sun4i_crtc.h
+++ b/drivers/gpu/drm/sun4i/sun4i_crtc.h
@@ -20,11 +20,27 @@ struct sun4i_crtc {
struct sun4i_drv *drv;
};
+struct sun4i_crtc_state {
+ struct drm_crtc_state base;
+
+ u32 display_x_size;
+ u32 display_y_size;
+
+ u32 plane_x_offset;
+ u32 plane_y_offset;
+};
+
static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
{
return container_of(crtc, struct sun4i_crtc, crtc);
}
+static inline struct sun4i_crtc_state *
+drm_crtc_state_to_sun4i_crtc_state(struct drm_crtc_state *state)
+{
+ return container_of(state, struct sun4i_crtc_state, base);
+}
+
struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm);
#endif /* _SUN4I_CRTC_H_ */
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index c3ff10f559cc..b1f792ad84c2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -17,6 +17,7 @@
#include <drm/drm_crtc_helper.h>
#include <drm/drm_panel.h>
+#include "sun4i_crtc.h"
#include "sun4i_drv.h"
#include "sun4i_tcon.h"
#include "sun4i_rgb.h"
@@ -141,6 +142,15 @@ static int sun4i_rgb_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{
+ struct drm_display_mode *mode = &crtc_state->mode;
+ struct sun4i_crtc_state *state = drm_crtc_state_to_sun4i_crtc_state(crtc_state);
+
+ state->display_x_size = mode->hdisplay;
+ state->display_y_size = mode->vdisplay;
+
+ state->plane_x_offset = 0;
+ state->plane_y_offset = 0;
+
return 0;
}
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 1dd3d9eabf2e..6f8077013be3 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -22,6 +22,7 @@
#include <drm/drm_panel.h>
#include "sun4i_backend.h"
+#include "sun4i_crtc.h"
#include "sun4i_drv.h"
#include "sun4i_tcon.h"
@@ -343,6 +344,19 @@ static int sun4i_tv_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{
+ struct drm_display_mode *mode = &crtc_state->mode;
+ const struct tv_mode *tv_mode = sun4i_tv_find_tv_by_mode(mode);
+ struct sun4i_crtc_state *state = drm_crtc_state_to_sun4i_crtc_state(crtc_state);
+
+ if (!tv_mode)
+ return -EINVAL;
+
+ state->display_x_size = tv_mode->hdisplay;
+ state->plane_x_offset = 0;
+
+ state->display_y_size = tv_mode->vdisplay;
+ state->plane_y_offset = 0;
+
return 0;
}
--
git-series 0.8.10
^ permalink raw reply related
* [PATCH 2/5] drm/modes: Support modes names on the command line
From: Maxime Ripard @ 2016-10-18 8:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.bb9be34c7fd7767e31823f78a15ae1c127293c34.1476779323.git-series.maxime.ripard@free-electrons.com>
The drm subsystem also uses the video= kernel parameter, and in the
documentation refers to the fbdev documentation for that parameter.
However, that documentation also says that instead of giving the mode using
its resolution we can also give a name. However, DRM doesn't handle that
case at the moment. Even though in most case it shouldn't make any
difference, it might be useful for analog modes, where different standards
might have the same resolution, but still have a few different parameters
that are not encoded in the modes (NTSC vs NTSC-J vs PAL-M for example).
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/drm_connector.c | 3 +-
drivers/gpu/drm/drm_fb_helper.c | 4 +++-
drivers/gpu/drm/drm_modes.c | 49 +++++++++++++++++++++++-----------
include/drm/drm_connector.h | 1 +-
4 files changed, 41 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 2db7fb510b6c..27a8a511257c 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -147,8 +147,9 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
connector->force = mode->force;
}
- DRM_DEBUG_KMS("cmdline mode for connector %s %dx%d@%dHz%s%s%s\n",
+ DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
connector->name,
+ mode->name ? mode->name : "",
mode->xres, mode->yres,
mode->refresh_specified ? mode->refresh : 60,
mode->rb ? " reduced blanking" : "",
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 03414bde1f15..20a68305fb45 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1748,6 +1748,10 @@ struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *f
prefer_non_interlace = !cmdline_mode->interlace;
again:
list_for_each_entry(mode, &fb_helper_conn->connector->modes, head) {
+ /* Check (optional) mode name first */
+ if (!strcmp(mode->name, cmdline_mode->name))
+ return mode;
+
/* check width/height */
if (mode->hdisplay != cmdline_mode->xres ||
mode->vdisplay != cmdline_mode->yres)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 7d5bdca276f2..fdbf541a5978 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1413,7 +1413,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
struct drm_cmdline_mode *mode)
{
const char *name;
- bool parse_extras = false;
+ bool named_mode = false, parse_extras = false;
unsigned int bpp_off = 0, refresh_off = 0;
unsigned int mode_end = 0;
char *bpp_ptr = NULL, *refresh_ptr = NULL, *extra_ptr = NULL;
@@ -1432,8 +1432,14 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
name = mode_option;
+ /*
+ * If the first character is not a digit, then it means that
+ * we have a named mode.
+ */
if (!isdigit(name[0]))
- return false;
+ named_mode = true;
+ else
+ named_mode = false;
/* Try to locate the bpp and refresh specifiers, if any */
bpp_ptr = strchr(name, '-');
@@ -1460,12 +1466,16 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
parse_extras = true;
}
- ret = drm_mode_parse_cmdline_res_mode(name, mode_end,
- parse_extras,
- connector,
- mode);
- if (ret)
- return false;
+ if (named_mode) {
+ strncpy(mode->name, name, mode_end);
+ } else {
+ ret = drm_mode_parse_cmdline_res_mode(name, mode_end,
+ parse_extras,
+ connector,
+ mode);
+ if (ret)
+ return false;
+ }
mode->specified = true;
if (bpp_ptr) {
@@ -1493,14 +1503,23 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
extra_ptr = refresh_end_ptr;
if (extra_ptr) {
- int remaining = strlen(name) - (extra_ptr - name);
+ if (!named_mode) {
+ int len = strlen(name) - (extra_ptr - name);
- /*
- * We still have characters to process, while
- * we shouldn't have any
- */
- if (remaining > 0)
- return false;
+ ret = drm_mode_parse_cmdline_extra(extra_ptr, len,
+ connector, mode);
+ if (ret)
+ return false;
+ } else {
+ int remaining = strlen(name) - (extra_ptr - name);
+
+ /*
+ * We still have characters to process, while
+ * we shouldn't have any
+ */
+ if (remaining > 0)
+ return false;
+ }
}
return true;
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index ac9d7d8e0e43..dce3d4b2fd33 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -485,6 +485,7 @@ struct drm_connector_funcs {
/* mode specified on the command line */
struct drm_cmdline_mode {
+ char name[DRM_DISPLAY_MODE_LEN];
bool specified;
bool refresh_specified;
bool bpp_specified;
--
git-series 0.8.10
^ permalink raw reply related
* [PATCH 1/5] drm/modes: Rewrite the command line parser
From: Maxime Ripard @ 2016-10-18 8:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.bb9be34c7fd7767e31823f78a15ae1c127293c34.1476779323.git-series.maxime.ripard@free-electrons.com>
Rewrite the command line parser in order to get away from the state machine
parsing the video mode lines.
Hopefully, this will allow to extend it more easily to support named modes
and / or properties set directly on the command line.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpu/drm/drm_modes.c | 305 +++++++++++++++++++++++--------------
1 file changed, 190 insertions(+), 115 deletions(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 53f07ac7c174..7d5bdca276f2 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -30,6 +30,7 @@
* authorization from the copyright holder(s) and author(s).
*/
+#include <linux/ctype.h>
#include <linux/list.h>
#include <linux/list_sort.h>
#include <linux/export.h>
@@ -1261,6 +1262,131 @@ void drm_mode_connector_list_update(struct drm_connector *connector)
}
EXPORT_SYMBOL(drm_mode_connector_list_update);
+static int drm_mode_parse_cmdline_bpp(const char *str, char **end_ptr,
+ struct drm_cmdline_mode *mode)
+{
+ if (str[0] != '-')
+ return -EINVAL;
+
+ mode->bpp = simple_strtol(str + 1, end_ptr, 10);
+ mode->bpp_specified = true;
+
+ return 0;
+}
+
+static int drm_mode_parse_cmdline_refresh(const char *str, char **end_ptr,
+ struct drm_cmdline_mode *mode)
+{
+ if (str[0] != '@')
+ return -EINVAL;
+
+ mode->refresh = simple_strtol(str + 1, end_ptr, 10);
+ mode->refresh_specified = true;
+
+ return 0;
+}
+
+static int drm_mode_parse_cmdline_extra(const char *str, int length,
+ struct drm_connector *connector,
+ struct drm_cmdline_mode *mode)
+{
+ int i;
+
+ for (i = 0; i < length; i++) {
+ switch (str[i]) {
+ case 'i':
+ mode->interlace = true;
+ break;
+ case 'm':
+ mode->margins = true;
+ break;
+ case 'D':
+ if (mode->force != DRM_FORCE_UNSPECIFIED)
+ return -EINVAL;
+
+ if ((connector->connector_type != DRM_MODE_CONNECTOR_DVII) &&
+ (connector->connector_type != DRM_MODE_CONNECTOR_HDMIB))
+ mode->force = DRM_FORCE_ON;
+ else
+ mode->force = DRM_FORCE_ON_DIGITAL;
+ break;
+ case 'd':
+ if (mode->force != DRM_FORCE_UNSPECIFIED)
+ return -EINVAL;
+
+ mode->force = DRM_FORCE_OFF;
+ break;
+ case 'e':
+ if (mode->force != DRM_FORCE_UNSPECIFIED)
+ return -EINVAL;
+
+ mode->force = DRM_FORCE_ON;
+ break;
+ default:
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
+static int drm_mode_parse_cmdline_res_mode(const char *str, unsigned int length,
+ bool extras,
+ struct drm_connector *connector,
+ struct drm_cmdline_mode *mode)
+{
+ bool rb = false, cvt = false;
+ int xres = 0, yres = 0;
+ int remaining, i;
+ char *end_ptr;
+
+ xres = simple_strtol(str, &end_ptr, 10);
+
+ if (end_ptr[0] != 'x')
+ return -EINVAL;
+ end_ptr++;
+
+ yres = simple_strtol(end_ptr, &end_ptr, 10);
+
+ remaining = length - (end_ptr - str);
+ if (remaining < 0)
+ return -EINVAL;
+
+ for (i = 0; i < remaining; i++) {
+ switch (end_ptr[i]) {
+ case 'M':
+ cvt = true;
+ break;
+ case 'R':
+ rb = true;
+ break;
+ default:
+ /*
+ * Try to pass that to our extras parsing
+ * function to handle the case where the
+ * extras are directly after the resolution
+ */
+ if (extras) {
+ int ret = drm_mode_parse_cmdline_extra(end_ptr + i,
+ 1,
+ connector,
+ mode);
+ if (ret)
+ return ret;
+ } else {
+ return -EINVAL;
+ }
+ }
+ }
+
+ mode->xres = xres;
+ mode->yres = yres;
+ mode->cvt = cvt;
+ mode->rb = rb;
+
+ return 0;
+}
+
/**
* drm_mode_parse_command_line_for_connector - parse command line modeline for connector
* @mode_option: optional per connector mode option
@@ -1287,13 +1413,12 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
struct drm_cmdline_mode *mode)
{
const char *name;
- unsigned int namelen;
- bool res_specified = false, bpp_specified = false, refresh_specified = false;
- unsigned int xres = 0, yres = 0, bpp = 32, refresh = 0;
- bool yres_specified = false, cvt = false, rb = false;
- bool interlace = false, margins = false, was_digit = false;
- int i;
- enum drm_connector_force force = DRM_FORCE_UNSPECIFIED;
+ bool parse_extras = false;
+ unsigned int bpp_off = 0, refresh_off = 0;
+ unsigned int mode_end = 0;
+ char *bpp_ptr = NULL, *refresh_ptr = NULL, *extra_ptr = NULL;
+ char *bpp_end_ptr = NULL, *refresh_end_ptr = NULL;
+ int ret;
#ifdef CONFIG_FB
if (!mode_option)
@@ -1306,127 +1431,77 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
}
name = mode_option;
- namelen = strlen(name);
- for (i = namelen-1; i >= 0; i--) {
- switch (name[i]) {
- case '@':
- if (!refresh_specified && !bpp_specified &&
- !yres_specified && !cvt && !rb && was_digit) {
- refresh = simple_strtol(&name[i+1], NULL, 10);
- refresh_specified = true;
- was_digit = false;
- } else
- goto done;
- break;
- case '-':
- if (!bpp_specified && !yres_specified && !cvt &&
- !rb && was_digit) {
- bpp = simple_strtol(&name[i+1], NULL, 10);
- bpp_specified = true;
- was_digit = false;
- } else
- goto done;
- break;
- case 'x':
- if (!yres_specified && was_digit) {
- yres = simple_strtol(&name[i+1], NULL, 10);
- yres_specified = true;
- was_digit = false;
- } else
- goto done;
- break;
- case '0' ... '9':
- was_digit = true;
- break;
- case 'M':
- if (yres_specified || cvt || was_digit)
- goto done;
- cvt = true;
- break;
- case 'R':
- if (yres_specified || cvt || rb || was_digit)
- goto done;
- rb = true;
- break;
- case 'm':
- if (cvt || yres_specified || was_digit)
- goto done;
- margins = true;
- break;
- case 'i':
- if (cvt || yres_specified || was_digit)
- goto done;
- interlace = true;
- break;
- case 'e':
- if (yres_specified || bpp_specified || refresh_specified ||
- was_digit || (force != DRM_FORCE_UNSPECIFIED))
- goto done;
- force = DRM_FORCE_ON;
- break;
- case 'D':
- if (yres_specified || bpp_specified || refresh_specified ||
- was_digit || (force != DRM_FORCE_UNSPECIFIED))
- goto done;
+ if (!isdigit(name[0]))
+ return false;
- if ((connector->connector_type != DRM_MODE_CONNECTOR_DVII) &&
- (connector->connector_type != DRM_MODE_CONNECTOR_HDMIB))
- force = DRM_FORCE_ON;
- else
- force = DRM_FORCE_ON_DIGITAL;
- break;
- case 'd':
- if (yres_specified || bpp_specified || refresh_specified ||
- was_digit || (force != DRM_FORCE_UNSPECIFIED))
- goto done;
+ /* Try to locate the bpp and refresh specifiers, if any */
+ bpp_ptr = strchr(name, '-');
+ if (bpp_ptr) {
+ bpp_off = bpp_ptr - name;
+ mode->bpp_specified = true;
+ }
- force = DRM_FORCE_OFF;
- break;
- default:
- goto done;
- }
+ refresh_ptr = strchr(name, '@');
+ if (refresh_ptr) {
+ refresh_off = refresh_ptr - name;
+ mode->refresh_specified = true;
}
- if (i < 0 && yres_specified) {
- char *ch;
- xres = simple_strtol(name, &ch, 10);
- if ((ch != NULL) && (*ch == 'x'))
- res_specified = true;
- else
- i = ch - name;
- } else if (!yres_specified && was_digit) {
- /* catch mode that begins with digits but has no 'x' */
- i = 0;
+ /* Locate the end of the name / resolution, and parse it */
+ if (bpp_ptr && refresh_ptr) {
+ mode_end = min(bpp_off, refresh_off);
+ } else if (bpp_ptr) {
+ mode_end = bpp_off;
+ } else if (refresh_ptr) {
+ mode_end = refresh_off;
+ } else {
+ mode_end = strlen(name);
+ parse_extras = true;
}
-done:
- if (i >= 0) {
- pr_warn("[drm] parse error at position %i in video mode '%s'\n",
- i, name);
- mode->specified = false;
+
+ ret = drm_mode_parse_cmdline_res_mode(name, mode_end,
+ parse_extras,
+ connector,
+ mode);
+ if (ret)
return false;
- }
+ mode->specified = true;
- if (res_specified) {
- mode->specified = true;
- mode->xres = xres;
- mode->yres = yres;
+ if (bpp_ptr) {
+ ret = drm_mode_parse_cmdline_bpp(bpp_ptr, &bpp_end_ptr, mode);
+ if (ret)
+ return false;
}
- if (refresh_specified) {
- mode->refresh_specified = true;
- mode->refresh = refresh;
+ if (refresh_ptr) {
+ ret = drm_mode_parse_cmdline_refresh(refresh_ptr,
+ &refresh_end_ptr, mode);
+ if (ret)
+ return false;
}
- if (bpp_specified) {
- mode->bpp_specified = true;
- mode->bpp = bpp;
+ /*
+ * Locate the end of the bpp / refresh, and parse the extras
+ * if relevant
+ */
+ if (bpp_ptr && refresh_ptr)
+ extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
+ else if (bpp_ptr)
+ extra_ptr = bpp_end_ptr;
+ else if (refresh_ptr)
+ extra_ptr = refresh_end_ptr;
+
+ if (extra_ptr) {
+ int remaining = strlen(name) - (extra_ptr - name);
+
+ /*
+ * We still have characters to process, while
+ * we shouldn't have any
+ */
+ if (remaining > 0)
+ return false;
}
- mode->rb = rb;
- mode->cvt = cvt;
- mode->interlace = interlace;
- mode->margins = margins;
- mode->force = force;
return true;
}
--
git-series 0.8.10
^ permalink raw reply related
* [PATCH 0/5] drm/sun4i: Handle TV overscan
From: Maxime Ripard @ 2016-10-18 8:29 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
The Allwinner display engine doesn't have any kind of hardware help to deal
with TV overscan.
This means that if we use the only mode the hardware provides (either PAL
or NTSC, or something else), most of the screens will crop the borders of
the image, which is bad.
We can however use somekind of a hack, to instead reduce the mode exposed
to the userspace, and center it in the final image. We would expose
different overscan ratio to be able to deal with most of the screens, each
reducing more the displayable area.
The first patches are rework for the command line parser in order to be
able to use named modes. This is going to be helpful for us, since
different modes might have the same timings but only differ on a few
settings not exposed in the modes, but it might eventually be used for the
*VGA modes for example.
The last patches extend the current driver to deal with the changes used
to introduce the overscan.
Let me know what you think,
Maxime
Maxime Ripard (5):
drm/modes: Rewrite the command line parser
drm/modes: Support modes names on the command line
drm/sun4i: Add custom crtc state
drm/sun4i: Compute TCON1 mode from tv mode
drm/sun4i: Add support for the overscan profiles
drivers/gpu/drm/drm_connector.c | 3 +-
drivers/gpu/drm/drm_fb_helper.c | 4 +-
drivers/gpu/drm/drm_modes.c | 324 +++++++++++++++++----------
drivers/gpu/drm/sun4i/sun4i_backend.c | 18 +-
drivers/gpu/drm/sun4i/sun4i_crtc.c | 37 ++-
drivers/gpu/drm/sun4i/sun4i_crtc.h | 16 +-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 10 +-
drivers/gpu/drm/sun4i/sun4i_tv.c | 75 ++++--
include/drm/drm_connector.h | 1 +-
9 files changed, 342 insertions(+), 146 deletions(-)
--
git-series 0.8.10
^ permalink raw reply
* [PATCH v2] drm/mediatek: fix a typo
From: Bibby Hsieh @ 2016-10-18 8:23 UTC (permalink / raw)
To: linux-arm-kernel
If we want to set the hardware OD to relay mode,
we have to set OD_CFG register rather than
OD_RELAYMODE; otherwise, the system will access
the wrong address.
Fixes: 7216436420414144646f5d8343d061355fd23483 ("drm/mediatek: set mt8173 dithering function")
Cc: stable at vger.kernel.org # v4.9+
Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
---
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
index df33b3c..aa5f20f 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -123,7 +123,7 @@ static void mtk_od_config(struct mtk_ddp_comp *comp, unsigned int w,
unsigned int bpc)
{
writel(w << 16 | h, comp->regs + DISP_OD_SIZE);
- writel(OD_RELAYMODE, comp->regs + OD_RELAYMODE);
+ writel(OD_RELAYMODE, comp->regs + OD_CFG);
mtk_dither_set(comp, bpc, DISP_OD_CFG);
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH] ARM: dts: realview: Extend PBX family memory description
From: Linus Walleij @ 2016-10-18 8:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Robin Murphy <robin.murphy@arm.com>
All three platforms sharing the later RealView Platform Baseboard memory
map - PBX-A9, PB-A8 and PB11MPCore, provide 512MB of DDR SDRAM on the
baseboard, of which the boot alias at 0x0 maps the first 256MB. Expand
the size of the default memory node to reflect that, and describe the
full memory regions in each board's DTS, but leave those commented by
default to avoid breaking existing bootloaders.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ARM SoC folks: I forgot to send this patch for ARM SoC earlier.
As it is a small change I suggest you just apply it to the ARM
SoC tree as I do not foresee any other RealView work in the near
future. If you think it can go into v4.9 then put it in as a fix,
else just push it to the next merge window.
Robin: sorry for screwing up :(
---
arch/arm/boot/dts/arm-realview-pba8.dts | 8 ++++++++
arch/arm/boot/dts/arm-realview-pbx-a9.dts | 9 +++++++++
arch/arm/boot/dts/arm-realview-pbx.dtsi | 4 ++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/arm-realview-pba8.dts b/arch/arm/boot/dts/arm-realview-pba8.dts
index d3238c252b59..9f6c92b84f9f 100644
--- a/arch/arm/boot/dts/arm-realview-pba8.dts
+++ b/arch/arm/boot/dts/arm-realview-pba8.dts
@@ -40,6 +40,14 @@
};
};
+ /*
+ * Using the full 512MB of RAM will require bootloader
+ * changes to not load the kernel to the alias at 0x0.
+ */
+ memory {
+ /*reg = <0x70000000 0x20000000>; /* 512 MiB baseboard DDR */
+ };
+
pmu: pmu at 0 {
compatible = "arm,cortex-a8-pmu";
interrupt-parent = <&intc>;
diff --git a/arch/arm/boot/dts/arm-realview-pbx-a9.dts b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
index 90d00b407f85..9fef9188660a 100644
--- a/arch/arm/boot/dts/arm-realview-pbx-a9.dts
+++ b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
@@ -60,6 +60,15 @@
};
};
+ /*
+ * There is 1GB of RAM total, but using all of it will require
+ * bootloader changes to not load the kernel to the alias at 0x0.
+ */
+ memory {
+ /*reg = <0x20000000 0x20000000>, /* 512 MiB daughterboard DDR2 */
+ /* <0x70000000 0x20000000>; /* 512 MiB baseboard DDR */
+ };
+
L2: l2-cache {
compatible = "arm,pl310-cache";
reg = <0x1f002000 0x1000>;
diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
index aeb49c4bd773..8477f667d27c 100644
--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
+++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
@@ -38,8 +38,8 @@
};
memory {
- /* 128 MiB memory @ 0x0 */
- reg = <0x00000000 0x08000000>;
+ /* 256 MiB alias of baseboard DDR @ 0x0 */
+ reg = <0x00000000 0x10000000>;
};
/* The voltage to the MMC card is hardwired at 3.3V */
--
2.7.4
^ permalink raw reply related
* [PATCH V7 3/3] stm: Mark the functions of writing buffer with notrace
From: Chunyan Zhang @ 2016-10-18 8:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476778140-10319-1-git-send-email-zhang.chunyan@linaro.org>
If CONFIG_STM_SOURCE_FTRACE is selected, Function trace data can be writen
to sink via STM, all functions that related to writing data packets to
STM should be marked 'notrace' to avoid being traced by Ftrace, otherwise
the program would stall into an endless loop.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
---
drivers/hwtracing/coresight/coresight-stm.c | 2 +-
drivers/hwtracing/intel_th/sth.c | 11 +++++++----
drivers/hwtracing/stm/core.c | 7 ++++---
drivers/hwtracing/stm/dummy_stm.c | 2 +-
include/linux/stm.h | 4 ++--
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index 49e0f1b..b7543bd 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -406,7 +406,7 @@ static long stm_generic_set_options(struct stm_data *stm_data,
return 0;
}
-static ssize_t stm_generic_packet(struct stm_data *stm_data,
+static ssize_t notrace stm_generic_packet(struct stm_data *stm_data,
unsigned int master,
unsigned int channel,
unsigned int packet,
diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c
index e1aee61..b034446 100644
--- a/drivers/hwtracing/intel_th/sth.c
+++ b/drivers/hwtracing/intel_th/sth.c
@@ -67,10 +67,13 @@ static void sth_iowrite(void __iomem *dest, const unsigned char *payload,
}
}
-static ssize_t sth_stm_packet(struct stm_data *stm_data, unsigned int master,
- unsigned int channel, unsigned int packet,
- unsigned int flags, unsigned int size,
- const unsigned char *payload)
+static ssize_t notrace sth_stm_packet(struct stm_data *stm_data,
+ unsigned int master,
+ unsigned int channel,
+ unsigned int packet,
+ unsigned int flags,
+ unsigned int size,
+ const unsigned char *payload)
{
struct sth_device *sth = container_of(stm_data, struct sth_device, stm);
struct intel_th_channel __iomem *out =
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index 51f81d6..37d3bcb 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -425,7 +425,7 @@ static int stm_file_assign(struct stm_file *stmf, char *id, unsigned int width)
return ret;
}
-static ssize_t stm_write(struct stm_data *data, unsigned int master,
+static ssize_t notrace stm_write(struct stm_data *data, unsigned int master,
unsigned int channel, const char *buf, size_t count)
{
unsigned int flags = STP_PACKET_TIMESTAMPED;
@@ -1121,8 +1121,9 @@ void stm_source_unregister_device(struct stm_source_data *data)
}
EXPORT_SYMBOL_GPL(stm_source_unregister_device);
-int stm_source_write(struct stm_source_data *data, unsigned int chan,
- const char *buf, size_t count)
+int notrace stm_source_write(struct stm_source_data *data,
+ unsigned int chan,
+ const char *buf, size_t count)
{
struct stm_source_device *src = data->src;
struct stm_device *stm;
diff --git a/drivers/hwtracing/stm/dummy_stm.c b/drivers/hwtracing/stm/dummy_stm.c
index a86612d..c5f94ca 100644
--- a/drivers/hwtracing/stm/dummy_stm.c
+++ b/drivers/hwtracing/stm/dummy_stm.c
@@ -21,7 +21,7 @@
#include <linux/slab.h>
#include <linux/stm.h>
-static ssize_t
+static ssize_t notrace
dummy_stm_packet(struct stm_data *stm_data, unsigned int master,
unsigned int channel, unsigned int packet, unsigned int flags,
unsigned int size, const unsigned char *payload)
diff --git a/include/linux/stm.h b/include/linux/stm.h
index 8369d8a..210ff22 100644
--- a/include/linux/stm.h
+++ b/include/linux/stm.h
@@ -133,7 +133,7 @@ int stm_source_register_device(struct device *parent,
struct stm_source_data *data);
void stm_source_unregister_device(struct stm_source_data *data);
-int stm_source_write(struct stm_source_data *data, unsigned int chan,
- const char *buf, size_t count);
+int notrace stm_source_write(struct stm_source_data *data, unsigned int chan,
+ const char *buf, size_t count);
#endif /* _STM_H_ */
--
2.7.4
^ permalink raw reply related
* [PATCH V7 2/3] stm class: ftrace: Add ftrace-export-over-stm driver
From: Chunyan Zhang @ 2016-10-18 8:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476778140-10319-1-git-send-email-zhang.chunyan@linaro.org>
This patch adds a driver that models itself as an stm_source called
stm_ftrace. Once the stm device and stm_ftrace have been linked via
sysfs, the driver registers itself as a trace_export and everything
passed to the interface from Ftrace subsystem will end up in the STM
trace engine.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
drivers/hwtracing/stm/Kconfig | 11 ++++++
drivers/hwtracing/stm/Makefile | 2 +
drivers/hwtracing/stm/ftrace.c | 88 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 101 insertions(+)
create mode 100644 drivers/hwtracing/stm/ftrace.c
diff --git a/drivers/hwtracing/stm/Kconfig b/drivers/hwtracing/stm/Kconfig
index 847a39b..b34ea96 100644
--- a/drivers/hwtracing/stm/Kconfig
+++ b/drivers/hwtracing/stm/Kconfig
@@ -39,4 +39,15 @@ config STM_SOURCE_HEARTBEAT
If you want to send heartbeat messages over STM devices,
say Y.
+config STM_SOURCE_FTRACE
+ tristate "Copy the output from kernel Ftrace to STM engine"
+ depends on TRACING
+ help
+ This option can be used to copy the output from kernel Ftrace
+ to STM engine. Enabling this option will introduce a slight
+ timing effect.
+
+ If you want to send kernel Ftrace messages over STM devices,
+ say Y.
+
endif
diff --git a/drivers/hwtracing/stm/Makefile b/drivers/hwtracing/stm/Makefile
index a9ce3d4..3abd84c 100644
--- a/drivers/hwtracing/stm/Makefile
+++ b/drivers/hwtracing/stm/Makefile
@@ -6,6 +6,8 @@ obj-$(CONFIG_STM_DUMMY) += dummy_stm.o
obj-$(CONFIG_STM_SOURCE_CONSOLE) += stm_console.o
obj-$(CONFIG_STM_SOURCE_HEARTBEAT) += stm_heartbeat.o
+obj-$(CONFIG_STM_SOURCE_FTRACE) += stm_ftrace.o
stm_console-y := console.o
stm_heartbeat-y := heartbeat.o
+stm_ftrace-y := ftrace.o
diff --git a/drivers/hwtracing/stm/ftrace.c b/drivers/hwtracing/stm/ftrace.c
new file mode 100644
index 0000000..1a114c8f
--- /dev/null
+++ b/drivers/hwtracing/stm/ftrace.c
@@ -0,0 +1,88 @@
+/*
+ * Simple kernel driver to link kernel Ftrace and an STM device
+ * Copyright (c) 2016, Linaro Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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.
+ *
+ * STM Ftrace will be registered as a trace_export.
+ */
+
+#include <linux/module.h>
+#include <linux/stm.h>
+#include <linux/trace.h>
+
+#define STM_FTRACE_NR_CHANNELS 1
+#define STM_FTRACE_CHAN 0
+
+static int stm_ftrace_link(struct stm_source_data *data);
+static void stm_ftrace_unlink(struct stm_source_data *data);
+
+static struct stm_ftrace {
+ struct stm_source_data data;
+ struct trace_export ftrace;
+} stm_ftrace = {
+ .data = {
+ .name = "ftrace",
+ .nr_chans = STM_FTRACE_NR_CHANNELS,
+ .link = stm_ftrace_link,
+ .unlink = stm_ftrace_unlink,
+ },
+};
+
+/**
+ * stm_ftrace_write() - write data to STM via 'stm_ftrace' source
+ * @buf: buffer containing the data packet
+ * @len: length of the data packet
+ */
+static void notrace
+stm_ftrace_write(const char *buf, unsigned int len)
+{
+ stm_source_write(&stm_ftrace.data, STM_FTRACE_CHAN, buf, len);
+}
+
+static int stm_ftrace_link(struct stm_source_data *data)
+{
+ struct stm_ftrace *sf = container_of(data, struct stm_ftrace, data);
+
+ sf->ftrace.write = stm_ftrace_write;
+ sf->ftrace.next = NULL;
+
+ return register_ftrace_export(&sf->ftrace);
+}
+
+static void stm_ftrace_unlink(struct stm_source_data *data)
+{
+ struct stm_ftrace *sf = container_of(data, struct stm_ftrace, data);
+
+ unregister_ftrace_export(&sf->ftrace);
+}
+
+static int __init stm_ftrace_init(void)
+{
+ int ret;
+
+ ret = stm_source_register_device(NULL, &stm_ftrace.data);
+ if (ret)
+ pr_err("Failed to register stm_source - ftrace.\n");
+
+ return ret;
+}
+
+static void __exit stm_ftrace_exit(void)
+{
+ stm_source_unregister_device(&stm_ftrace.data);
+}
+
+module_init(stm_ftrace_init);
+module_exit(stm_ftrace_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("stm_ftrace driver");
+MODULE_AUTHOR("Chunyan Zhang <zhang.chunyan@linaro.org>");
--
2.7.4
^ permalink raw reply related
* [PATCH V7 1/3] tracing: add a possibility of exporting function trace to other places instead of ring buffer only
From: Chunyan Zhang @ 2016-10-18 8:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476778140-10319-1-git-send-email-zhang.chunyan@linaro.org>
Currently Function traces can be only exported to ring buffer, this
patch added trace_export concept which can process traces and export
them to a registered destination as an addition to the current only
one output of Ftrace - i.e. ring buffer.
In this way, if we want Function traces to be sent to other destination
rather than ring buffer only, we just need to register a new trace_export
and implement its own .write() function for writing traces to storage.
With this patch, only Function trace (trace type is TRACE_FN)
is supported.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
include/linux/trace.h | 28 +++++++++++
kernel/trace/trace.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 159 insertions(+), 1 deletion(-)
create mode 100644 include/linux/trace.h
diff --git a/include/linux/trace.h b/include/linux/trace.h
new file mode 100644
index 0000000..eb1c5b8
--- /dev/null
+++ b/include/linux/trace.h
@@ -0,0 +1,28 @@
+#ifndef _LINUX_TRACE_H
+#define _LINUX_TRACE_H
+
+#ifdef CONFIG_TRACING
+/*
+ * The trace export - an export of Ftrace output. The trace_export
+ * can process traces and export them to a registered destination as
+ * an addition to the current only output of Ftrace - i.e. ring buffer.
+ *
+ * If you want traces to be sent to some other place rather than ring
+ * buffer only, just need to register a new trace_export and implement
+ * its own .write() function for writing traces to the storage.
+ *
+ * next - pointer to the next trace_export
+ * write - copy traces which have been delt with ->commit() to
+ * the destination
+ */
+struct trace_export {
+ struct trace_export __rcu *next;
+ void (*write)(const char *, unsigned int);
+};
+
+int register_ftrace_export(struct trace_export *export);
+int unregister_ftrace_export(struct trace_export *export);
+
+#endif /* CONFIG_TRACING */
+
+#endif /* _LINUX_TRACE_H */
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8696ce6..db94ec1 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -40,6 +40,7 @@
#include <linux/poll.h>
#include <linux/nmi.h>
#include <linux/fs.h>
+#include <linux/trace.h>
#include <linux/sched/rt.h>
#include "trace.h"
@@ -2128,6 +2129,132 @@ void trace_buffer_unlock_commit_regs(struct trace_array *tr,
ftrace_trace_userstack(buffer, flags, pc);
}
+static void
+trace_process_export(struct trace_export *export,
+ struct ring_buffer_event *event)
+{
+ struct trace_entry *entry;
+ unsigned int size = 0;
+
+ entry = ring_buffer_event_data(event);
+
+ size = ring_buffer_event_length(event);
+
+ if (export->write)
+ export->write((char *)entry, size);
+}
+
+static DEFINE_MUTEX(ftrace_export_lock);
+
+static struct trace_export __rcu *ftrace_exports_list __read_mostly;
+
+static DEFINE_STATIC_KEY_FALSE(ftrace_exports_enabled);
+
+static inline void ftrace_exports_enable(void)
+{
+ static_branch_enable(&ftrace_exports_enabled);
+}
+
+static inline void ftrace_exports_disable(void)
+{
+ static_branch_disable(&ftrace_exports_enabled);
+}
+
+void ftrace_exports(struct ring_buffer_event *event)
+{
+ struct trace_export *export;
+
+ preempt_disable_notrace();
+
+ export = rcu_dereference_raw_notrace(ftrace_exports_list);
+ while (export) {
+ trace_process_export(export, event);
+ export = rcu_dereference_raw_notrace(export->next);
+ }
+
+ preempt_enable_notrace();
+}
+
+static inline void
+add_trace_export(struct trace_export **list, struct trace_export *export)
+{
+ rcu_assign_pointer(export->next, *list);
+ /*
+ * We are entering export into the list but another
+ * CPU might be walking that list. We need to make sure
+ * the export->next pointer is valid before another CPU sees
+ * the export pointer included into the list.
+ */
+ rcu_assign_pointer(*list, export);
+}
+
+static inline int
+rm_trace_export(struct trace_export **list, struct trace_export *export)
+{
+ struct trace_export **p;
+
+ for (p = list; *p != NULL; p = &(*p)->next)
+ if (*p == export)
+ break;
+
+ if (*p != export)
+ return -1;
+
+ rcu_assign_pointer(*p, (*p)->next);
+
+ return 0;
+}
+
+static inline void
+add_ftrace_export(struct trace_export **list, struct trace_export *export)
+{
+ if (*list == NULL)
+ ftrace_exports_enable();
+
+ add_trace_export(list, export);
+}
+
+static inline int
+rm_ftrace_export(struct trace_export **list, struct trace_export *export)
+{
+ int ret;
+
+ ret = rm_trace_export(list, export);
+ if (*list == NULL)
+ ftrace_exports_disable();
+
+ return ret;
+}
+
+int register_ftrace_export(struct trace_export *export)
+{
+ if (WARN_ON_ONCE(!export->write))
+ return -1;
+
+ mutex_lock(&ftrace_export_lock);
+
+ add_ftrace_export(&ftrace_exports_list, export);
+
+ mutex_unlock(&ftrace_export_lock);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(register_ftrace_export);
+
+int unregister_ftrace_export(struct trace_export *export)
+{
+ int ret;
+
+ mutex_lock(&ftrace_export_lock);
+
+ ret = rm_ftrace_export(&ftrace_exports_list, export);
+
+ mutex_unlock(&ftrace_export_lock);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(unregister_ftrace_export);
+
void
trace_function(struct trace_array *tr,
unsigned long ip, unsigned long parent_ip, unsigned long flags,
@@ -2146,8 +2273,11 @@ trace_function(struct trace_array *tr,
entry->ip = ip;
entry->parent_ip = parent_ip;
- if (!call_filter_check_discard(call, entry, buffer, event))
+ if (!call_filter_check_discard(call, entry, buffer, event)) {
+ if (static_branch_unlikely(&ftrace_exports_enabled))
+ ftrace_exports(event);
__buffer_unlock_commit(buffer, event);
+ }
}
#ifdef CONFIG_STACKTRACE
--
2.7.4
^ permalink raw reply related
* [PATCH V7 0/3] Integration of function trace with System Trace IP blocks
From: Chunyan Zhang @ 2016-10-18 8:08 UTC (permalink / raw)
To: linux-arm-kernel
IP blocks allowing a variety of trace sources to log debugging
information to a pre-defined area have been introduced on a couple of
architecture [1][2]. These system trace blocks (also known as STM)
typically follow the MIPI STPv2 protocol [3] and provide a system wide
logging facility to any device, running a kernel or not, with access
to the block's log entry port(s). Since each trace message has a
timestamp, it is possible to correlate events happening in the entire
system rather than being confined to the logging facility of a single
entity.
This patchset is trying to use STM IP blocks to store function tracing
information produced by Ftrace and I'm taking the Function trace
(trace type is TRACE_FN) as the example in this patchset, but other
types of traces also can be supported.
Logging information generated by the Ftrace subsystem to STM and gathered
in the sink device can be used in conjunction with trace data from other
board components, also collected in the same trace sink.
This example is using ARM coresight STM but the same would apply to any
other architecture wishing to do the same.
Comments would be greatly appreciated.
Thanks,
Chunyan
[1]. https://lwn.net/Articles/674746/
[2]. http://lxr.free-electrons.com/source/drivers/hwtracing/intel_th/
[3]. http://mipi.org/specifications/debug#STP
Changes from v6:
* Rebased on v4.9-rc1;
* Removed unused the declaration and header file including from trace.h
which was added in patch 1 of this series;
* Revised a bit the comments in trace.h .
Changes from v5:
* Addressed comments from Steven Rostedt:
- Removed .commit() from trace_export;
- Changed to directly call trace_process_export() instead of trace_export::commit();
- Used 'ring_buffer_event_length(event)' instead to get the trace size;
- Removed trace_export pointer from trace_array structure.
* Revised commit message a little to make the description more accurate.
Changes from v4:
* Addressed comments from Steven Rostedt:
- Removed 'inline' annotations from the function which is called via function pointer;
- Removed useless components from structure trace_export;
- Added '__rcu' annotation to the RCU variables;
- Used 'rcu_assign_pointer' to do every RCU assignment;
- Added WARN_ON_ONCE() when the .write() is not assigned;
- In order to reduce the overhead caused by adding this feature, this revision used an
global array instead of a big "if statement" to get the size of trace entry according
to the trace type.
- In order to keep the current logic unchanged, made ftrace_exports() only being called if
there's something have been added, i.e. if trace_export to stm_ftrace has been added in
this patchset.
Changes from v3:
* Addressed comments from Steven Rostedt:
- Added comments for the element 'name' and 'next' of trace_export;
- Changed to use RCU functions instead of mutex in function callback;
- Moved the check for name to register trace_export function;
* Renamed 'trace_function_exports' to 'trace_exports' since its
implementation is not only for function_trace; The similar changes on
'add_trace_export' and 'rm_trace_export'.
Changes from v2:
* Rebased on v4.8-rc1.
* Added trace_export class, and make traces can be exported to not only
ring buffer but also other area such as STM.
* Made stm_ftrace as an trace_export.
* More detailed changes are described in change log of each patch.
Changes from v1:
* Addressed comments from Alexander Shishkin:
- Modified some ambiguous change logs.
- Decoupled stm_ftrace and trace_output interface to STM.
- Changed the file name from stm_ftrace.c to stm/ftrace.c.
- Implemented link/unlink hooks for stm_ftrace.
* Removed useless header file include from stm/ftrace.c
* Added Acked-by from Steven Rostedt on 4/4.
Chunyan Zhang (3):
tracing: add a possibility of exporting function trace to other places
instead of ring buffer only
stm class: ftrace: Add ftrace-export-over-stm driver
stm: Mark the functions of writing buffer with notrace
drivers/hwtracing/coresight/coresight-stm.c | 2 +-
drivers/hwtracing/intel_th/sth.c | 11 ++-
drivers/hwtracing/stm/Kconfig | 11 +++
drivers/hwtracing/stm/Makefile | 2 +
drivers/hwtracing/stm/core.c | 7 +-
drivers/hwtracing/stm/dummy_stm.c | 2 +-
drivers/hwtracing/stm/ftrace.c | 88 +++++++++++++++++++
include/linux/stm.h | 4 +-
include/linux/trace.h | 28 ++++++
kernel/trace/trace.c | 132 +++++++++++++++++++++++++++-
10 files changed, 275 insertions(+), 12 deletions(-)
create mode 100644 drivers/hwtracing/stm/ftrace.c
create mode 100644 include/linux/trace.h
--
2.7.4
^ permalink raw reply
* [PATCH 18/19] stmmac: dwmac-sti: Remove obsolete STi platforms
From: Patrice Chotard @ 2016-10-18 8:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160923151142.GG9176@rob-hp-laptop>
On 09/23/2016 05:11 PM, Rob Herring wrote:
> On Wed, Sep 14, 2016 at 02:27:56PM +0100, Peter Griffin wrote:
>> This patch removes support for STiH415/6 SoC's from the
>> dwmac-sti driver and dt binding doc, as support for these
>> platforms is being removed from the kernel. It also removes
>> STiD127 related code, which has never actually been supported
>> upstream.
>>
>> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
>> Cc: <peppe.cavallaro@st.com>
>> Cc: <alexandre.torgue@st.com>
>> Cc: <netdev@vger.kernel.org>
>> ---
>> .../devicetree/bindings/net/sti-dwmac.txt | 3 +-
>
> Acked-by: Rob Herring <robh@kernel.org>
Applied on sti-dt-for-4.10 branch
Thanks
>
>> drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 37 ----------------------
>> 2 files changed, 1 insertion(+), 39 deletions(-)
^ permalink raw reply
* [PATCH 12/19] reset: sti: Remove obsolete platforms from dt binding doc.
From: Patrice Chotard @ 2016-10-18 8:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160923151008.GF9176@rob-hp-laptop>
Hi
On 09/23/2016 05:10 PM, Rob Herring wrote:
> On Wed, Sep 14, 2016 at 02:27:50PM +0100, Peter Griffin wrote:
>> STiH415/6 SoC support is being removed from the kernel.
>> This patch updates the sti dt powerdown bindings and
>> removes references to these obsolete platforms.
>>
>> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
>> Cc: <p.zabel@pengutronix.de>
>> Cc: <robh+dt@kernel.org>
>> ---
>> Documentation/devicetree/bindings/reset/st,sti-powerdown.txt | 12 +++++-------
>> 1 file changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt b/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
>> index 1cfd21d..9252713 100644
>> --- a/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
>> +++ b/Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
>> @@ -16,15 +16,14 @@ Please refer to reset.txt in this directory for common reset
>> controller binding usage.
>>
>> Required properties:
>> -- compatible: Should be "st,<chip>-powerdown"
>> - ex: "st,stih415-powerdown", "st,stih416-powerdown"
>> +- compatible: Should be "st,stih407-powerdown"
>> - #reset-cells: 1, see below
>>
>> example:
>>
>> powerdown: powerdown-controller {
>> + compatible = "st,stih407-powerdown";
>> #reset-cells = <1>;
>> - compatible = "st,stih415-powerdown";
>> };
>>
>>
>> @@ -37,11 +36,10 @@ index specifying which channel to use, as described in reset.txt
>>
>> example:
>>
>> - usb1: usb at fe200000 {
>> - resets = <&powerdown STIH41X_USB1_POWERDOWN>;
>> + st_dwc3: dwc3 at 8f94000 {
>
> usb@ was correct here. With that,
>
> Acked-by: Rob Herring <robh@kernel.org>
>
Applied on sti-dt-for-4.10 branch
Thanks
^ permalink raw reply
* [PATCH 0/7] ARM: AMx3xx/DRA7: crypto IP support data
From: Tero Kristo @ 2016-10-18 7:57 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476777018-526-1-git-send-email-t-kristo@ti.com>
On 18/10/16 10:50, Tero Kristo wrote:
> Hi,
>
> This series finalizes the crypto support for amx3xx / dra7 socs,
> adding the hwmod data and fixing one issue with l4sec clockdomain
> on dra7.
>
> Branch against 4.9-rc1 available here:
> tree: https://github.com/t-kristo/linux-pm.git
> branch: 4.9-rc1-crypto-data
>
> -Tero
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Argh, sorry about the spam. Had trouble with suppress-cc options as Joel
Fernandez has left TI a while back and was getting bounces.
-Tero
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox