From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no 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 7A93DC3F68F for ; Wed, 8 Jan 2020 05:23:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B8242070E for ; Wed, 8 Jan 2020 05:23:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UaDMeZnQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726107AbgAHFX4 (ORCPT ); Wed, 8 Jan 2020 00:23:56 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34428 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgAHFX4 (ORCPT ); Wed, 8 Jan 2020 00:23:56 -0500 Received: by mail-pf1-f195.google.com with SMTP id i6so1028780pfc.1 for ; Tue, 07 Jan 2020 21:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=UaDMeZnQsg7RWbE0j39tduViiq5tWgb5xwFNLW6CAsuaqrJDAaez2MGnV4PY7kH539 aj30Ild0XBzKI5+QFVnZnuU/x9R/7QklbyAMShyxgCH4sxK7XMPCA8P3gzkn56vBNgnS fkoYP8jneVMWqlDMbIWdMfifnxnN8gAT8lJCU= 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:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=aUaVdynh5owD+QPkF0/S9QJplfPR0LQok7bnne9ikINjx4qWs4Lpg85gvbH06+umYb 6J8fU5MYWp7t+9psevvpbFqdD0Fr7c21AKpUD9g9XUUfyzhMkSY+4VKjaMnEz2EdIzB3 /P9hSaIucZLRmnGlbVaPtYqsPN4QrQHOwfnB95ccHUpdTeESsKvUwThKlhcxhD6mtxVn uZHVZIFcMo18dXo+hfFsFtxTKrKxUDak/LKgTcURfwgj6ohyR4hJl1pL7qCzjL++LpJA Sn30r0Q7adAvgArxKRf2/MvZ/DtDpWnhYTr+eZrejgRiEZeOc/SQNNHRaqj11JhtMy01 qnYg== X-Gm-Message-State: APjAAAXA3oDz5Nr7LoikvULLKHjOimUsTGWY1aNbv4zU8ocJjPDOfPTv XCEAPUXi1RGX0Pyo/WPcjQ/6Kw== X-Google-Smtp-Source: APXvYqxmaLR0+XdqtcLLRTMFj3xPry0wUm49NXvxttElsA1fauDaDpoKgiJkJbYJCbg0zpgZCOqf+g== X-Received: by 2002:a62:446:: with SMTP id 67mr3056799pfe.109.1578461035208; Tue, 07 Jan 2020 21:23:55 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id n24sm387505pff.12.2020.01.07.21.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 21:23:54 -0800 (PST) From: Nicolas Boichat To: Rob Herring Cc: David Airlie , Daniel Vetter , Mark Rutland , Matthias Brugger , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Liam Girdwood , Mark Brown , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, hsinyi@chromium.org Subject: [PATCH v2 0/7] Add dts for mt8183 GPU (and misc panfrost patches) Date: Wed, 8 Jan 2020 13:23:30 +0800 Message-Id: <20200108052337.65916-1-drinkcat@chromium.org> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! Sorry for the long delay since https://patchwork.kernel.org/patch/11132381/, finally got around to give this a real try. The main purpose of this series is to upstream the dts change and the binding document, but I wanted to see how far I could probe the GPU, to check that the binding is indeed correct. The rest of the patches are RFC/work-in-progress, but I think some of them could already be picked up. So this is tested on MT8183 with a chromeos-4.19 kernel, and a ton of backports to get the latest panfrost driver (I should probably try on linux-next at some point but this was the path of least resistance). I tested it as a module as it's more challenging (originally probing would work built-in, on boot, but not as a module, as I didn't have the power domain changes, and all power domains are on by default during boot). Probing logs looks like this, currently: [ 221.867726] panfrost 13040000.gpu: clock rate = 511999970 [ 221.867929] panfrost 13040000.gpu: Linked as a consumer to regulator.14 [ 221.868600] panfrost 13040000.gpu: Linked as a consumer to regulator.31 [ 221.870586] panfrost 13040000.gpu: Linked as a consumer to genpd:0:13040000.gpu [ 221.871492] panfrost 13040000.gpu: Linked as a consumer to genpd:1:13040000.gpu [ 221.871866] panfrost 13040000.gpu: Linked as a consumer to genpd:2:13040000.gpu [ 221.872427] panfrost 13040000.gpu: mali-g72 id 0x6221 major 0x0 minor 0x3 status 0x0 [ 221.872439] panfrost 13040000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400 [ 221.872445] panfrost 13040000.gpu: Features: L2:0x07120206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7 [ 221.872449] panfrost 13040000.gpu: shader_present=0x7 l2_present=0x1 [ 221.873526] panfrost 13040000.gpu: error powering up gpu stack [ 221.878088] [drm] Initialized panfrost 1.1.0 20180908 for 13040000.gpu on minor 2 [ 221.940817] panfrost 13040000.gpu: error powering up gpu stack [ 222.018233] panfrost 13040000.gpu: error powering up gpu stack (repeated) So the GPU is probed, but there's an issue when powering up the STACK, not quite sure why, I'll try to have a deeper look, at some point. Thanks! Nicolas v2: - Use sram instead of mali_sram as SRAM supply name. - Rename mali@ to gpu@. - Add dt-bindings changes - Stacking patches after the device tree change that allow basic probing (still incomplete and broken). Nicolas Boichat (7): dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183 arm64: dts: mt8183: Add node for the Mali GPU drm/panfrost: Improve error reporting in panfrost_gpu_power_on drm/panfrost: Add support for a second regulator for the GPU drm/panfrost: Add support for multiple power domain support RFC: drm/panfrost: Add bifrost compatible string RFC: drm/panfrost: devfreq: Add support for 2 regulators .../bindings/gpu/arm,mali-bifrost.yaml | 20 ++++ arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 7 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 104 +++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_devfreq.c | 18 +++ drivers/gpu/drm/panfrost/panfrost_device.c | 108 ++++++++++++++++-- drivers/gpu/drm/panfrost/panfrost_device.h | 7 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 15 ++- 8 files changed, 267 insertions(+), 13 deletions(-) -- 2.24.1.735.g03f4e72817-goog From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 7AE45C33C9E for ; Wed, 8 Jan 2020 05:24:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11E642073A for ; Wed, 8 Jan 2020 05:24:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EZWvSP1L"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UaDMeZnQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11E642073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NKq4eeCsOCyuutX/901AQ5znD8wY3B7DlAeZcRsmpsQ=; b=EZWvSP1L2fIa5g fWTo5RE+qXG8bgK7EM+dRCkUQfCDxmPjHWY4MpwbhJ5BRUQ6UMWiDzYD4bPc6Y4VMMBNHRUsmC13S WzAnAgPktQiVW2Ey7j67kNbRKuSuexYsFFWD/TdbN4YD6uCjyqD69rM28AaeXGtAP0VAKCY3rCZxW sCuZdZpueL3XMZLmAufAPl64FhaDT9awwKYxB0WTOaK0//JTWIi9BO8WDWJqoE5embDVgGS15XMMX dHh/JUV81PsAMGU2XwTzb3WSW+pnIIfbzl7ZTOjBNUp781UuWE2k2ZasPQiA7Bqbz4Pwhjvioi7tG KPkUmW6u0h0ZG+Nyx8Ig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ip3p1-0004gJ-FY; Wed, 08 Jan 2020 05:23:59 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ip3oy-0004eq-EP for linux-mediatek@lists.infradead.org; Wed, 08 Jan 2020 05:23:58 +0000 Received: by mail-pf1-x444.google.com with SMTP id n9so995513pff.13 for ; Tue, 07 Jan 2020 21:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=UaDMeZnQsg7RWbE0j39tduViiq5tWgb5xwFNLW6CAsuaqrJDAaez2MGnV4PY7kH539 aj30Ild0XBzKI5+QFVnZnuU/x9R/7QklbyAMShyxgCH4sxK7XMPCA8P3gzkn56vBNgnS fkoYP8jneVMWqlDMbIWdMfifnxnN8gAT8lJCU= 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:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=eOkrXR59PYXlggI/jEgbRNoX/mMR7MqJPiPbn9xFLuiK3ZX6Rdm6SnSHpv9TSSgPbH a6x2Dw7tgiMI9QNJFXJi6a2DJJO6vV5bPMaO8P/T4X8phOZfM68y5dH7rhEeIXK+DX8T MN0tTD/mF//LMnS2QfjwtuVn1sUXRXnwhCkwW8tekqVuRNVKs5gQHo7z2tJ/SHu+Fny0 IqwmVOW9qXyLLPqam9VknNXU81FSH9KhdfAUVB63YKsiDMBI/kCxO8xndhvkg5jzJPRp VuKozMIAb+CCEFKSJcXQbGivDZxo0kT82LCQ1lYpYSQqwvpiBExoABwFgnCtHcSNQNPF om1A== X-Gm-Message-State: APjAAAWF8Ty6T2hfwu+Zp+0x3Um1vmJPcgI44Ql+b4N45wYXFm+mzjoz lJWUw6uUFsVEvHqHwewKq+IDSA== X-Google-Smtp-Source: APXvYqxmaLR0+XdqtcLLRTMFj3xPry0wUm49NXvxttElsA1fauDaDpoKgiJkJbYJCbg0zpgZCOqf+g== X-Received: by 2002:a62:446:: with SMTP id 67mr3056799pfe.109.1578461035208; Tue, 07 Jan 2020 21:23:55 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id n24sm387505pff.12.2020.01.07.21.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 21:23:54 -0800 (PST) From: Nicolas Boichat To: Rob Herring Subject: [PATCH v2 0/7] Add dts for mt8183 GPU (and misc panfrost patches) Date: Wed, 8 Jan 2020 13:23:30 +0800 Message-Id: <20200108052337.65916-1-drinkcat@chromium.org> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200107_212356_509907_28744EEA X-CRM114-Status: GOOD ( 13.95 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Tomeu Vizoso , David Airlie , linux-kernel@vger.kernel.org, Liam Girdwood , dri-devel@lists.freedesktop.org, Steven Price , Mark Brown , linux-mediatek@lists.infradead.org, Alyssa Rosenzweig , Daniel Vetter , hsinyi@chromium.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi! Sorry for the long delay since https://patchwork.kernel.org/patch/11132381/, finally got around to give this a real try. The main purpose of this series is to upstream the dts change and the binding document, but I wanted to see how far I could probe the GPU, to check that the binding is indeed correct. The rest of the patches are RFC/work-in-progress, but I think some of them could already be picked up. So this is tested on MT8183 with a chromeos-4.19 kernel, and a ton of backports to get the latest panfrost driver (I should probably try on linux-next at some point but this was the path of least resistance). I tested it as a module as it's more challenging (originally probing would work built-in, on boot, but not as a module, as I didn't have the power domain changes, and all power domains are on by default during boot). Probing logs looks like this, currently: [ 221.867726] panfrost 13040000.gpu: clock rate = 511999970 [ 221.867929] panfrost 13040000.gpu: Linked as a consumer to regulator.14 [ 221.868600] panfrost 13040000.gpu: Linked as a consumer to regulator.31 [ 221.870586] panfrost 13040000.gpu: Linked as a consumer to genpd:0:13040000.gpu [ 221.871492] panfrost 13040000.gpu: Linked as a consumer to genpd:1:13040000.gpu [ 221.871866] panfrost 13040000.gpu: Linked as a consumer to genpd:2:13040000.gpu [ 221.872427] panfrost 13040000.gpu: mali-g72 id 0x6221 major 0x0 minor 0x3 status 0x0 [ 221.872439] panfrost 13040000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400 [ 221.872445] panfrost 13040000.gpu: Features: L2:0x07120206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7 [ 221.872449] panfrost 13040000.gpu: shader_present=0x7 l2_present=0x1 [ 221.873526] panfrost 13040000.gpu: error powering up gpu stack [ 221.878088] [drm] Initialized panfrost 1.1.0 20180908 for 13040000.gpu on minor 2 [ 221.940817] panfrost 13040000.gpu: error powering up gpu stack [ 222.018233] panfrost 13040000.gpu: error powering up gpu stack (repeated) So the GPU is probed, but there's an issue when powering up the STACK, not quite sure why, I'll try to have a deeper look, at some point. Thanks! Nicolas v2: - Use sram instead of mali_sram as SRAM supply name. - Rename mali@ to gpu@. - Add dt-bindings changes - Stacking patches after the device tree change that allow basic probing (still incomplete and broken). Nicolas Boichat (7): dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183 arm64: dts: mt8183: Add node for the Mali GPU drm/panfrost: Improve error reporting in panfrost_gpu_power_on drm/panfrost: Add support for a second regulator for the GPU drm/panfrost: Add support for multiple power domain support RFC: drm/panfrost: Add bifrost compatible string RFC: drm/panfrost: devfreq: Add support for 2 regulators .../bindings/gpu/arm,mali-bifrost.yaml | 20 ++++ arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 7 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 104 +++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_devfreq.c | 18 +++ drivers/gpu/drm/panfrost/panfrost_device.c | 108 ++++++++++++++++-- drivers/gpu/drm/panfrost/panfrost_device.h | 7 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 15 ++- 8 files changed, 267 insertions(+), 13 deletions(-) -- 2.24.1.735.g03f4e72817-goog _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 BC73FC33CA2 for ; Wed, 8 Jan 2020 05:24:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B27C20705 for ; Wed, 8 Jan 2020 05:24:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fXxUBuak"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UaDMeZnQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B27C20705 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BeJE5a61p0kerRZ8OtMTuVy70I+Ydr2cdEMEUWZ7Cm4=; b=fXxUBuakmEkmrh k8+4jED0A9PvqfZB1fnwg1cYXh/TPcqfSWGUXDZGM01r0pTGanwYPxc4lXcM7RNYEB129WKC/VKjL nzoweoFW57rdHHRZd53C1KgyNYrluDSq/QZY5N+aiDwvnuRuqjityh9GsOsLKL6djBm/MTsBY9dnd LK2j9OdDOwr5wzL2wVUWZBeJUwb7BA60nKq5PLCPseTE0yLpxIENrT2zFWAA2j1UWoFmn6IjYD9Z8 qFnwYsuEdM8l/4h3qCkOcyZe9ujjyVllgMQtYYB9GeAeJuQHlRBXDy270i3WUSN30oLtbLEZYcRhZ gllaY/TrC9YFFTmpBGaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ip3p2-0004h2-Ok; Wed, 08 Jan 2020 05:24:00 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ip3oy-0004ep-EX for linux-arm-kernel@lists.infradead.org; Wed, 08 Jan 2020 05:23:58 +0000 Received: by mail-pf1-x442.google.com with SMTP id x185so1017771pfc.5 for ; Tue, 07 Jan 2020 21:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=UaDMeZnQsg7RWbE0j39tduViiq5tWgb5xwFNLW6CAsuaqrJDAaez2MGnV4PY7kH539 aj30Ild0XBzKI5+QFVnZnuU/x9R/7QklbyAMShyxgCH4sxK7XMPCA8P3gzkn56vBNgnS fkoYP8jneVMWqlDMbIWdMfifnxnN8gAT8lJCU= 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:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=I73IaHvufNmDSC4hu3fqji1K9OjIuJrUP3NDlMa6+mA/pK43Moxq+s6oY/ABwikx7R WbAPsjCqKmgjKgMnFARhLC7FeHZRi0HxP8e1llxtNIlhcg1npBT9OCrasW0LbbvZEO8H +zXl57DR5xcr+6mGGqU/fZV9xwNCQ1uuYUyxq+CYv97LE0hq7o4hqyQvJjFi4BlAk9go Evd9bZd02VkhFXS5KdiCURA67Q4LD6aM99JOi3f4ResW+QcfCkADpi1oOouli2hB1hxX zMnAdgalj0VuWS56Eehqa4LGHP7BSdfK3cxQmLQyNP63PqyA16pFLA5aziA4M3ENviwB 8j0g== X-Gm-Message-State: APjAAAWf1O79oWtTBgsTn9jI+lUX7uMAIU2zDRLF0lpg01hAoWAvmdgU Vdh6Vyn+VtpLabk5JYxec/xB6A== X-Google-Smtp-Source: APXvYqxmaLR0+XdqtcLLRTMFj3xPry0wUm49NXvxttElsA1fauDaDpoKgiJkJbYJCbg0zpgZCOqf+g== X-Received: by 2002:a62:446:: with SMTP id 67mr3056799pfe.109.1578461035208; Tue, 07 Jan 2020 21:23:55 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id n24sm387505pff.12.2020.01.07.21.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 21:23:54 -0800 (PST) From: Nicolas Boichat To: Rob Herring Subject: [PATCH v2 0/7] Add dts for mt8183 GPU (and misc panfrost patches) Date: Wed, 8 Jan 2020 13:23:30 +0800 Message-Id: <20200108052337.65916-1-drinkcat@chromium.org> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200107_212356_511820_4B3A456D X-CRM114-Status: GOOD ( 15.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Tomeu Vizoso , David Airlie , linux-kernel@vger.kernel.org, Liam Girdwood , dri-devel@lists.freedesktop.org, Steven Price , Mark Brown , linux-mediatek@lists.infradead.org, Alyssa Rosenzweig , Daniel Vetter , hsinyi@chromium.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi! Sorry for the long delay since https://patchwork.kernel.org/patch/11132381/, finally got around to give this a real try. The main purpose of this series is to upstream the dts change and the binding document, but I wanted to see how far I could probe the GPU, to check that the binding is indeed correct. The rest of the patches are RFC/work-in-progress, but I think some of them could already be picked up. So this is tested on MT8183 with a chromeos-4.19 kernel, and a ton of backports to get the latest panfrost driver (I should probably try on linux-next at some point but this was the path of least resistance). I tested it as a module as it's more challenging (originally probing would work built-in, on boot, but not as a module, as I didn't have the power domain changes, and all power domains are on by default during boot). Probing logs looks like this, currently: [ 221.867726] panfrost 13040000.gpu: clock rate = 511999970 [ 221.867929] panfrost 13040000.gpu: Linked as a consumer to regulator.14 [ 221.868600] panfrost 13040000.gpu: Linked as a consumer to regulator.31 [ 221.870586] panfrost 13040000.gpu: Linked as a consumer to genpd:0:13040000.gpu [ 221.871492] panfrost 13040000.gpu: Linked as a consumer to genpd:1:13040000.gpu [ 221.871866] panfrost 13040000.gpu: Linked as a consumer to genpd:2:13040000.gpu [ 221.872427] panfrost 13040000.gpu: mali-g72 id 0x6221 major 0x0 minor 0x3 status 0x0 [ 221.872439] panfrost 13040000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400 [ 221.872445] panfrost 13040000.gpu: Features: L2:0x07120206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7 [ 221.872449] panfrost 13040000.gpu: shader_present=0x7 l2_present=0x1 [ 221.873526] panfrost 13040000.gpu: error powering up gpu stack [ 221.878088] [drm] Initialized panfrost 1.1.0 20180908 for 13040000.gpu on minor 2 [ 221.940817] panfrost 13040000.gpu: error powering up gpu stack [ 222.018233] panfrost 13040000.gpu: error powering up gpu stack (repeated) So the GPU is probed, but there's an issue when powering up the STACK, not quite sure why, I'll try to have a deeper look, at some point. Thanks! Nicolas v2: - Use sram instead of mali_sram as SRAM supply name. - Rename mali@ to gpu@. - Add dt-bindings changes - Stacking patches after the device tree change that allow basic probing (still incomplete and broken). Nicolas Boichat (7): dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183 arm64: dts: mt8183: Add node for the Mali GPU drm/panfrost: Improve error reporting in panfrost_gpu_power_on drm/panfrost: Add support for a second regulator for the GPU drm/panfrost: Add support for multiple power domain support RFC: drm/panfrost: Add bifrost compatible string RFC: drm/panfrost: devfreq: Add support for 2 regulators .../bindings/gpu/arm,mali-bifrost.yaml | 20 ++++ arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 7 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 104 +++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_devfreq.c | 18 +++ drivers/gpu/drm/panfrost/panfrost_device.c | 108 ++++++++++++++++-- drivers/gpu/drm/panfrost/panfrost_device.h | 7 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 15 ++- 8 files changed, 267 insertions(+), 13 deletions(-) -- 2.24.1.735.g03f4e72817-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 3700AC33C9B for ; Wed, 8 Jan 2020 05:23:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 018412075D for ; Wed, 8 Jan 2020 05:23:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UaDMeZnQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 018412075D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E3576E167; Wed, 8 Jan 2020 05:23:57 +0000 (UTC) Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFFFB6E167 for ; Wed, 8 Jan 2020 05:23:55 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id q10so1016171pfs.6 for ; Tue, 07 Jan 2020 21:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=UaDMeZnQsg7RWbE0j39tduViiq5tWgb5xwFNLW6CAsuaqrJDAaez2MGnV4PY7kH539 aj30Ild0XBzKI5+QFVnZnuU/x9R/7QklbyAMShyxgCH4sxK7XMPCA8P3gzkn56vBNgnS fkoYP8jneVMWqlDMbIWdMfifnxnN8gAT8lJCU= 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:mime-version :content-transfer-encoding; bh=s1KUxpvNC0nSY4c57vW0grBhdHj/br9DS0Gj7LsMqAg=; b=dNjUILggOYhTSU1U88LEHRdAh+IPyUkYStudEUKXuBWbu79xKvELaCF/4jjlv+3zYR BZ8+MhwuNG3nLOuXHgpkyc2GN2HBDmxS/QgxFdEuYxPqXDc+6r0jYrTv4HHTVYx9YXQz PWbhZiEVvMHJrBeTjaeufAeDl8wCthrIrbj8N51D6el9uF/2sRTjikJ4csr5TLcwu2wk 7aNdBIhbauIAnc89yqM2HAGO9Vj3mB+KE0NH/OlqHYULXh4G60Ne10mZMTza2lPyZCuu ltUW5JMi/ES1p28SfTCgPOKt1f4avaebFoJ4U3qW3g+EtPJd/CLUcPaB3zrpEOnD1ODO oOaA== X-Gm-Message-State: APjAAAVZIxU0I+M3UIoDImXsuc19gBTdJGUYHvpUFRhU96gi54vO6rVx ydzLJF3hbvcNpZc/bQdq92/FRg== X-Google-Smtp-Source: APXvYqxmaLR0+XdqtcLLRTMFj3xPry0wUm49NXvxttElsA1fauDaDpoKgiJkJbYJCbg0zpgZCOqf+g== X-Received: by 2002:a62:446:: with SMTP id 67mr3056799pfe.109.1578461035208; Tue, 07 Jan 2020 21:23:55 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id n24sm387505pff.12.2020.01.07.21.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 21:23:54 -0800 (PST) From: Nicolas Boichat To: Rob Herring Subject: [PATCH v2 0/7] Add dts for mt8183 GPU (and misc panfrost patches) Date: Wed, 8 Jan 2020 13:23:30 +0800 Message-Id: <20200108052337.65916-1-drinkcat@chromium.org> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Tomeu Vizoso , David Airlie , linux-kernel@vger.kernel.org, Liam Girdwood , dri-devel@lists.freedesktop.org, Steven Price , Mark Brown , linux-mediatek@lists.infradead.org, Alyssa Rosenzweig , hsinyi@chromium.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi! Sorry for the long delay since https://patchwork.kernel.org/patch/11132381/, finally got around to give this a real try. The main purpose of this series is to upstream the dts change and the binding document, but I wanted to see how far I could probe the GPU, to check that the binding is indeed correct. The rest of the patches are RFC/work-in-progress, but I think some of them could already be picked up. So this is tested on MT8183 with a chromeos-4.19 kernel, and a ton of backports to get the latest panfrost driver (I should probably try on linux-next at some point but this was the path of least resistance). I tested it as a module as it's more challenging (originally probing would work built-in, on boot, but not as a module, as I didn't have the power domain changes, and all power domains are on by default during boot). Probing logs looks like this, currently: [ 221.867726] panfrost 13040000.gpu: clock rate = 511999970 [ 221.867929] panfrost 13040000.gpu: Linked as a consumer to regulator.14 [ 221.868600] panfrost 13040000.gpu: Linked as a consumer to regulator.31 [ 221.870586] panfrost 13040000.gpu: Linked as a consumer to genpd:0:13040000.gpu [ 221.871492] panfrost 13040000.gpu: Linked as a consumer to genpd:1:13040000.gpu [ 221.871866] panfrost 13040000.gpu: Linked as a consumer to genpd:2:13040000.gpu [ 221.872427] panfrost 13040000.gpu: mali-g72 id 0x6221 major 0x0 minor 0x3 status 0x0 [ 221.872439] panfrost 13040000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400 [ 221.872445] panfrost 13040000.gpu: Features: L2:0x07120206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7 [ 221.872449] panfrost 13040000.gpu: shader_present=0x7 l2_present=0x1 [ 221.873526] panfrost 13040000.gpu: error powering up gpu stack [ 221.878088] [drm] Initialized panfrost 1.1.0 20180908 for 13040000.gpu on minor 2 [ 221.940817] panfrost 13040000.gpu: error powering up gpu stack [ 222.018233] panfrost 13040000.gpu: error powering up gpu stack (repeated) So the GPU is probed, but there's an issue when powering up the STACK, not quite sure why, I'll try to have a deeper look, at some point. Thanks! Nicolas v2: - Use sram instead of mali_sram as SRAM supply name. - Rename mali@ to gpu@. - Add dt-bindings changes - Stacking patches after the device tree change that allow basic probing (still incomplete and broken). Nicolas Boichat (7): dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183 arm64: dts: mt8183: Add node for the Mali GPU drm/panfrost: Improve error reporting in panfrost_gpu_power_on drm/panfrost: Add support for a second regulator for the GPU drm/panfrost: Add support for multiple power domain support RFC: drm/panfrost: Add bifrost compatible string RFC: drm/panfrost: devfreq: Add support for 2 regulators .../bindings/gpu/arm,mali-bifrost.yaml | 20 ++++ arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 7 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 104 +++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_devfreq.c | 18 +++ drivers/gpu/drm/panfrost/panfrost_device.c | 108 ++++++++++++++++-- drivers/gpu/drm/panfrost/panfrost_device.h | 7 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 15 ++- 8 files changed, 267 insertions(+), 13 deletions(-) -- 2.24.1.735.g03f4e72817-goog _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel