From patchwork Fri Apr 19 08:32:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 10910077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85EAF13B5 for ; Sat, 20 Apr 2019 08:47:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 767B9288AD for ; Sat, 20 Apr 2019 08:47:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A43228AAC; Sat, 20 Apr 2019 08:47:42 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 287B1288AD for ; Sat, 20 Apr 2019 08:47:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5120A8926E; Sat, 20 Apr 2019 08:47:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 068748920D for ; Fri, 19 Apr 2019 08:35:05 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id y197so5678990wmd.0 for ; Fri, 19 Apr 2019 01:35:05 -0700 (PDT) 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=MCTEvmabwYzI3ci+NujQrB/hypflAW8OQ75e8/ggXfk=; b=Nt/WOZBRbxo1lbRkwB5wxZfMMwOEegZ/HFW7nRipRy5BaUnLFdLFw0DWUHsJIEQUov ufgUgcAulmKcmzooSL9MwtR87nMy8s7LbJ2abjWCmo8Jax/od1V4pj0E93dwduDoTy4H uPG4JCxdtNYEgKPFgX8+10r8P/MuqoOtzXe2Rg28De8VaKKmNiBCUulLv8T7E3CC1RZd qF/wz+lUQCKRn3vJx14a4sUr+HjpbT7Nn4FS3LgqTN5V1rAx4VMiZRe7p6XkgusI8AMD KXd5gcNicy7zB3MA0kjvbi04vRy3EPmDSMrW8mdtPUWoN1MWAYp12HmZXpAq6WMpWMfr tETg== X-Gm-Message-State: APjAAAWdefIuuwD1berV0/ENeOWiag70IfcRqBIBBK2VNi5LbbY8h7fu SJ6FAhx8AsJ1pL6FqeTQThEFpw== X-Google-Smtp-Source: APXvYqz4to8wAVskrNWhKtpXeo1y+/84uKbi75fWJa+XAgG68NFzqtWiTfz7vu78hoCS57ktmCjphQ== X-Received: by 2002:a1c:6502:: with SMTP id z2mr1745391wmb.119.1555662904613; Fri, 19 Apr 2019 01:35:04 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id t76sm5700147wmt.8.2019.04.19.01.35.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 01:35:03 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de, xuwei5@hisilicon.com, mturquette@baylibre.com, sboyd@kernel.org, yuq825@gmail.com Subject: [PATCH v2 1/6] dt-bindings: gpu: mali-utgard: add hisilicon, hi6220-mali compatible Date: Fri, 19 Apr 2019 09:32:56 +0100 Message-Id: <1555662781-22570-2-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> References: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Sat, 20 Apr 2019 08:47:32 +0000 X-Mailman-Original-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=MCTEvmabwYzI3ci+NujQrB/hypflAW8OQ75e8/ggXfk=; b=MmDEdzRcl9DaSM0D19sHLRP9UUgUb3DU9U/mKJ4uV0lViP+8Df/cara5+dwmvId2vi WCLQOT1S9LX6lveDGKTjokIESoUs5zV+Yvi2kw6zAVVXQxJinyhsP81cBiz3+fbe0KXq ib3QilCDqnukXnjqqNJxDG7lbKiTmelD2kCgZCXW6E3bamJvWp+dJHAKTUt9EIDg5PJO AsDxgXHM9sRx+3nZAzUT1J9faizEapC+cpYUkDdC4uGnPeBtXmOu2wab7KpbQzOGQDRM YwN/fvrXryGp/kH7lktMqf7IosiwgS0IQxI/hbqoi3Y+bV/6gjxR+f9ffx6d6suPdsih gDBw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The Hisilicon hi6220 uses a Mali-450MP4 with 4 PPs, so add a compatible for it. Signed-off-by: Peter Griffin Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt index 3f128e4..2a16b0c 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt @@ -21,6 +21,7 @@ Required properties: + rockchip,rk3228-mali + rockchip,rk3328-mali + stericsson,db8500-mali + + hisilicon,hi6220-mali - reg: Physical base address and length of the GPU registers @@ -91,6 +92,10 @@ to specify one more vendor-specific compatible, among: * interrupt-names and interrupts: + combined: combined interrupt of all of the above lines + - hisilicon,hi6220-mali + Required properties: + * resets: phandles to the reset lines for the GPU + Example: mali: gpu@1c40000 { From patchwork Fri Apr 19 08:32:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 10910083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A354813B5 for ; Sat, 20 Apr 2019 08:47:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95C2828A96 for ; Sat, 20 Apr 2019 08:47:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A63028D3B; Sat, 20 Apr 2019 08:47:51 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 4A60E28A96 for ; Sat, 20 Apr 2019 08:47:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 683108929B; Sat, 20 Apr 2019 08:47:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3AF068920D for ; Fri, 19 Apr 2019 08:35:07 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id c1so5482276wml.4 for ; Fri, 19 Apr 2019 01:35:07 -0700 (PDT) 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=R+rJiqbMseAY0oDXLdqiRPHEvayMMhzkPPex8gF7dgU=; b=Xn8XJCiI4Fwd+EEQmzbzuc6mVtoC3afOMZ4AfCE8ZKg3DrhTFcTbHepjxLlm7ASmOR 67vhTSqcjWgIk3N0kqIKQuRHD09qS66jPxfacAthXZijYW7k9hs/yH1Rpz2YK0kVlSJP odpbtI06qJWWsf20BC5TGeKrJAnKx2aId7s8CpwzMapAYqX+SwYKN3sSu0CsD2g57puS Mw87VtUZDx493Rfn5/pTN/k1I00Dyc2aqCRU0ApzpGRYwIQR9xKwieLHKaGcUJnSefec 7S0g1OjL0rf+78SijiFfLBCxZKxXjCNQ7nhZx2YNeqErfqdjIQqWwbubx3KXUKA8n4r1 F5UQ== X-Gm-Message-State: APjAAAWpOmJ4xCGDDyxcSuLOBcShBDNat6yKWoPqXgowZpd6VdUqc14Z ROtpM+MiZNJbFC7ZgL+aUCcYOg== X-Google-Smtp-Source: APXvYqycZRtZ6ywKlVhqIl1XavT+h5aoAdbNM/r1Isv8aFT4FLSgI+SBf0CB7Z37wYaGSWHsx0OiDw== X-Received: by 2002:a7b:cd93:: with SMTP id y19mr1774612wmj.113.1555662905852; Fri, 19 Apr 2019 01:35:05 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id t76sm5700147wmt.8.2019.04.19.01.35.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 01:35:05 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de, xuwei5@hisilicon.com, mturquette@baylibre.com, sboyd@kernel.org, yuq825@gmail.com Subject: [PATCH v2 2/6] dt-bindings: reset: hisilicon: Update compatible documentation Date: Fri, 19 Apr 2019 09:32:57 +0100 Message-Id: <1555662781-22570-3-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> References: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Sat, 20 Apr 2019 08:47:32 +0000 X-Mailman-Original-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=R+rJiqbMseAY0oDXLdqiRPHEvayMMhzkPPex8gF7dgU=; b=QfQHEsBYJGmCfbvCkQEdvF68c++DOn6w/o7o8GEiyXAig9Z+9m7DaMhcsQKntFtYnB 1+dBWaFYLD0GEfWl3RCAhiTptjg6gq0YiusIgprGi0HFOx2851ocy0FX3xae7WuqS/ed 89IgUPQtsujhvnlMzV/nwNJcdUnDyQ7uXy6pnZw51MxGTen/iof4K2N3blkitkAeyZoE 9khDqmN2DOxwZrKpMp8Dg5hq37d3r5eoE8OIubk85T/ngEImrFPy/BpUT948YmZNhfZ9 946tDcmUur+xy03c6QDgSIFTZp8g/+uJT1C3C56JdVClCR22iQH1AkRvuGjs+NG/F4AS DbRg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The reset driver now supports the ao reset controller, so update the documentation to match. Signed-off-by: Peter Griffin Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt index c25da39..ea0a6a9 100644 --- a/Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt +++ b/Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt @@ -11,6 +11,7 @@ Required properties: - compatible: should be one of the following: - "hisilicon,hi6220-sysctrl", "syscon" : For peripheral reset controller. - "hisilicon,hi6220-mediactrl", "syscon" : For media reset controller. + - "hisilicon,hi6220-aoctrl", "syscon" : For ao reset controller. - reg: should be register base and length as documented in the datasheet - #reset-cells: 1, see below From patchwork Fri Apr 19 08:32:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 10910081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB0771515 for ; Sat, 20 Apr 2019 08:47:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C084288AD for ; Sat, 20 Apr 2019 08:47:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F99628AAC; Sat, 20 Apr 2019 08:47:47 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 4AD56288AD for ; Sat, 20 Apr 2019 08:47:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 673478928D; Sat, 20 Apr 2019 08:47:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73FFF8920D for ; Fri, 19 Apr 2019 08:35:08 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id y197so5679102wmd.0 for ; Fri, 19 Apr 2019 01:35:08 -0700 (PDT) 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=U+1RhXgibSnIdgZgBtIFJvFDwIprDWg0GFwO76wEX90=; b=kpQln27J4bEx0Dxbb2ecHe9VZdC0HmESMBNJ4hKaPgLpzmIS86EA2h5clWtHysKoAj 0cssv6fNfsyhyYbLAoDb8YYy1JED1vvIa9uh7REhimc+xWMNIKN/sZCCSDEOQZXTc1af +JtxEtLK7hxuO5HvYMUxdEDSf08UQ4zgI+Ic8I0BDQtSbbALEuh5iJN5iWS/0jrvkQ/2 4RnWPafLJynvBenyZ5e+aeJI/0hOH/U2noUGzyCz/iUlBi7gjzZRPY8nIddehmyrS1mY n69wuPXD2lRqtVjoZf3rvGHx0GAAC13OkKapW9Y7rJK/Q2YwZARQYb754VBX+C31sJJs v5bg== X-Gm-Message-State: APjAAAXg2ESVvTz5gKdTUp1vMYb1343u5OAkSBKlIllhuBPMJe8atLhY X57oBFX0IPtxNMoK37JhpC3coA== X-Google-Smtp-Source: APXvYqxGOL6NBipSMdJ5FdFtE7FShaEaFP4/LYJ8fD6dQ5oq2G5QK8hZF07N9rHyxM4oFFuBMdlMkQ== X-Received: by 2002:a1c:c910:: with SMTP id f16mr1753287wmb.47.1555662907167; Fri, 19 Apr 2019 01:35:07 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id t76sm5700147wmt.8.2019.04.19.01.35.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 01:35:06 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de, xuwei5@hisilicon.com, mturquette@baylibre.com, sboyd@kernel.org, yuq825@gmail.com Subject: [PATCH v2 3/6] arm64: dts: hisilicon: Add Mali-450 MP4 GPU DT entry Date: Fri, 19 Apr 2019 09:32:58 +0100 Message-Id: <1555662781-22570-4-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> References: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Sat, 20 Apr 2019 08:47:32 +0000 X-Mailman-Original-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=U+1RhXgibSnIdgZgBtIFJvFDwIprDWg0GFwO76wEX90=; b=ggTiLMIo2MMiAErRNCHRkXFT4doB1OuzZsQ3lhdY35FZ7JO88Z/8xWeE27m/Z/BcJz 8TfOXyjmmYMTJBU9qzBMD0PabNOWATKdkLUA6QE3y9jgPqHLf67+CW48qTYM/3PsSNot YHh8+I8S/K643QlO7BGUnT/iKRlc6CcfpjK+adXPACUvXYEZtNePPOYq/S9AeesFB7Uj ieWoZB3rS69TZejgh8hnIyW8ykUqdVqaXUdqpmFCdKkY0RUe7IYRc3OEQdFkfY58aBeQ 8Rg5rSUD1fXBjE0X5ecd4e3AJ9dvUi3/xyRBXqa9nSAK35ZFcD80YCHW6rIlm2045Ux8 8taA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP hi6220 has a Mali450 MP4 so lets add it into the DT. Signed-off-by: Peter Griffin --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index aec9e37..2defc19 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -1019,6 +1019,43 @@ clock-names = "apb_pclk"; cpu = <&cpu7>; }; + + mali: gpu@f4080000 { + compatible = "hisilicon,hi6220-mali", "arm,mali-450"; + reg = <0x0 0xf4080000 0x0 0x00040000>; + interrupt-parent = <&gic>; + interrupts = , + , + , + , + , + , + , + , + , + , + ; + + interrupt-names = "gp", + "gpmmu", + "pp", + "pp0", + "ppmmu0", + "pp1", + "ppmmu1", + "pp2", + "ppmmu2", + "pp3", + "ppmmu3"; + clocks = <&media_ctrl HI6220_G3D_CLK>, + <&media_ctrl HI6220_G3D_PCLK>; + clock-names = "core", "bus"; + assigned-clocks = <&media_ctrl HI6220_G3D_CLK>, + <&media_ctrl HI6220_G3D_PCLK>; + assigned-clock-rates = <500000000>, <144000000>; + reset-names = "ao_g3d", "media_g3d"; + resets = <&ao_ctrl AO_G3D>, <&media_ctrl MEDIA_G3D>; + }; }; }; From patchwork Fri Apr 19 08:32:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 10910075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B521F13B5 for ; Sat, 20 Apr 2019 08:47:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5C2A288AD for ; Sat, 20 Apr 2019 08:47:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9933428AAC; Sat, 20 Apr 2019 08:47:40 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 33901288AD for ; Sat, 20 Apr 2019 08:47:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F04E89269; Sat, 20 Apr 2019 08:47:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34D188920F for ; Fri, 19 Apr 2019 08:35:10 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id h18so5677168wml.1 for ; Fri, 19 Apr 2019 01:35:10 -0700 (PDT) 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=ynOU9D+n/C593aR3+aH7h2j53IirX4AgmFGNr7usCrU=; b=THUJiIxtbadlCIOzubc38pqKGLdnOCbJcjptyDB4UmSS+V2XICeggwhNeGSEyXIRDq 795+KdwD57psoVgs83l4j74HY9iQ/sOVt1JrD6OAE63ZUKrdiMioITJ5tcvvvp4OBSua LON9MCXZkebAB1YskuYdok2V+N0yDkr2bs7wyvGl5ONUQkwFjb8jWwcAmi3G31eQithm k7uyxKek96RqT7slukmhLMwKsLQxQeCQIYcMGx4ZyRpc97Kg/YyE91Y8X7QJBP6muhaQ W4Si+67vKtMDxhiwCapTseWpa0GqZ62C0Z0kAoEbh8EobOnsAHlmV+m3jj/bWMZpiCkD DmRA== X-Gm-Message-State: APjAAAXcoioBAgqxswZ0VcwikSwaD+yY8kEV5vp+h7dhRmrn9ufCt/z5 2FFKDYKUO8MObv/6Iy20xXQmAg== X-Google-Smtp-Source: APXvYqwekbzTNrsULQwgq7khMJrLh4Cfn1gRnNMNgYqnDRCzpvEUs6iMH0O5C23PtZ6RMMJEoHncBA== X-Received: by 2002:a1c:f606:: with SMTP id w6mr1732536wmc.130.1555662908388; Fri, 19 Apr 2019 01:35:08 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id t76sm5700147wmt.8.2019.04.19.01.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 01:35:07 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de, xuwei5@hisilicon.com, mturquette@baylibre.com, sboyd@kernel.org, yuq825@gmail.com Subject: [PATCH v2 4/6] reset: hi6220: Add support for AO reset controller Date: Fri, 19 Apr 2019 09:32:59 +0100 Message-Id: <1555662781-22570-5-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> References: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Sat, 20 Apr 2019 08:47:32 +0000 X-Mailman-Original-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=ynOU9D+n/C593aR3+aH7h2j53IirX4AgmFGNr7usCrU=; b=byTpf8QoDgheP4OH2aYrCTOxGGLrxTH10MiS0MadOR04anYnsYV3eXcz0Z5yIL4hMc cUB8UgQcoNVUgO+CYC4mDqDAioM40IiIwGUvTWVLmzmZOr+vi0a6LMpnh3AHazSm8/BC shZvT217NUTHxY/C41qd7v80EyDpr8ENIJLNeOga9H2B+XK1lPVehRNZMF1IB//lma7l Ye8SjgV9UqExN8kwh4cifc9xHyEAeftkvfDLQ5IMH4LiKafv+fcC6Ur6nRmLa7Jxcut0 gQ0XYpGIok5VuoWE0nNo60Oc9kVhI+ilYcYNoTeYTfhVDS6KPMLx0Z87s9LzvLM4uL+0 VB2A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is required to bring Mali450 gpu out of reset. Also we now use CLK_OF_DECLARE_DRIVER to probe in both the clock and reset drivers. The clock and reset parts have been done as one atomic commit to avoid a bisection hole. Signed-off-by: Peter Griffin Cc: Stephen Boyd --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 + drivers/clk/hisilicon/clk-hi6220.c | 3 +- drivers/reset/hisilicon/hi6220_reset.c | 65 ++++++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 2defc19..66a3746 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -260,6 +260,7 @@ compatible = "hisilicon,hi6220-aoctrl", "syscon"; reg = <0x0 0xf7800000 0x0 0x2000>; #clock-cells = <1>; + #reset-cells = <1>; }; sys_ctrl: sys_ctrl@f7030000 { diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/clk-hi6220.c index a87809d..3dde9d3 100644 --- a/drivers/clk/hisilicon/clk-hi6220.c +++ b/drivers/clk/hisilicon/clk-hi6220.c @@ -89,8 +89,9 @@ static void __init hi6220_clk_ao_init(struct device_node *np) hisi_clk_register_gate_sep(hi6220_separated_gate_clks_ao, ARRAY_SIZE(hi6220_separated_gate_clks_ao), clk_data_ao); } -CLK_OF_DECLARE(hi6220_clk_ao, "hisilicon,hi6220-aoctrl", hi6220_clk_ao_init); +/* reset driver also probes and uses these registers */ +CLK_OF_DECLARE_DRIVER(hi6220_clk_ao, "hisilicon,hi6220-aoctrl", hi6220_clk_ao_init); /* clocks in sysctrl */ static const char *mmc0_mux0_p[] __initdata = { "pll_ddr_gate", "syspll", }; diff --git a/drivers/reset/hisilicon/hi6220_reset.c b/drivers/reset/hisilicon/hi6220_reset.c index d5e5229..ccd5e0a 100644 --- a/drivers/reset/hisilicon/hi6220_reset.c +++ b/drivers/reset/hisilicon/hi6220_reset.c @@ -36,6 +36,7 @@ enum hi6220_reset_ctrl_type { PERIPHERAL, MEDIA, + AO, }; struct hi6220_reset_data { @@ -95,6 +96,61 @@ static const struct reset_control_ops hi6220_media_reset_ops = { .deassert = hi6220_media_deassert, }; +#define AO_SCTRL_SC_PW_CLKEN0 0x800 +#define AO_SCTRL_SC_PW_CLKDIS0 0x804 + +#define AO_SCTRL_SC_PW_RSTEN0 0x810 +#define AO_SCTRL_SC_PW_RSTDIS0 0x814 + +#define AO_SCTRL_SC_PW_ISOEN0 0x820 +#define AO_SCTRL_SC_PW_ISODIS0 0x824 +#define AO_MAX_INDEX 12 + +static int hi6220_ao_assert(struct reset_controller_dev *rc_dev, + unsigned long idx) +{ + struct hi6220_reset_data *data = to_reset_data(rc_dev); + struct regmap *regmap = data->regmap; + int ret; + + ret = regmap_write(regmap, AO_SCTRL_SC_PW_RSTEN0, BIT(idx)); + if (ret) + return ret; + + ret = regmap_write(regmap, AO_SCTRL_SC_PW_ISOEN0, BIT(idx)); + if (ret) + return ret; + + ret = regmap_write(regmap, AO_SCTRL_SC_PW_CLKDIS0, BIT(idx)); + if (ret) + return ret; +} + +static int hi6220_ao_deassert(struct reset_controller_dev *rc_dev, + unsigned long idx) +{ + struct hi6220_reset_data *data = to_reset_data(rc_dev); + struct regmap *regmap = data->regmap; + int ret; + + ret = regmap_write(regmap, AO_SCTRL_SC_PW_RSTDIS0, BIT(idx)); + if (ret) + return ret; + + ret = regmap_write(regmap, AO_SCTRL_SC_PW_ISODIS0, BIT(idx)); + if (ret) + return ret; + + ret = regmap_write(regmap, AO_SCTRL_SC_PW_CLKEN0, BIT(idx)); + if (ret) + return ret; +} + +static const struct reset_control_ops hi6220_ao_reset_ops = { + .assert = hi6220_ao_assert, + .deassert = hi6220_ao_deassert, +}; + static int hi6220_reset_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; @@ -120,9 +176,12 @@ static int hi6220_reset_probe(struct platform_device *pdev) if (type == MEDIA) { data->rc_dev.ops = &hi6220_media_reset_ops; data->rc_dev.nr_resets = MEDIA_MAX_INDEX; - } else { + } else if (type == PERIPHERAL) { data->rc_dev.ops = &hi6220_peripheral_reset_ops; data->rc_dev.nr_resets = PERIPH_MAX_INDEX; + } else { + data->rc_dev.ops = &hi6220_ao_reset_ops; + data->rc_dev.nr_resets = AO_MAX_INDEX; } return reset_controller_register(&data->rc_dev); @@ -137,6 +196,10 @@ static const struct of_device_id hi6220_reset_match[] = { .compatible = "hisilicon,hi6220-mediactrl", .data = (void *)MEDIA, }, + { + .compatible = "hisilicon,hi6220-aoctrl", + .data = (void *)AO, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, hi6220_reset_match); From patchwork Fri Apr 19 08:33:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 10910073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA57A1515 for ; Sat, 20 Apr 2019 08:47:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3AFF288AD for ; Sat, 20 Apr 2019 08:47:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D66F28AAC; Sat, 20 Apr 2019 08:47:36 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 77835288AD for ; Sat, 20 Apr 2019 08:47:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C204789264; Sat, 20 Apr 2019 08:47:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id D30F88920F for ; Fri, 19 Apr 2019 08:35:10 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id w15so5673585wmc.3 for ; Fri, 19 Apr 2019 01:35:10 -0700 (PDT) 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=WzKNBO96cllaDZYht9HJ/bZN1iAt8AGESvlKduBe/SY=; b=cPEkav4vqSWWqwHwbskqUE0Ibq+5ypOLn4Kf/GzV7UPrtUOefQcfjy/Pogat82fuS/ uJ5iz5vwoo7aDIXr3+bYUSnKhr6BHfOZLCrw3haklNL4+MXOlWzrq8bIS5DSfwXy9MiJ 53mXxmScNiXXLHPODMqzCecWpU+UCToi7aHSIQEc9ZuOwV8BkTM03rhxhT2Zb7o6WonB jHdzjBtauWsc/tEHgaE5wCpd+5i1BRqA1OwzdKRLddTxSHyB3lno4t2UWn50usO1wt7o mbgXMfeM4Q3pfsNxjxaPCynP5UbhtwUEg5+/YNktlLYj+hDbFih6h1lr5KKK3UiFPFkd oGxQ== X-Gm-Message-State: APjAAAWQDKcQPpdT90nwjqSWE4SEo7LqAVBpp8NqqetuiigbCujJa0N6 GmNf9NkB+1zaKd4JRjnM/Alkag== X-Google-Smtp-Source: APXvYqywtRrgku0AqUVMt1yhhNoxlXj19ieN/Bb41Np801RohrxLkAt2YF/xqgf+ErRr+uw5SHwVQQ== X-Received: by 2002:a1c:4187:: with SMTP id o129mr1735083wma.57.1555662909576; Fri, 19 Apr 2019 01:35:09 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id t76sm5700147wmt.8.2019.04.19.01.35.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 01:35:08 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de, xuwei5@hisilicon.com, mturquette@baylibre.com, sboyd@kernel.org, yuq825@gmail.com Subject: [PATCH v2 5/6] dt-bindings: reset: hisilicon: Add ao reset controller Date: Fri, 19 Apr 2019 09:33:00 +0100 Message-Id: <1555662781-22570-6-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> References: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Sat, 20 Apr 2019 08:47:32 +0000 X-Mailman-Original-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=WzKNBO96cllaDZYht9HJ/bZN1iAt8AGESvlKduBe/SY=; b=LPrqSJdsTkO4xoeE7tsRT9wJQ8vByFXhhcpzha3M5PSlCR8/lBvMlCASU/cxecMkOh UmFaTRf/tnUhmnaIihVY9vMB9PcnuDpeX2Y+FPOqYNPArv4bp6D7EVdqQPRFBBa8r94+ SQIihJIa0qIUl64U38mxzRgWgStXMVg6pefv0iSnuP3UtiW7TfYeyZvMeBwwSgx39IjW EYBobw9GPsizSMd0kLOGcvl86MV4M06iYNLRnjKZ18xxGyNl2tc0RYu+q9Go6/LNKgBr MhC03aUgHHuJlBVTa83tKyZxK5cHaDI8JEISC2qUyKvF/c2OLTJa9hVM/MpNMFT8KENE Dc2g== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is required to bring Mali450 gpu out of reset. Signed-off-by: Peter Griffin Reviewed-by: Rob Herring --- include/dt-bindings/reset/hisi,hi6220-resets.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/dt-bindings/reset/hisi,hi6220-resets.h b/include/dt-bindings/reset/hisi,hi6220-resets.h index e7c362a8..63aff7d 100644 --- a/include/dt-bindings/reset/hisi,hi6220-resets.h +++ b/include/dt-bindings/reset/hisi,hi6220-resets.h @@ -73,4 +73,11 @@ #define MEDIA_MMU 6 #define MEDIA_XG2RAM1 7 +#define AO_G3D 1 +#define AO_CODECISP 2 +#define AO_MCPU 4 +#define AO_BBPHARQMEM 5 +#define AO_HIFI 8 +#define AO_ACPUSCUL2C 12 + #endif /*_DT_BINDINGS_RESET_CONTROLLER_HI6220*/ From patchwork Fri Apr 19 08:33:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 10910089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4E8A1515 for ; Sat, 20 Apr 2019 08:47:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD3AD288AD for ; Sat, 20 Apr 2019 08:47:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B194228AAC; Sat, 20 Apr 2019 08:47:57 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 4FCE9288AD for ; Sat, 20 Apr 2019 08:47:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23A2C8929D; Sat, 20 Apr 2019 08:47:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DE538920F for ; Fri, 19 Apr 2019 08:35:12 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id w15so5673664wmc.3 for ; Fri, 19 Apr 2019 01:35:12 -0700 (PDT) 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=Ce+xsHXl4yFXBVy1VUWq5FJ/Ala/Os2pJsWh4xCgH2Q=; b=hl3mlN8iJpyqXbypI3qFVs+1+GpIpjUcAAdoDwCeAiHQbdGpry27zkBIBEM6oaFR6M fGMPMxX5a0k06lfIc/QOZtVM+JLH5S7SWVLwQKHnZZ2MFUltCSgFMSNbUuQobwyK8nYu +wu7HAmqkYPvDKs/KcQE6Zcf4ml0iSqyh2Xu4GGDq1ijSG1Or2ucTDxx+tDcNB/4iPJe KydUW1OKByjkTtjlmH/CFrsFi2jnnJwqglMkhfRmRBy5MwqnoqfoZvQcVIgu1y2mLfm7 QF06Wj/AuKCW3k7+wONkIImib3DJwtGoub+GA1uVHagqGEMS8Ua4wHOGp/SWHHqOOote EIaw== X-Gm-Message-State: APjAAAWlvGSJxanT/5D5+4n/46kPgE1yVB3nsNAMECFB+SenhWhmHLRD ntTwQn93kWFRVQtxcT11EIcx5A== X-Google-Smtp-Source: APXvYqxHCiejcT6tfcxtXdLG5uPOoyx8wHXcYqizHu+I/8l6MFuXaHqJKEsT1gnEHkdZKqtfL7vAoQ== X-Received: by 2002:a1c:185:: with SMTP id 127mr1758875wmb.145.1555662910901; Fri, 19 Apr 2019 01:35:10 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id t76sm5700147wmt.8.2019.04.19.01.35.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 01:35:10 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de, xuwei5@hisilicon.com, mturquette@baylibre.com, sboyd@kernel.org, yuq825@gmail.com Subject: [PATCH v2 6/6] drm/lima: handle shared irq case for lima_pp_bcast_irq_handler Date: Fri, 19 Apr 2019 09:33:01 +0100 Message-Id: <1555662781-22570-7-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> References: <1555662781-22570-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Sat, 20 Apr 2019 08:47:32 +0000 X-Mailman-Original-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=Ce+xsHXl4yFXBVy1VUWq5FJ/Ala/Os2pJsWh4xCgH2Q=; b=IE8Ds0UEUpH1f+3I6uwelgIIq26MWuAaBjFXVFvqp0hUyWENlu7GgR+VSATdjFczq+ a7vz1MIpVKHX767N8pRQovw7XNRECSOx5GUUC+8Ca/lQaopQ2l258H1JlwxoabzPtM8b grZPsuCzCqTQF7t2RnZrdh8zLjlUzal5b64UHYh7ZMwl1LxFjB6ZosWOkyJKEtlp0cYD GhKmw5IPZdB2ParXTexHcEYHUyrFVQEREIvKrUg2pDiJFmMfodtZ+ViIbxGt9J0dZpYl 3/Yl22r1W6/FAQdxpWIqafuO0evAhh6vdcygaSDBnqr4LbmAW7iFzUBtA1L89XigRGW/ /i9Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Hikey board all lima ip blocks are shared with one irq. This patch avoids a NULL ptr deref crash on this platform on startup. Tested with Weston and kmscube. Signed-off-by: Peter Griffin Cc: Rob Herring Cc: Daniel Vetter Cc: Qiang Yu --- drivers/gpu/drm/lima/lima_pp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c index d29721e..8fef224 100644 --- a/drivers/gpu/drm/lima/lima_pp.c +++ b/drivers/gpu/drm/lima/lima_pp.c @@ -64,7 +64,13 @@ static irqreturn_t lima_pp_bcast_irq_handler(int irq, void *data) struct lima_ip *pp_bcast = data; struct lima_device *dev = pp_bcast->dev; struct lima_sched_pipe *pipe = dev->pipe + lima_pipe_pp; - struct drm_lima_m450_pp_frame *frame = pipe->current_task->frame; + struct drm_lima_m450_pp_frame *frame; + + /* for shared irq case */ + if (!pipe->current_task) + return IRQ_NONE; + + frame = pipe->current_task->frame; for (i = 0; i < frame->num_pp; i++) { struct lima_ip *ip = pipe->processor[i];