Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814029/?format=api
{ "id": 814029, "url": "http://patchwork.ozlabs.org/api/patches/814029/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170915015921.4659-2-icenowy@aosc.io/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170915015921.4659-2-icenowy@aosc.io>", "list_archive_url": null, "date": "2017-09-15T01:59:19", "name": "[U-Boot,v4,1/3] video: sunxi: extract simplefb match code to a new file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "b0ef13a0adc977a4cf2cb7e5d9c1d6f83ce4b2b5", "submitter": { "id": 71295, "url": "http://patchwork.ozlabs.org/api/people/71295/?format=api", "name": "Icenowy Zheng", "email": "icenowy@aosc.io" }, "delegate": { "id": 1700, "url": "http://patchwork.ozlabs.org/api/users/1700/?format=api", "username": "ag", "first_name": "Anatolij", "last_name": "Gustschin", "email": "agust@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170915015921.4659-2-icenowy@aosc.io/mbox/", "series": [ { "id": 3195, "url": "http://patchwork.ozlabs.org/api/series/3195/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3195", "date": "2017-09-15T01:59:18", "name": "Allwinner DE2 HDMI SimpleFB support", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/3195/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814029/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814029/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtdtv5LZwz9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 12:01:59 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 5754EC21F7A; Fri, 15 Sep 2017 02:01:35 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id E9D50C21F54;\n\tFri, 15 Sep 2017 02:01:32 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid A99A2C21F9C; Fri, 15 Sep 2017 02:01:16 +0000 (UTC)", "from burlywood.ash.relay.mailchannels.net\n\t(burlywood.ash.relay.mailchannels.net [23.83.222.26])\n\tby lists.denx.de (Postfix) with ESMTPS id 9C005C21F54\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 02:01:12 +0000 (UTC)", "from relay.mailchannels.net (localhost [127.0.0.1])\n\tby relay.mailchannels.net (Postfix) with ESMTP id 6CEAB5C7A92;\n\tFri, 15 Sep 2017 02:01:08 +0000 (UTC)", "from hermes.aosc.io (unknown [100.96.128.168])\n\t(Authenticated sender: lmn-TZDUIOWCRQMW)\n\tby relay.mailchannels.net (Postfix) with ESMTPA id 960605C740C;\n\tFri, 15 Sep 2017 02:01:07 +0000 (UTC)", "from hermes.aosc.io (hermes.aosc.io [100.96.128.1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)\n\tby 0.0.0.0:2500 (trex/5.9.14); Fri, 15 Sep 2017 02:01:08 +0000", "from localhost (localhost [127.0.0.1]) (Authenticated sender:\n\ticenowy@aosc.io)\n\tby hermes.aosc.io (Postfix) with ESMTPSA id 87B2147420;\n\tFri, 15 Sep 2017 02:01:03 +0000 (UTC)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H4,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no\n\tversion=3.4.0", "X-Sender-Id": [ "lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io", "lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io" ], "X-MC-Relay": "Neutral", "X-MailChannels-SenderId": "lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io", "X-MailChannels-Auth-Id": "lmn-TZDUIOWCRQMW", "X-Coil-Trail": "379528167c5a34ed_1505440868246_394493737", "X-MC-Loop-Signature": "1505440868246:2660773429", "X-MC-Ingress-Time": "1505440868246", "From": "Icenowy Zheng <icenowy@aosc.io>", "To": "Jagan Teki <jagan@openedev.com>,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tJernej Skrabec <jernej.skrabec@siol.net>", "Date": "Fri, 15 Sep 2017 09:59:19 +0800", "Message-Id": "<20170915015921.4659-2-icenowy@aosc.io>", "In-Reply-To": "<20170915015921.4659-1-icenowy@aosc.io>", "References": "<20170915015921.4659-1-icenowy@aosc.io>", "Cc": "u-boot@lists.denx.de, linux-sunxi@googlegroups.com,\n\tIcenowy Zheng <icenowy@aosc.io>", "Subject": "[U-Boot] [PATCH v4 1/3] video: sunxi: extract simplefb match code\n\tto a new file", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "As the DE2 simplefb setup code can also benefit from the simplefb match\ncode, extract it to a new source file.\n\nSigned-off-by: Icenowy Zheng <icenowy@aosc.io>\nReviewed-by: Andre Przywara <andre.przywara@arm.com>\nAcked-by: Maxime Ripard <maxime.ripard@free-electrons.com>\n---\nChanges in v4:\n- Add missing copyright for Luc.\nChanges in v3:\n- Use /** to start kerndoc.\n\n drivers/video/sunxi/Makefile | 2 +-\n drivers/video/sunxi/simplefb_common.c | 30 ++++++++++++++++++++++++++++++\n drivers/video/sunxi/simplefb_common.h | 22 ++++++++++++++++++++++\n drivers/video/sunxi/sunxi_display.c | 13 ++-----------\n 4 files changed, 55 insertions(+), 12 deletions(-)\n create mode 100644 drivers/video/sunxi/simplefb_common.c\n create mode 100644 drivers/video/sunxi/simplefb_common.h", "diff": "diff --git a/drivers/video/sunxi/Makefile b/drivers/video/sunxi/Makefile\nindex 0d64c2021f..10862edaca 100644\n--- a/drivers/video/sunxi/Makefile\n+++ b/drivers/video/sunxi/Makefile\n@@ -5,5 +5,5 @@\n # SPDX-License-Identifier:\tGPL-2.0+\n #\n \n-obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o lcdc.o tve_common.o ../videomodes.o\n+obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o simplefb_common.o lcdc.o tve_common.o ../videomodes.o\n obj-$(CONFIG_VIDEO_DE2) += sunxi_de2.o sunxi_dw_hdmi.o lcdc.o ../dw_hdmi.o\ndiff --git a/drivers/video/sunxi/simplefb_common.c b/drivers/video/sunxi/simplefb_common.c\nnew file mode 100644\nindex 0000000000..7befb736da\n--- /dev/null\n+++ b/drivers/video/sunxi/simplefb_common.c\n@@ -0,0 +1,30 @@\n+/*\n+ * Common code for Allwinner SimpleFB with pipeline.\n+ *\n+ * (C) Copyright 2013-2014 Luc Verhaegen <libv@skynet.be>\n+ * (C) Copyright 2014-2015 Hans de Goede <hdegoede@redhat.com>\n+ * (C) Copyright 2017 Icenowy Zheng <icenowy@aosc.io>\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#include <fdtdec.h>\n+\n+int sunxi_simplefb_fdt_match(void *blob, const char *pipeline)\n+{\n+\tint offset, ret;\n+\n+\t/* Find a prefilled simpefb node, matching out pipeline config */\n+\toffset = fdt_node_offset_by_compatible(blob, -1,\n+\t\t\t\t\t \"allwinner,simple-framebuffer\");\n+\twhile (offset >= 0) {\n+\t\tret = fdt_stringlist_search(blob, offset, \"allwinner,pipeline\",\n+\t\t\t\t\t pipeline);\n+\t\tif (ret == 0)\n+\t\t\tbreak;\n+\t\toffset = fdt_node_offset_by_compatible(blob, offset,\n+\t\t\t\t\t \"allwinner,simple-framebuffer\");\n+\t}\n+\n+\treturn offset;\n+}\ndiff --git a/drivers/video/sunxi/simplefb_common.h b/drivers/video/sunxi/simplefb_common.h\nnew file mode 100644\nindex 0000000000..1a2bfabf00\n--- /dev/null\n+++ b/drivers/video/sunxi/simplefb_common.h\n@@ -0,0 +1,22 @@\n+/*\n+ * (C) Copyright 2017 Icenowy Zheng <icenowy@aosc.io>\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#ifndef __SIMPLEFB_COMMON_H\n+#define __SIMPLEFB_COMMON_H\n+\n+/**\n+ * sunxi_simplefb_fdt_match() - match a sunxi simplefb node\n+ *\n+ * Match a sunxi simplefb device node with a specified pipeline, and\n+ * return its offset.\n+ *\n+ * @blob: device tree blob\n+ * @pipeline: display pipeline\n+ * @return device node offset in blob, or negative values if failed\n+ */\n+int sunxi_simplefb_fdt_match(void *blob, const char *pipeline);\n+\n+#endif\ndiff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c\nindex de768ba94a..7f25ed5f26 100644\n--- a/drivers/video/sunxi/sunxi_display.c\n+++ b/drivers/video/sunxi/sunxi_display.c\n@@ -29,6 +29,7 @@\n #include \"../anx9804.h\"\n #include \"../hitachi_tx18d42vm_lcd.h\"\n #include \"../ssd2828.h\"\n+#include \"simplefb_common.h\"\n \n #ifdef CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW\n #define PWM_ON 0\n@@ -1377,17 +1378,7 @@ int sunxi_simplefb_setup(void *blob)\n \t\tbreak;\n \t}\n \n-\t/* Find a prefilled simpefb node, matching out pipeline config */\n-\toffset = fdt_node_offset_by_compatible(blob, -1,\n-\t\t\t\t\t \"allwinner,simple-framebuffer\");\n-\twhile (offset >= 0) {\n-\t\tret = fdt_stringlist_search(blob, offset, \"allwinner,pipeline\",\n-\t\t\t\t\t pipeline);\n-\t\tif (ret == 0)\n-\t\t\tbreak;\n-\t\toffset = fdt_node_offset_by_compatible(blob, offset,\n-\t\t\t\t\t \"allwinner,simple-framebuffer\");\n-\t}\n+\toffset = sunxi_simplefb_fdt_match(blob, pipeline);\n \tif (offset < 0) {\n \t\teprintf(\"Cannot setup simplefb: node not found\\n\");\n \t\treturn 0; /* Keep older kernels working */\n", "prefixes": [ "U-Boot", "v4", "1/3" ] }