From 71dcda616be3c388f08616e9e87ba2c9316afdcf Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 17 Oct 2018 09:14:49 +0100 Subject: [PATCH] Fixes to Rock960 series of devices, Raspberry Pi graphics fix --- arm64-96boards-Rock960-CE-board-support.patch | 139 ++++++++++++++++++ ...et-is_yuv-to-false-when-num_planes-1.patch | 40 +++++ kernel.spec | 6 + 3 files changed, 185 insertions(+) create mode 100644 bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch diff --git a/arm64-96boards-Rock960-CE-board-support.patch b/arm64-96boards-Rock960-CE-board-support.patch index ee1fef5ec..1d08debaa 100644 --- a/arm64-96boards-Rock960-CE-board-support.patch +++ b/arm64-96boards-Rock960-CE-board-support.patch @@ -1657,3 +1657,142 @@ index 5a5d8e28ef55..f68254831ad9 100644 disable-wp; sd-uhs-sdr104; vqmmc-supply = <&vcc_sd>; +From patchwork Tue Oct 16 14:00:20 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Lezcano +X-Patchwork-Id: 1000432 +Return-Path: +Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) + by smtp.lore.kernel.org (Postfix) with ESMTP id 41BB8C04EBD + for ; Tue, 16 Oct 2018 14:01:24 +0000 (UTC) +Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) + by mail.kernel.org (Postfix) with ESMTP id 032862089E + for ; Tue, 16 Oct 2018 14:01:24 +0000 (UTC) +Authentication-Results: mail.kernel.org; + dkim=pass (1024-bit key) header.d=linaro.org header.i=@linaro.org + header.b="OwrJnI6D" +DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 032862089E +Authentication-Results: mail.kernel.org; + dmarc=fail (p=none dis=none) header.from=linaro.org +Authentication-Results: mail.kernel.org; + spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org +Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand + id S1727241AbeJPVv6 (ORCPT + ); + Tue, 16 Oct 2018 17:51:58 -0400 +Received: from mail-wr1-f68.google.com ([209.85.221.68]:43800 "EHLO + mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org + with ESMTP id S1727149AbeJPVv6 (ORCPT + ); + Tue, 16 Oct 2018 17:51:58 -0400 +Received: by mail-wr1-f68.google.com with SMTP id n1-v6so25672615wrt.10 + for ; + Tue, 16 Oct 2018 07:01:21 -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; + bh=AyjUgKMFmAFThaK4GvWsdrdl4JZ3kTa6zVPrOmGMjOA=; + b=OwrJnI6D/huHRM5jiagiGiKBxUHFUlMvwe1t2GexoIKOTqtFGY3vwPCkrAUWdnT5+f + n+wvqEq+enR14QpmLTY3VNYAsxMcDtJOZ2R2Cw0rRdiHypMeUGRanfszUimV9omTlSGH + ApMgMERT+Pim+X1tp/uH775sDaVLHsJDyJb2Y= +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; + bh=AyjUgKMFmAFThaK4GvWsdrdl4JZ3kTa6zVPrOmGMjOA=; + b=DO/kT4iXCQgCsPC53FV7CMKKHaDQNQtZUIfHfJGQ2iRgCRNsZSYU6JYHxxjsqWSLyq + c46PNGLDG4qPZf/tveVt9wc9SPdKTk3klyT5NnQvdlNY8uv5/GTXINOWmNE0xD9hqvaP + ml6yJRUA51/KJU73p7XhGvWlMmEuStLUtXa4rlqKgush6lllYhSFpca2xkiKFhqcd+Bc + HHXRh2i0OVgTdmdb0+lSKyLXm74UHrhv1WEbgjGm+Mharwz/qsidTCXfqKPC7izgstBS + L+mjOACqna60eEsABW/p2nH9vxXAsU2ArAnmB714yeh9uckl1uRzYmMQCSD1LmmBN0q4 + 4UvQ== +X-Gm-Message-State: ABuFfojBZLkXjdlBc4AIjobar5Yk+68lR2+TEpPVGjsScLNzcmIj5eYO + yyEhPWYj3vc1MHjUcMfQLt7ahg== +X-Google-Smtp-Source: + ACcGV614RNSZy+OjIvsEaE9ONlZaDAeI1a8EpD+wP5Gt58g75Bh8DJgL6KJJ2ZjTenoZPwHLydiQBg== +X-Received: by 2002:adf:cd0c:: with SMTP id + w12-v6mr19534363wrm.67.1539698480294; + Tue, 16 Oct 2018 07:01:20 -0700 (PDT) +Received: from localhost.localdomain (221.56.88.92.rev.sfr.net. + [92.88.56.221]) + by smtp.gmail.com with ESMTPSA id + b81-v6sm10195012wmh.47.2018.10.16.07.01.18 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); + Tue, 16 Oct 2018 07:01:19 -0700 (PDT) +From: Daniel Lezcano +To: heiko@sntech.de +Cc: linux-kernel@vger.kernel.org, Rob Herring , + Mark Rutland , + Vicente Bergas , + Shawn Lin , + Ezequiel Garcia , + Enric Balletbo i Serra , + Manivannan Sadhasivam , + devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED + DEVICE TREE BINDINGS), + linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC + support), + linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC + support) +Subject: [PATCH] DT: rockchip: Fix stability issues with the 'performance' + governor on rock960 +Date: Tue, 16 Oct 2018 16:00:20 +0200 +Message-Id: <1539698431-12616-1-git-send-email-daniel.lezcano@linaro.org> +X-Mailer: git-send-email 2.7.4 +Sender: linux-kernel-owner@vger.kernel.org +Precedence: bulk +List-ID: +X-Mailing-List: linux-kernel@vger.kernel.org + +When the performance governor is set as default, the rock960 hangs +around one minute after booting, whatever the activity is (idle, key +pressed, loaded, ...). + +Based on the commit log found at https://patchwork.kernel.org/patch/10092377/ + +"vdd_log has no consumer and therefore will not be set to a specific +voltage. Still the PWM output pin gets configured and thence the vdd_log +output voltage will changed from it's default. Depending on the idle +state of the PWM this will slightly over or undervoltage the logic supply +of the RK3399 and cause instability with GbE (undervoltage) and PCIe +(overvoltage). Since the default value set by a voltage divider is the +correct supply voltage and we don't need to change it during runtime we +remove the rail from the devicetree completely so the PWM pin will not +be configured." + +After removing the vdd-log from the rock960's specific DT, the board +does no longer hang and shows a stable behavior. + +Apply the same change for the rock960 by removing the vdd-log from the +DT. + +Signed-off-by: Daniel Lezcano +Tested-by: Manivannan Sadhasivam +--- + arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +index 6c8c4ab..56abbb0 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +@@ -57,18 +57,6 @@ + regulator-always-on; + vin-supply = <&vcc_sys>; + }; +- +- vdd_log: vdd-log { +- compatible = "pwm-regulator"; +- pwms = <&pwm2 0 25000 0>; +- regulator-name = "vdd_log"; +- regulator-min-microvolt = <800000>; +- regulator-max-microvolt = <1400000>; +- regulator-always-on; +- regulator-boot-on; +- vin-supply = <&vcc_sys>; +- }; +- + }; + + &cpu_l0 { diff --git a/bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch b/bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch new file mode 100644 index 000000000..5aa9668bc --- /dev/null +++ b/bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch @@ -0,0 +1,40 @@ +From patchwork Tue Oct 9 13:24:46 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: drm/vc4: Set ->is_yuv to false when num_planes == 1 +From: Boris Brezillon +X-Patchwork-Id: 255528 +Message-Id: <20181009132446.21960-1-boris.brezillon@bootlin.com> +To: David Airlie , Daniel Vetter , + dri-devel@lists.freedesktop.org, Eric Anholt +Cc: Boris Brezillon , stable@vger.kernel.org +Date: Tue, 9 Oct 2018 15:24:46 +0200 + +When vc4_plane_state is duplicated ->is_yuv is left assigned to its +previous value, and we never set it back to false when switching to +a non-YUV format. + +Fix that by setting ->is_yuv to false in the 'num_planes == 1' branch +of the vc4_plane_setup_clipping_and_scaling() function. + +Fixes: fc04023fafecf ("drm/vc4: Add support for YUV planes.") +Cc: +Signed-off-by: Boris Brezillon +Reviewed-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_plane.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index d04b3c3246ba..60d5ad19cedd 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -321,6 +321,7 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + if (vc4_state->is_unity) + vc4_state->x_scaling[0] = VC4_SCALING_PPF; + } else { ++ vc4_state->is_yuv = false; + vc4_state->x_scaling[1] = VC4_SCALING_NONE; + vc4_state->y_scaling[1] = VC4_SCALING_NONE; + } diff --git a/kernel.spec b/kernel.spec index bba3b411e..b7fabdc7d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -595,6 +595,8 @@ Patch310: gpio-pxa-handle-corner-case-of-unprobed-device.patch Patch330: bcm2835-cpufreq-add-CPU-frequency-control-driver.patch +Patch331: bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch + # Patches enabling device specific brcm firmware nvram # https://www.spinics.net/lists/linux-wireless/msg178827.html Patch340: brcmfmac-Remove-firmware-loading-code-duplication.patch @@ -1885,6 +1887,10 @@ fi # # %changelog +* Tue Oct 16 2018 Peter Robinson +- Fixes to Rock960 series of devices, improves stability considerably +- Raspberry Pi graphics fix + * Tue Oct 16 2018 Jeremy Cline - 4.19.0-0.rc8.git1.1 - Linux v4.19-rc8-11-gb955a910d7fd - Re-enable debugging options.