diff options
-rw-r--r-- | config-armv7-lpae | 2 | ||||
-rw-r--r-- | imx-hdmi-fix.patch | 93 | ||||
-rw-r--r-- | kernel.spec | 11 | ||||
-rw-r--r-- | kernfs-oops-fix.patch | 141 |
4 files changed, 246 insertions, 1 deletions
diff --git a/config-armv7-lpae b/config-armv7-lpae index 5ec30d1e8..f0e135490 100644 --- a/config-armv7-lpae +++ b/config-armv7-lpae @@ -91,7 +91,7 @@ CONFIG_DRM_EXYNOS=m CONFIG_DRM_EXYNOS_IOMMU=y CONFIG_DRM_EXYNOS_DMABUF=y CONFIG_DRM_EXYNOS_FIMD=y -CONFIG_DRM_EXYNOS_HDMI=y +# CONFIG_DRM_EXYNOS_HDMI is not set CONFIG_DRM_EXYNOS_VIDI=y CONFIG_DRM_EXYNOS_G2D=y CONFIG_DRM_EXYNOS_IPP=y diff --git a/imx-hdmi-fix.patch b/imx-hdmi-fix.patch new file mode 100644 index 000000000..c7db416b4 --- /dev/null +++ b/imx-hdmi-fix.patch @@ -0,0 +1,93 @@ +Instead of redefining the enums, use the standard ones already +available to avoid the following build errors: + +drivers/staging/imx-drm/imx-hdmi.c:56:13: error: nested redefinition of ‘enum hdmi_colorimetry’ +drivers/staging/imx-drm/imx-hdmi.c:56:13: error: redeclaration of ‘enum hdmi_colorimetry’ +In file included from include/drm/drm_crtc.h:33:0, + from include/drm/drmP.h:710, + from drivers/staging/imx-drm/imx-hdmi.c:24: +include/linux/hdmi.h:48:6: note: originally defined here + +Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org> +Cc: Guennadi Liakhovetski <g.liakhovetski at gmx.de> +Cc: Fabio Estevam <fabio.estevam at freescale.com> +--- +Only compile tested. +--- + drivers/staging/imx-drm/imx-hdmi.c | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c +index f3a1f5e2e492..62ce0e86f14b 100644 +--- a/drivers/staging/imx-drm/imx-hdmi.c ++++ b/drivers/staging/imx-drm/imx-hdmi.c +@@ -16,6 +16,7 @@ + #include <linux/delay.h> + #include <linux/err.h> + #include <linux/clk.h> ++#include <linux/hdmi.h> + #include <linux/regmap.h> + #include <linux/mfd/syscon.h> + #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> +@@ -52,11 +53,6 @@ enum hdmi_datamap { + YCbCr422_12B = 0x12, + }; + +-enum hdmi_colorimetry { +- ITU601, +- ITU709, +-}; +- + enum imx_hdmi_devtype { + IMX6Q_HDMI, + IMX6DL_HDMI, +@@ -489,12 +485,12 @@ static void imx_hdmi_update_csc_coeffs(struct imx_hdmi *hdmi) + + if (is_color_space_conversion(hdmi)) { + if (hdmi->hdmi_data.enc_out_format == RGB) { +- if (hdmi->hdmi_data.colorimetry == ITU601) ++ if (hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601) + csc_coeff = &csc_coeff_rgb_out_eitu601; + else + csc_coeff = &csc_coeff_rgb_out_eitu709; + } else if (hdmi->hdmi_data.enc_in_format == RGB) { +- if (hdmi->hdmi_data.colorimetry == ITU601) ++ if (hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601) + csc_coeff = &csc_coeff_rgb_in_eitu601; + else + csc_coeff = &csc_coeff_rgb_in_eitu709; +@@ -1140,16 +1136,16 @@ static void hdmi_config_AVI(struct imx_hdmi *hdmi) + /* Set up colorimetry */ + if (hdmi->hdmi_data.enc_out_format == XVYCC444) { + colorimetry = HDMI_FC_AVICONF1_COLORIMETRY_EXTENDED_INFO; +- if (hdmi->hdmi_data.colorimetry == ITU601) ++ if (hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601) + ext_colorimetry = + HDMI_FC_AVICONF2_EXT_COLORIMETRY_XVYCC601; +- else /* hdmi->hdmi_data.colorimetry == ITU709 */ ++ else /*hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_709*/ + ext_colorimetry = + HDMI_FC_AVICONF2_EXT_COLORIMETRY_XVYCC709; + } else if (hdmi->hdmi_data.enc_out_format != RGB) { +- if (hdmi->hdmi_data.colorimetry == ITU601) ++ if (hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601) + colorimetry = HDMI_FC_AVICONF1_COLORIMETRY_SMPTE; +- else /* hdmi->hdmi_data.colorimetry == ITU709 */ ++ else /*hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_709*/ + colorimetry = HDMI_FC_AVICONF1_COLORIMETRY_ITUR; + ext_colorimetry = HDMI_FC_AVICONF2_EXT_COLORIMETRY_XVYCC601; + } else { /* Carries no data */ +@@ -1379,9 +1375,9 @@ static int imx_hdmi_setup(struct imx_hdmi *hdmi, struct drm_display_mode *mode) + (hdmi->vic == 21) || (hdmi->vic == 22) || + (hdmi->vic == 2) || (hdmi->vic == 3) || + (hdmi->vic == 17) || (hdmi->vic == 18)) +- hdmi->hdmi_data.colorimetry = ITU601; ++ hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_601; + else +- hdmi->hdmi_data.colorimetry = ITU709; ++ hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_709; + + if ((hdmi->vic == 10) || (hdmi->vic == 11) || + (hdmi->vic == 12) || (hdmi->vic == 13) || +-- +1.7.9.5 diff --git a/kernel.spec b/kernel.spec index 65332beb8..17250ad81 100644 --- a/kernel.spec +++ b/kernel.spec @@ -624,6 +624,11 @@ Patch25188: 0001-usb-phy-Quiet-unable-to-find-transceiver-message.patch Patch25189: ath9k-fix-bad-udelay.patch Patch25190: perf-fix-asm-hash-build.patch +#rhbz 1055105 +Patch25191: kernfs-oops-fix.patch + +Patch25192: imx-hdmi-fix.patch + # END OF PATCH DEFINITIONS %endif @@ -1270,6 +1275,11 @@ ApplyPatch 0001-usb-phy-Quiet-unable-to-find-transceiver-message.patch ApplyPatch ath9k-fix-bad-udelay.patch ApplyPatch perf-fix-asm-hash-build.patch +#rhbz 1055105 +ApplyPatch kernfs-oops-fix.patch + +ApplyPatch imx-hdmi-fix.patch + # END OF PATCH APPLICATIONS %endif @@ -2051,6 +2061,7 @@ fi %changelog * Thu Jan 30 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.14.0-0.rc0.git17.1 - Linux v3.13-10094-g9b0cd30 +- Add patches to fix imx-hdmi build, and fix kernfs lockdep oops (rhbz 1055105) * Thu Jan 30 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.14.0-0.rc0.git16.1 - Linux v3.13-9240-g1329311 diff --git a/kernfs-oops-fix.patch b/kernfs-oops-fix.patch new file mode 100644 index 000000000..d6440ce20 --- /dev/null +++ b/kernfs-oops-fix.patch @@ -0,0 +1,141 @@ +Path: news.gmane.org!not-for-mail +From: Tejun Heo <tj@kernel.org> +Newsgroups: gmane.linux.kernel,gmane.linux.usb.general +Subject: [PATCH driver-core-linus] kernfs: make kernfs_deactivate() honor + KERNFS_LOCKDEP flag +Date: Wed, 29 Jan 2014 12:04:03 -0500 +Lines: 73 +Approved: news@gmane.org +Message-ID: <20140129170403.GJ30842@htj.dyndns.org> +References: <CAOJe8K20xx3o7HXH3E4pE3=G4pQ-nUf4LYF6sEwy5wYQE23+AA@mail.gmail.com> + <Pine.LNX.4.44L0.1401291134070.11997-100000@netrider.rowland.org> +NNTP-Posting-Host: plane.gmane.org +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Trace: ger.gmane.org 1391015061 4057 80.91.229.3 (29 Jan 2014 17:04:21 GMT) +X-Complaints-To: usenet@ger.gmane.org +NNTP-Posting-Date: Wed, 29 Jan 2014 17:04:21 +0000 (UTC) +Cc: Denis Kirjanov <kda@linux-powerpc.org>, + linux-kernel@vger.kernel.org, USB list <linux-usb@vger.kernel.org> +To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, + Fabio Estevam <festevam@gmail.com>, + Alan Stern <stern@rowland.harvard.edu> +Original-X-From: linux-kernel-owner@vger.kernel.org Wed Jan 29 18:04:27 2014 +Return-path: <linux-kernel-owner@vger.kernel.org> +Envelope-to: glk-linux-kernel-3@plane.gmane.org +Original-Received: from vger.kernel.org ([209.132.180.67]) + by plane.gmane.org with esmtp (Exim 4.69) + (envelope-from <linux-kernel-owner@vger.kernel.org>) + id 1W8YYs-0005VX-Uk + for glk-linux-kernel-3@plane.gmane.org; Wed, 29 Jan 2014 18:04:27 +0100 +Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand + id S1752698AbaA2REJ (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>); + Wed, 29 Jan 2014 12:04:09 -0500 +Original-Received: from mail-qc0-f169.google.com ([209.85.216.169]:41377 "EHLO + mail-qc0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org + with ESMTP id S1751973AbaA2REH (ORCPT + <rfc822;linux-kernel@vger.kernel.org>); + Wed, 29 Jan 2014 12:04:07 -0500 +Original-Received: by mail-qc0-f169.google.com with SMTP id w7so3165568qcr.14 + for <multiple recipients>; Wed, 29 Jan 2014 09:04:06 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20120113; + h=sender:date:from:to:cc:subject:message-id:references:mime-version + :content-type:content-disposition:in-reply-to:user-agent; + bh=Fh6SVzwapmccOTdEgQSF3oN1/EJKEwZvtYBUuXIZ0o4=; + b=rBrKrcnQDx5jOFp+S+kxTkHV0/kydN6rAWp8Hm4R/f1x8IEpY6l6pJIDqlk3yHcgh2 + bGZkS+TswirT2pk1Gv4lcTtJRhjEXAr11bG9nr81fu1nQB/n7zVu+O/5TKLmSxBQAE0M + tLTNvWz1HcnTJstiZf2B5WUuAxF3x64eY6TNwCtqlE2U6PjtyBHi2bVnWPPD/zIrdhS1 + tLtPw83syrLhuR0WloEZxUVcYcDxSJgK7IG82/attVP2vYZ6aPWj0H5fAO/pFCCdF7Xa + 6WUCjRx6EmUfSmgc0FkJZwM9JC6IasvC8i13Xcewfpp1ZCVCaaR4/CR8oB9AWbHnKt7i + U/LQ== +X-Received: by 10.224.165.133 with SMTP id i5mr13972741qay.75.1391015046591; + Wed, 29 Jan 2014 09:04:06 -0800 (PST) +Original-Received: from htj.dyndns.org (207-38-225-25.c3-0.43d-ubr1.qens-43d.ny.cable.rcn.com. [207.38.225.25]) + by mx.google.com with ESMTPSA id j65sm4205451qgj.18.2014.01.29.09.04.05 + for <multiple recipients> + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 29 Jan 2014 09:04:05 -0800 (PST) +Content-Disposition: inline +In-Reply-To: <Pine.LNX.4.44L0.1401291134070.11997-100000@netrider.rowland.org> +User-Agent: Mutt/1.5.21 (2010-09-15) +Original-Sender: linux-kernel-owner@vger.kernel.org +Precedence: bulk +List-ID: <linux-kernel.vger.kernel.org> +X-Mailing-List: linux-kernel@vger.kernel.org +Xref: news.gmane.org gmane.linux.kernel:1637396 gmane.linux.usb.general:102347 +Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1637396> + +kernfs_deactivate() forgot to check whether KERNFS_LOCKDEP is set +before performing lockdep annotations and ends up feeding +uninitialized lockdep_map to lockdep triggering warning like the +following on USB stick hotunplug. + + usb 1-2: USB disconnect, device number 2 + INFO: trying to register non-static key. + the code is fine but needs lockdep annotation. + turning off the locking correctness validator. + CPU: 1 PID: 62 Comm: khubd Not tainted 3.13.0-work+ #82 + Hardware name: empty empty/S3992, BIOS 080011 10/26/2007 + ffff880065ca7f60 ffff88013a4ffa08 ffffffff81cfb6bd 0000000000000002 + ffff88013a4ffac8 ffffffff810f8530 ffff88013a4fc710 0000000000000002 + ffff880100000000 ffffffff82a3db50 0000000000000001 ffff88013a4fc710 + Call Trace: + [<ffffffff81cfb6bd>] dump_stack+0x4e/0x7a + [<ffffffff810f8530>] __lock_acquire+0x1910/0x1e70 + [<ffffffff810f931a>] lock_acquire+0x9a/0x1d0 + [<ffffffff8127c75e>] kernfs_deactivate+0xee/0x130 + [<ffffffff8127d4c8>] kernfs_addrm_finish+0x38/0x60 + [<ffffffff8127d701>] kernfs_remove_by_name_ns+0x51/0xa0 + [<ffffffff8127b4f1>] remove_files.isra.1+0x41/0x80 + [<ffffffff8127b7e7>] sysfs_remove_group+0x47/0xa0 + [<ffffffff8127b873>] sysfs_remove_groups+0x33/0x50 + [<ffffffff8177d66d>] device_remove_attrs+0x4d/0x80 + [<ffffffff8177e25e>] device_del+0x12e/0x1d0 + [<ffffffff819722c2>] usb_disconnect+0x122/0x1a0 + [<ffffffff819749b5>] hub_thread+0x3c5/0x1290 + [<ffffffff810c6a6d>] kthread+0xed/0x110 + [<ffffffff81d0a56c>] ret_from_fork+0x7c/0xb0 + +Fix it by making kernfs_deactivate() perform lockdep annotations only +if KERNFS_LOCKDEP is set. + +Signed-off-by: Tejun Heo <tj@kernel.org> +Reported-by: Fabio Estevam <festevam@gmail.com> +Reported-by: Alan Stern <stern@rowland.harvard.edu> +--- + fs/kernfs/dir.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c +index 5104cf5..bd6e18b 100644 +--- a/fs/kernfs/dir.c ++++ b/fs/kernfs/dir.c +@@ -187,19 +187,23 @@ static void kernfs_deactivate(struct kernfs_node *kn) + + kn->u.completion = (void *)&wait; + +- rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_); ++ if (kn->flags & KERNFS_LOCKDEP) ++ rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_); + /* atomic_add_return() is a mb(), put_active() will always see + * the updated kn->u.completion. + */ + v = atomic_add_return(KN_DEACTIVATED_BIAS, &kn->active); + + if (v != KN_DEACTIVATED_BIAS) { +- lock_contended(&kn->dep_map, _RET_IP_); ++ if (kn->flags & KERNFS_LOCKDEP) ++ lock_contended(&kn->dep_map, _RET_IP_); + wait_for_completion(&wait); + } + +- lock_acquired(&kn->dep_map, _RET_IP_); +- rwsem_release(&kn->dep_map, 1, _RET_IP_); ++ if (kn->flags & KERNFS_LOCKDEP) { ++ lock_acquired(&kn->dep_map, _RET_IP_); ++ rwsem_release(&kn->dep_map, 1, _RET_IP_); ++ } + } + + /** |