From patchwork Tue Jul 20 15:33:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 481658 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 573BCC07E95 for ; Tue, 20 Jul 2021 15:45:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B3AD610CC for ; Tue, 20 Jul 2021 15:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238104AbhGTPEn (ORCPT ); Tue, 20 Jul 2021 11:04:43 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:34168 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241743AbhGTOxT (ORCPT ); Tue, 20 Jul 2021 10:53:19 -0400 Date: Tue, 20 Jul 2021 15:33:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1626795223; bh=a/cXIJple0tXhCo8wBmyM+liGV06lwy6xissR4KIOBE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=e5PSRNYVIfDTCyWKFDdtWRV/a1CHmQ6s52JrLyxXS9rbHzfboI5GOSvtNzvZnBWcV VCtwbsy8K5xipPFOva8gx7eiSn8BNhQ5xQQq5zzs6BlYwOF35MdXmrIdQsjpEhxOkH KUCJjs5/nplTVb5VpmyJpLmCUZSvkNe21BMEdoYo= To: Caleb Connolly From: Caleb Connolly Cc: Andy Gross , Bjorn Andersson , Rob Herring , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Reply-To: Caleb Connolly Subject: [PATCH 1/5] arm64: dts: qcom: sdm845-oneplus: fix reserved-mem Message-ID: <20210720153125.43389-2-caleb@connolly.tech> In-Reply-To: <20210720153125.43389-1-caleb@connolly.tech> References: <20210720153125.43389-1-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Fix the upper guard and the "removed_region", this fixes the random crashes which used to occur in memory intensive loads. I'm not sure WHY the upper guard being 0x2000 instead of 0x1000 doesn't fix this, but it HAS to be 0x1000. Signed-off-by: Caleb Connolly Fixes: e60fd5ac1f68 ("arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem") --- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.32.0 diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi index 4d052e39b348..eb6b1d15293d 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -69,7 +69,7 @@ rmtfs_mem: memory@f5b01000 { }; rmtfs_upper_guard: memory@f5d01000 { no-map; - reg = <0 0xf5d01000 0 0x2000>; + reg = <0 0xf5d01000 0 0x1000>; }; /* @@ -78,7 +78,7 @@ rmtfs_upper_guard: memory@f5d01000 { */ removed_region: memory@88f00000 { no-map; - reg = <0 0x88f00000 0 0x200000>; + reg = <0 0x88f00000 0 0x1c00000>; }; ramoops: ramoops@ac300000 { From patchwork Tue Jul 20 15:33:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 481657 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CB13C07E95 for ; Tue, 20 Jul 2021 15:46:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25D58610FB for ; Tue, 20 Jul 2021 15:46:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239729AbhGTPFK (ORCPT ); Tue, 20 Jul 2021 11:05:10 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:26743 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241745AbhGTOxZ (ORCPT ); Tue, 20 Jul 2021 10:53:25 -0400 Date: Tue, 20 Jul 2021 15:33:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1626795229; bh=d9Q3moj/2J34xlyehWoq/C7zP8ek1tDX6NiP55RbvIw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=Xg4qOYPUk793e8ucsxhhTPL54VmfiqV/0bzSeQbgFfxV8qKVM5NUA24rdBHPJ4e5Y AaGfTk2+TPzflGIxx6u7Ij+n1ruwAtqH0fHGQMD7onBeH5v7m0g34KQTLuSHtczYBI 0n95i5OOHJpze7akWJI1R8Gm0UHmMU53ssJeinMs= To: Caleb Connolly From: Caleb Connolly Cc: Andy Gross , Bjorn Andersson , Rob Herring , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Reply-To: Caleb Connolly Subject: [PATCH 3/5] drm/panel/samsung-sofef00: make gpio optional Message-ID: <20210720153125.43389-4-caleb@connolly.tech> In-Reply-To: <20210720153125.43389-1-caleb@connolly.tech> References: <20210720153125.43389-1-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The OnePlus 6T panel fails to initialise if it has been reset, workaround this by allowing panels to not specify a reset GPIO. Signed-off-by: Caleb Connolly --- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.32.0 diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/drm/panel/panel-samsung-sofef00.c index 8cb1853574bb..a20a5af14653 100644 --- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c +++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c @@ -44,6 +44,8 @@ struct sofef00_panel *to_sofef00_panel(struct drm_panel *panel) static void sofef00_panel_reset(struct sofef00_panel *ctx) { + if (!ctx->reset_gpio) + return; gpiod_set_value_cansleep(ctx->reset_gpio, 0); usleep_range(5000, 6000); gpiod_set_value_cansleep(ctx->reset_gpio, 1); @@ -137,7 +139,8 @@ static int sofef00_panel_prepare(struct drm_panel *panel) ret = sofef00_panel_on(ctx); if (ret < 0) { dev_err(dev, "Failed to initialize panel: %d\n", ret); - gpiod_set_value_cansleep(ctx->reset_gpio, 1); + if (ctx->reset_gpio) + gpiod_set_value_cansleep(ctx->reset_gpio, 1); return ret; } @@ -276,7 +279,7 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi) return ret; } - ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); + ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) { ret = PTR_ERR(ctx->reset_gpio); dev_warn(dev, "Failed to get reset-gpios: %d\n", ret); From patchwork Tue Jul 20 15:33:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 481656 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF355C636C8 for ; Tue, 20 Jul 2021 15:46:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C97DF610FB for ; Tue, 20 Jul 2021 15:46:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239389AbhGTPFd (ORCPT ); Tue, 20 Jul 2021 11:05:33 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:41322 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239778AbhGTOyC (ORCPT ); Tue, 20 Jul 2021 10:54:02 -0400 Date: Tue, 20 Jul 2021 15:33:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1626795236; bh=XWgo5tzaR5dmJQplOfD1SfTmwFn2t+d0+Cn+rl7ZkEo=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=I/jQhWaiRYOBhX65293I4SO7cFOCf3VqEs634mhUEWvyxZI2N9r7KjC2Mxpk7JfNK EN1eK3EL4BZNNquIqq56sPwVO4JXRYbdO8mQIbs+VWNJNhgvIwA39NTbUbHmZnrUHA PiZQydfaHHxaejppVYrNrkEF7tNXyNExIFclGsnY= To: Caleb Connolly From: Caleb Connolly Cc: Andy Gross , Bjorn Andersson , Rob Herring , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Reply-To: Caleb Connolly Subject: [PATCH 4/5] arm64: dts: qcom: sdm845-oneplus-fajita: remove panel reset gpio Message-ID: <20210720153125.43389-5-caleb@connolly.tech> In-Reply-To: <20210720153125.43389-1-caleb@connolly.tech> References: <20210720153125.43389-1-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Don't specify the reset GPIO for the OnePlus 6T, the panel in the 6T will refuse to initialise if it has been reset so use this as a workaround. Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 +--- arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.32.0 diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi index e81f5cc9f26d..1339bac8afc2 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -331,8 +331,6 @@ display_panel: panel@0 { vddio-supply = <&vreg_l14a_1p88>; - reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>; @@ -615,7 +613,7 @@ mux { pins = "gpio6", "gpio25", "gpio26"; function = "gpio"; drive-strength = <8>; - bias-disable = <0>; + bias-disable; }; }; diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts b/arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts index 72842c887617..5c728c1555f3 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts @@ -16,4 +16,6 @@ &display_panel { status = "okay"; compatible = "samsung,sofef00"; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>; };