From patchwork Fri Aug 11 14:22:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 9896061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0001C60325 for ; Fri, 11 Aug 2017 14:23:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E66D328538 for ; Fri, 11 Aug 2017 14:23:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA69A28C3C; Fri, 11 Aug 2017 14:23:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 24A0928538 for ; Fri, 11 Aug 2017 14:23:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D3F56E6E7; Fri, 11 Aug 2017 14:23:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id B24BE6E6E7 for ; Fri, 11 Aug 2017 14:22:59 +0000 (UTC) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20170811142255epoutp0200a1505bb37fcfa91dc4904b68825667~Z0KknKeCp1985319853epoutp02y; Fri, 11 Aug 2017 14:22:55 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.42.71]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20170811142254epcas2p4e25c5109670e90b3194fa019b114bb9d~Z0KjoOt5u1729217292epcas2p4u; Fri, 11 Aug 2017 14:22:54 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 61.88.14130.EBDBD895; Fri, 11 Aug 2017 23:22:54 +0900 (KST) Received: from epsmgms2p2.samsung.com (unknown [182.195.42.80]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20170811142253epcas2p2ff89d81cc7d5f8bb534eb9f71bf4e2c9~Z0KiqGvnw0958409584epcas2p2u; Fri, 11 Aug 2017 14:22:53 +0000 (GMT) X-AuditID: b6c32a47-f79db6d000003732-dd-598dbdbe155c Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 92.31.09541.DBDBD895; Fri, 11 Aug 2017 23:22:53 +0900 (KST) Received: from amdc3058.localnet ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OUI00GE1YM3UW00@mmp1.samsung.com>; Fri, 11 Aug 2017 23:22:53 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Linus Torvalds Subject: [GIT PULL] fbdev fixes for v4.13-rc5 Date: Fri, 11 Aug 2017 16:22:51 +0200 Message-id: <2529421.QTQmKbkfoH@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsWy7bCmqe6+vb2RBmvXKFpc+fqezeJE3wdW i8u75rBZPOp7y+7A4nFixm8Wj/vdx5k8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kik3ASmJi+ypGEFtE wEji84srYHFmgQSJzSsbmUFsYQFdiX3ffzGB2CwCqhI7b55kAbF5BTQltiyfBLZNVMBLYsu+ diaIuKDEj8n3WCDmyEvs2z8VaqaWxPqdx5kmMPLNQlI2C0nZLCRlCxiZVzGKpRYU56bnFhsV GOkVJ+YWl+al6yXn525iBIb/tsNaATsYm85FH2IU4GBU4uH1ONQTKcSaWFZcmXuIUYKDWUmE t21nb6QQb0piZVVqUX58UWlOavEhRlOgNyYyS4km5wNjM68k3tDE0sjEwMzM0MjA2ExJnHdC 4JcIIYH0xJLU7NTUgtQimD4mDk6pBsYTK2Rksg+ebNslM+3reimn/rvT/L5OPvFdpCpm/4N5 viUx7AY5E1kLLY4wB7w/Z7P+Irf01DSvFpWJ05buELh4+usETQv5Yzqzhc+K9/BUVSRv8L/F MGfhRo5Zf/McFq+de9dnTd6x/7Nvz4m+qSjFcP7RvB0xhwt3TQn6ML2kdVk0x/VDr199UGIp zkg01GIuKk4EALjQEr2VAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170811142253epcas2p2ff89d81cc7d5f8bb534eb9f71bf4e2c9 X-Msg-Generator: CA X-Sender-IP: 182.195.42.80 X-Local-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRvsgrzshLHsoITsnpAbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRtTYW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBF?= =?UTF-8?B?bmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 102P X-CMS-RootMailID: 20170811142253epcas2p2ff89d81cc7d5f8bb534eb9f71bf4e2c9 X-RootMTR: 20170811142253epcas2p2ff89d81cc7d5f8bb534eb9f71bf4e2c9 References: Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi Linus, Please pull fbdev fixes for v4.13-rc5. Best regards, --- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics The following changes since commit 16f73eb02d7e1765ccab3d2018e0bd98eb93d973: Linux 4.13-rc3 (2017-07-30 12:40:36 -0700) are available in the git repository at: git://github.com/bzolnier/linux.git tags/fbdev-v4.13-rc5 for you to fetch changes up to dd0c41f8a7e0babdadc61d5201ac8505a79dec05: efifb: allow user to disable write combined mapping. (2017-07-31 18:45:41 +0200) ---------------------------------------------------------------- fbdev fixes for v4.13-rc5: - allow user to disable write combined mapping in efifb driver (Dave Airlie) - fix use after free bugs on driver removal in imxfb driver (Dan Carpenter) - fix unused variable warning in omapfb driver (Arnd Bergmann) ---------------------------------------------------------------- Arnd Bergmann (1): fbdev: omapfb: remove unused variable Dan Carpenter (1): video: fbdev: imxfb: use after free in imxfb_remove() Dave Airlie (1): efifb: allow user to disable write combined mapping. Documentation/fb/efifb.txt | 6 ++++++ drivers/video/fbdev/efifb.c | 8 +++++++- drivers/video/fbdev/imxfb.c | 10 +++------- drivers/video/fbdev/omap2/omapfb/dss/core.c | 1 - 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Documentation/fb/efifb.txt b/Documentation/fb/efifb.txt index a59916c..1a85c1b 100644 --- a/Documentation/fb/efifb.txt +++ b/Documentation/fb/efifb.txt @@ -27,5 +27,11 @@ You have to add the following kernel parameters in your elilo.conf: Macbook Pro 17", iMac 20" : video=efifb:i20 +Accepted options: + +nowc Don't map the framebuffer write combined. This can be used + to workaround side-effects and slowdowns on other CPU cores + when large amounts of console data are written. + -- Edgar Hucek diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index ff01bed..1e784ad 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -17,6 +17,7 @@ #include static bool request_mem_succeeded = false; +static bool nowc = false; static struct fb_var_screeninfo efifb_defined = { .activate = FB_ACTIVATE_NOW, @@ -99,6 +100,8 @@ static int efifb_setup(char *options) screen_info.lfb_height = simple_strtoul(this_opt+7, NULL, 0); else if (!strncmp(this_opt, "width:", 6)) screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0); + else if (!strcmp(this_opt, "nowc")) + nowc = true; } } @@ -255,7 +258,10 @@ static int efifb_probe(struct platform_device *dev) info->apertures->ranges[0].base = efifb_fix.smem_start; info->apertures->ranges[0].size = size_remap; - info->screen_base = ioremap_wc(efifb_fix.smem_start, efifb_fix.smem_len); + if (nowc) + info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len); + else + info->screen_base = ioremap_wc(efifb_fix.smem_start, efifb_fix.smem_len); if (!info->screen_base) { pr_err("efifb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n", efifb_fix.smem_len, efifb_fix.smem_start); diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index c166e07..ba82f97 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -1073,20 +1073,16 @@ static int imxfb_remove(struct platform_device *pdev) imxfb_disable_controller(fbi); unregister_framebuffer(info); - + fb_dealloc_cmap(&info->cmap); pdata = dev_get_platdata(&pdev->dev); if (pdata && pdata->exit) pdata->exit(fbi->pdev); - - fb_dealloc_cmap(&info->cmap); - kfree(info->pseudo_palette); - framebuffer_release(info); - dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base, fbi->map_dma); - iounmap(fbi->regs); release_mem_region(res->start, resource_size(res)); + kfree(info->pseudo_palette); + framebuffer_release(info); return 0; } diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c index eecf695..09e5bb0 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c @@ -193,7 +193,6 @@ static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d) static int __init omap_dss_probe(struct platform_device *pdev) { - struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r; core.pdev = pdev;