From patchwork Thu Aug 29 20:00:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 172653 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2717793ily; Thu, 29 Aug 2019 13:00:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+Y+3/gAZ0nCsRtNoEjal0rxwpxZr9GRSFbUS67vJleu7be8+Eyd8iZYfG+6sCverUyqHB X-Received: by 2002:a17:90a:17e2:: with SMTP id q89mr11928567pja.8.1567108814095; Thu, 29 Aug 2019 13:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567108814; cv=none; d=google.com; s=arc-20160816; b=h3DeGmCgqFjm9g8Pz/Lj3c6hiiDW8PZvse8vLJOA8hCAvf7BCxPHoekMcwYEMo6HgH nXHmM6x/t2YwonFzNakul5LKnjuUvb1R5xi+5WFZwYdZuA+bhrmQMt2woTZDr7fjuDxZ GeHJ0erbfVky6PsZqUlHlvaRLhJAAWdxugiqNXmgfPt6Edm+mfgyh5569lIIop7wH9Nj fMfqaA5IfWSEfiCjszLEBMmj7jn82hvcnz/g6g3ZX7V0dGOYU+/BUoLeJGthjYuZ+Sg3 FkELD6kMq1HmnGch5v21VwSVmZUK1LPRF9VAghy9GdP9QYyiFjO34ASiQiB9/sJyenGt SHgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=leAjuo9QrYfGsQp+lWwGPaf44FJzdIsTdXXe6kBTcvQ=; b=eamgqNO8J4KBg/8pL12E2FWg8W9KMB95bPO3eGryrJzM8vT3r07jumt1RH9cuyut6i OevmK+pqnaq5qlzSb4QpUcvi60yrUQMMBNkZOb4vgUQeyiTogzle4nqF5S6AlGngx1ni Bj60PxOjPMR+IgEVTRbInzODWIIGeBrIcbw01U5q2jlzGyj34XMmw7jflcr+79NHVwH0 QgaCHdzGo7JsYNqQDmqLJ0TUz6VDyonHuVJTb5mkTEwMcmi+lsyKMc36SjJzQxQ5wCEh dwA5LSD3oWhFQ7hwKjZRRTjZUk4Vq72mbYrilvmnRxMGzPRfa+/swBpu05uVXg1EQuRr ++CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EwHFoY3n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n184si2660025pgn.399.2019.08.29.13.00.13; Thu, 29 Aug 2019 13:00:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EwHFoY3n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbfH2UAM (ORCPT + 28 others); Thu, 29 Aug 2019 16:00:12 -0400 Received: from mail-pf1-f182.google.com ([209.85.210.182]:36005 "EHLO mail-pf1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728107AbfH2UAI (ORCPT ); Thu, 29 Aug 2019 16:00:08 -0400 Received: by mail-pf1-f182.google.com with SMTP id w2so2807543pfi.3 for ; Thu, 29 Aug 2019 13:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=leAjuo9QrYfGsQp+lWwGPaf44FJzdIsTdXXe6kBTcvQ=; b=EwHFoY3nn78Ablhc+fvFTk63+ihmkRvuN2b9otTYYBLJ/20wMokgUtop/hP29hf8Ss JdtCG3A2s67swE9FFPf0Jn+PmiCySXAL8wwZW4h1dWPNwTUU0OJvimlv7euDgKnQOI0H dGcfTjNrOk+RUaAs/nmRNL6f5930YGwO+xPmerXZ3YLIx3T4GB15/JNvn/WKFJkiPNSh JSGhphPYJfykXMMRch+fpjVH5JYudf5o7RljVoXQc8rIl3R5Wt9ClH9N90i/eEYtQIfH U7UKjZIIr6lociKHiO8DTHScDkrVxuqSHtCT0pJuou4Ml1+ekF7rLvtgaf+1OlCmupbW YbfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=leAjuo9QrYfGsQp+lWwGPaf44FJzdIsTdXXe6kBTcvQ=; b=mjr0jH3vzG4w2RdS/zVFDfLTWVS2/DGFHViyxVkoiwQApPr1XdCUb6OyjswZzEyQHP IgEpVUTkWTDiAd70Jl7dzRmNpZoKibgg92NHKxIhUwPHnJL7t4Yyk/T+4USrE4mc+n3k tBnC1mU+f2napuhotSuB7CntXGNseh3Loe0Zj9y7CezF/IL06wQWjOlCihHUArfIo950 OqR1wAq7+3vqHssUJ6IosSGY0YqHdZaOuvhBiLwkw+UBQiU3lmTqVC+0/WnML/YNFW3W gBCRrk+jtAfLAloNzDY5ugxBETWHlpuYNa9tLvxdVI8pv2I6ADPYUn1G+OxiLIwQ8NLR HEZg== X-Gm-Message-State: APjAAAXNKiAC/XOCBWAu1svFH3G6Kr5KquaW89nQw3InPuJsDyCn8qqI ko6OoJKHTxVVCll0WZI17IS7Dw== X-Received: by 2002:a63:1f1b:: with SMTP id f27mr9740387pgf.233.1567108807182; Thu, 29 Aug 2019 13:00:07 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id u7sm3053766pgr.94.2019.08.29.13.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 13:00:06 -0700 (PDT) From: Mathieu Poirier To: stable@vger.kernel.org Cc: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, jsarha@ti.com, tomi.valkeinen@ti.com, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: [BACKPORT 4.19.y 2/3] scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value Date: Thu, 29 Aug 2019 14:00:00 -0600 Message-Id: <20190829200001.17092-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190829200001.17092-1-mathieu.poirier@linaro.org> References: <20190829200001.17092-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pedro Sousa commit ebcb8f8508c5edf428f52525cec74d28edea7bcb upstream Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9 according to MIPI Alliance MPHY specification. Fixes: e785060ea3a1 ("ufs: definitions for phy interface") Signed-off-by: Pedro Sousa Signed-off-by: Martin K. Petersen Signed-off-by: Mathieu Poirier --- drivers/scsi/ufs/unipro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h index 23129d7b2678..c77e36526447 100644 --- a/drivers/scsi/ufs/unipro.h +++ b/drivers/scsi/ufs/unipro.h @@ -52,7 +52,7 @@ #define RX_HS_UNTERMINATED_ENABLE 0x00A6 #define RX_ENTER_HIBERN8 0x00A7 #define RX_BYPASS_8B10B_ENABLE 0x00A8 -#define RX_TERMINATION_FORCE_ENABLE 0x0089 +#define RX_TERMINATION_FORCE_ENABLE 0x00A9 #define RX_MIN_ACTIVATETIME_CAPABILITY 0x008F #define RX_HIBERN8TIME_CAPABILITY 0x0092 #define RX_REFCLKFREQ 0x00EB From patchwork Thu Aug 29 20:00:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 172652 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2717772ily; Thu, 29 Aug 2019 13:00:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqymV0N8kyUGH+1um+QWHaGFEYGQobUrmu8gL5xq5gmppmZYatqb67vWNr3+gV1PrydBzVYJ X-Received: by 2002:a17:902:26f:: with SMTP id 102mr12159446plc.189.1567108812573; Thu, 29 Aug 2019 13:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567108812; cv=none; d=google.com; s=arc-20160816; b=z/I+C3bZ2Oe0QsrKqIMr/BU9iCv32K+enA0rNkEH3C6b0MYWaB2oJo/oXMV3NiNgQg h/q7rQS1lHoZBktVPYl/dfTRmvvRLXyGSnYFIY0u54zuFPdtcT/MiknCGfdu4ryw5b/2 R394CKHj+k0BnZOYBf2FYsKtbweq4CLthe1bN3nKcza5wgokUIo/MTxv8pyf0TbrjITo 8z9FYvlaPfvvjqOfSGBYSUcPNAt1DS+clqijIH8QuKzGos8ojfaWdg+HlXCKvV2XbS9+ GXpr+vrpK6LVeOKtxuY10GfxN/TWYXeL0CZZcwXbVb8+yU5KMqHshTYf3T+LndPMOb0D XmmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=LnwOSHW+qkIfwX+CEo6pre2vAtIHSJHM7Ipb0uTKcN8=; b=1KMhgf9YoHhQthIzXHuTvfJFWAwXUnWw7/lFBGX1N8Kq3WJJ/oShyxN+PFr4KnUXgX DZfzIRR9PqiPtFgtLh+DjH3OOG5yjYsviLylgekGR914q9/r3w70i12MosOltxGX1xLE irlNeOpaSXSo+RkQ+Kz0rn2kCrPNgoJErPf0cdn29Um83xzcVHq6EzyWWRMHqp3ZoWnI I7tbpAlOvmF7OnKGPYQdlbywVUyZplgq3xOPd/FuRq40DaiAsF4Ml1gII8c+B7cme/Nf XI2Dpxa4PLuORNwD/DpvtBRjBjb3JCIgb//1jiV7T0eE3mgksJKTZ7bieOBw35npPTQA Qxvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ljvhUTB5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184si3842299pfc.90.2019.08.29.13.00.12; Thu, 29 Aug 2019 13:00:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ljvhUTB5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728187AbfH2UAL (ORCPT + 28 others); Thu, 29 Aug 2019 16:00:11 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39964 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728116AbfH2UAJ (ORCPT ); Thu, 29 Aug 2019 16:00:09 -0400 Received: by mail-pl1-f193.google.com with SMTP id h3so2080447pls.7 for ; Thu, 29 Aug 2019 13:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LnwOSHW+qkIfwX+CEo6pre2vAtIHSJHM7Ipb0uTKcN8=; b=ljvhUTB5kgie6mZn/Katfok8X2WrFwgXFmGKAsJBCEExxJK+Nxf6/5JnDHhk1LxGzy GYRAppVUeZ1sd1GoWZIlw7jgdNHty21ipU5Xwbsjv2pDu76zTUuu2M0TYKjBIGiG+5/U z01+UGUU35QOWpFRzt7fPcfbQ99aFBb2fmxT0/oIwQsg9/ldDduJhzRqeDTeL/2cT+fn xZEkAhbQh16HdO3N3dLit2heuBIRhD2aWB6bocU4JidBTKhPZUvGLVHHMbcSP5Om8Rkn fjF4IfC7pe9zuVYT61BgDPYNoG1OUc1oLDYMoO1xaeTde3LKzueqjrs2vOyE7CXBh8Pc jvRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LnwOSHW+qkIfwX+CEo6pre2vAtIHSJHM7Ipb0uTKcN8=; b=joRug1EdC34Qk69nMtL1a3jtw1mgJspAXsmXppBagAssm8/ZHtcZ2gxr4Z3i7q3RYv q9HncXAGo8/MYjcYV0XUl+ndXVLjZCI072owmUzX9rimpPNqcaRYqTe6yFHpABXxNPt8 PjgvMWKoaVmb18d/2pq6qg0J/7mp2EhaMyTeVsCVFpfyo2dLRtB8kLwJ3cE5WRaE96u4 NcI/6P7PM1xKe4BSU1py9LHlDC11+hZh4KX4TAS5fOhubLCTcz6u79ZvhyXdo6x+sv14 HYbS8GZ6f9GtvUGOIykGUbAijWlgHXRVmfCuCX/stZxCgB47adGXWY36e04OYwVA6VNl biIA== X-Gm-Message-State: APjAAAVb82oCQTA1dAxgrDrbp4McdattkPqu1CpuuzQDRdq0ybimRW2v 1SbLKFWGmOu6NbNtcvJk/mOPCw== X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr12015218plp.245.1567108808730; Thu, 29 Aug 2019 13:00:08 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id u7sm3053766pgr.94.2019.08.29.13.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 13:00:08 -0700 (PDT) From: Mathieu Poirier To: stable@vger.kernel.org Cc: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, jsarha@ti.com, tomi.valkeinen@ti.com, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: [BACKPORT 4.19.y 3/3] drm/tilcdc: Register cpufreq notifier after we have initialized crtc Date: Thu, 29 Aug 2019 14:00:01 -0600 Message-Id: <20190829200001.17092-4-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190829200001.17092-1-mathieu.poirier@linaro.org> References: <20190829200001.17092-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jyri Sarha commit 432973fd3a20102840d5f7e61af9f1a03c217a4c upstream Register cpufreq notifier after we have initialized the crtc and unregister it before we remove the ctrc. Receiving a cpufreq notify without crtc causes a crash. Reported-by: Peter Ujfalusi Signed-off-by: Jyri Sarha Signed-off-by: Mathieu Poirier --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 0fb300d41a09..e1868776da25 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -184,6 +184,12 @@ static void tilcdc_fini(struct drm_device *dev) { struct tilcdc_drm_private *priv = dev->dev_private; +#ifdef CONFIG_CPU_FREQ + if (priv->freq_transition.notifier_call) + cpufreq_unregister_notifier(&priv->freq_transition, + CPUFREQ_TRANSITION_NOTIFIER); +#endif + if (priv->crtc) tilcdc_crtc_shutdown(priv->crtc); @@ -198,12 +204,6 @@ static void tilcdc_fini(struct drm_device *dev) drm_mode_config_cleanup(dev); tilcdc_remove_external_device(dev); -#ifdef CONFIG_CPU_FREQ - if (priv->freq_transition.notifier_call) - cpufreq_unregister_notifier(&priv->freq_transition, - CPUFREQ_TRANSITION_NOTIFIER); -#endif - if (priv->clk) clk_put(priv->clk); @@ -274,17 +274,6 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) goto init_failed; } -#ifdef CONFIG_CPU_FREQ - priv->freq_transition.notifier_call = cpufreq_transition; - ret = cpufreq_register_notifier(&priv->freq_transition, - CPUFREQ_TRANSITION_NOTIFIER); - if (ret) { - dev_err(dev, "failed to register cpufreq notifier\n"); - priv->freq_transition.notifier_call = NULL; - goto init_failed; - } -#endif - if (of_property_read_u32(node, "max-bandwidth", &priv->max_bandwidth)) priv->max_bandwidth = TILCDC_DEFAULT_MAX_BANDWIDTH; @@ -361,6 +350,17 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) } modeset_init(ddev); +#ifdef CONFIG_CPU_FREQ + priv->freq_transition.notifier_call = cpufreq_transition; + ret = cpufreq_register_notifier(&priv->freq_transition, + CPUFREQ_TRANSITION_NOTIFIER); + if (ret) { + dev_err(dev, "failed to register cpufreq notifier\n"); + priv->freq_transition.notifier_call = NULL; + goto init_failed; + } +#endif + if (priv->is_componentized) { ret = component_bind_all(dev, ddev); if (ret < 0)