From patchwork Thu Jun 11 08:58:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 187792 Delivered-To: patch@linaro.org Received: by 2002:a54:30ca:0:0:0:0:0 with SMTP id e10csp1059773ecs; Thu, 11 Jun 2020 01:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwln039CNBQzmMHfTmftP5iVHWMo3WxPKHBGgeT6PQ8PtU2LAA+rNIQwHWdoQXF8ddn6zX8 X-Received: by 2002:a62:25c5:: with SMTP id l188mr6351784pfl.178.1591865972459; Thu, 11 Jun 2020 01:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591865972; cv=none; d=google.com; s=arc-20160816; b=cI/Ri0XAS0HVMU6aQnXWi73Ls+sDipNphyov8tqlDD7j6wwllpQIsXrM20BzBz+zXi 7A0dJo7MNLWdxZywG9GdT86PwS6+LdtOFO132JKirsqRBKywJi8Drmlg9HjK+Ic3PYBq WmQaPPDdUGCaKF9doEKk39ma/ESIIhj19xpY+kDfFsZ1JIUwRPmC1H122wHsAhX4HGJK JRebkIwLE2Aa5t7SrmcyWfitge5n91eUXdwnPGoMSDmhWsy2xpXw5xnMt4ppA7/Dkf48 Hg1lccoCeAENpg3Zg+9VzBv93Qe8Uv32OGaF51zS4B7lxBSHlVgibFhEZJJX3146+eoQ P5Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=s2ZT0vxXvCl8eWd/WGa0jCbN2/y9O90/HbjqQ3A2zEA=; b=0UiqEtUwcG1a0w5GqxYvS2PfhbDXCGQShKMSzCECKLCDotaCAkzk7o/D0IGGpF571Z pgu60yUP9PkvfNqTbu6tG0pIxlUxYemgOuDn485Q3pC4+5nw5lO1OvBffALUitbis3e+ K/iJMt9dEGTvx3QxVGicPf4y/6KRBrrjqb51s5rxnhKlNAuETQ3ztg8MQ7X0c0BtyFRL 4jwZJcr2xbSMP8nbAwMMlyW80Tyu6JtAs3hC+rICJGOgtQOHnnCrO8JpXcGrPc7oWu+R gZuF2+1VEdZTK/lz/Jltj8LPHugKVY/H4CBc3zJpZlEMLtjZufzqXT0pf93cFfjWo7RZ NvIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=B5T4Tekl; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id mg18si654038pjb.75.2020.06.11.01.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 01:59:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=B5T4Tekl; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A40E56E8B6; Thu, 11 Jun 2020 08:59:30 +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 7F8E36E8B6 for ; Thu, 11 Jun 2020 08:59:29 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id l26so4230181wme.3 for ; Thu, 11 Jun 2020 01:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vkpecle/NufRhIWFw6o8Icsy3Vg8yQBJnNwa3m6TOrY=; b=B5T4TeklMK2kiPUFPKuuVP7i4B9RaICOLmQ0X69pyuhRLLiYf66zl/t9yQbxri1F6x hhbN1Jtyz6XDvHQJMaZWpIo6w1GL4iKvhxLlinIrodsKoW2vSITvlTkWlfvkbvMvowKg FruLct+0aI/LfplSLqucAjJdDDa1Fq+j5pd/kuutGlFTwNx39exJ1+LtTp5exE1Q5XjG GaIrWDswsYmKIR11ri1CuhU3/PQRJHSzO6qOn+g+dSIE6/DT4553GanI+L0rcD13XLcn okgjyULRPyGPAFBnD/VaWjNnk/WDAPPFzueKAwimNMBfDm4+OQxPB4rjioBVVmASEHgs T0CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Vkpecle/NufRhIWFw6o8Icsy3Vg8yQBJnNwa3m6TOrY=; b=nU68kTwsiHHUWIglA3qxEpq1KHW1GwoRH/yzxoPK5rqcTH82vFI5w5f23OLyOttWih K1gp0IemuGy7bHjH94aIOsCBjcl4QGFp1kC28E7jgeRYfj9az9uOywPgWXynwnBt8lIZ KqKBuwBeRZ5ME+Yeqwf6aAiSVNL8HESsP/a8QOFJrA9tDCej+g8+Om6wkDl3TZRTfxdT f5YmaZmPvaneIs23HcGZVwSM3g+5e6JNFSn0+ZGaGxbD0EII1IksGnPHOcyAL6+t9s/d cCQTwr0PJ4DTrsEKicS3m4UkJPX/cOUD4HgtZDjc95s/bSxJrNflui0pZHPSU2oCLqiB 0aMg== X-Gm-Message-State: AOAM5306I1OgfKRex6F/GVejEiu80LvAS33Ky1q/PGAGWiPdu8aFhHhq bet5opsqxawcf3cC36KKH70TYVXP X-Received: by 2002:a1c:7414:: with SMTP id p20mr7011193wmc.124.1591865968099; Thu, 11 Jun 2020 01:59:28 -0700 (PDT) Received: from cizrna.lan ([109.72.12.141]) by smtp.gmail.com with ESMTPSA id o20sm4205023wra.29.2020.06.11.01.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 01:59:27 -0700 (PDT) From: Tomeu Vizoso To: LKML Subject: [PATCH 1/2] panfrost: Make sure GPU is powered on when reading GPU_LATEST_FLUSH_ID Date: Thu, 11 Jun 2020 10:58:43 +0200 Message-Id: <20200611085900.49740-1-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.21.0 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: Tomeu Vizoso , David Airlie , dri-devel@lists.freedesktop.org, Steven Price , Alyssa Rosenzweig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Bifrost devices do support the flush reduction feature, so on first job submit we were trying to read the register while still powered off. If the GPU is powered off, the feature doesn't bring any benefit, so don't try to read. Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 2.21.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Tested-by: Heiko Stuebner Reviewed-by: Steven Price diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index f2c1ddc41a9b..e0f190e43813 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "panfrost_device.h" #include "panfrost_features.h" @@ -368,7 +369,16 @@ void panfrost_gpu_fini(struct panfrost_device *pfdev) u32 panfrost_gpu_get_latest_flush_id(struct panfrost_device *pfdev) { - if (panfrost_has_hw_feature(pfdev, HW_FEATURE_FLUSH_REDUCTION)) - return gpu_read(pfdev, GPU_LATEST_FLUSH_ID); + u32 flush_id; + + if (panfrost_has_hw_feature(pfdev, HW_FEATURE_FLUSH_REDUCTION)) { + /* Flush reduction only makes sense when the GPU is kept powered on between jobs */ + if (pm_runtime_get_if_in_use(pfdev->dev)) { + flush_id = gpu_read(pfdev, GPU_LATEST_FLUSH_ID); + pm_runtime_put(pfdev->dev); + return flush_id; + } + } + return 0; } From patchwork Thu Jun 11 08:58:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 187793 Delivered-To: patch@linaro.org Received: by 2002:a54:30ca:0:0:0:0:0 with SMTP id e10csp1059801ecs; Thu, 11 Jun 2020 01:59:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBgtVy52zDYvVxj9IoDlTMl13tBVN8dNTnBt0PzD0Awm+CHXv35uHJ+eRBPLDfWNsuOeuc X-Received: by 2002:a17:90b:143:: with SMTP id em3mr7174209pjb.92.1591865977499; Thu, 11 Jun 2020 01:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591865977; cv=none; d=google.com; s=arc-20160816; b=kpb4WTYMYTeJnSH9mf6BEUyRorv7inycLae4Pt5tgxUBhd4M8su9kZfuQgrvQEuLTA o/SWX+EphMSNAJW4VfV5WmRKA/SInpXoa2UPhZzZwx1A+5XLqsT4R74rORvnG638blFL M2dVh0H/1I+PWUb8c2gGtemOKgjIXuRPEvrw7hSCJeOy8P1nifYwYuOqY3/gLI84RYH3 yFO4X/eueSlQ39xR0ItYRKvHW2S77XGPsIGBRAMhB59vIFbdJBqF06xiOeXJLUpTSmVL e8tXuyJgtWMCPzPafMA/K4eSuj3C9SQQ6peU3EHYa7kwpCPLcD+BVArIIjrlNI/ZP+9y OTvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=2+97STtoS3RIqdMpB+Wr+7Wu6ihImICWtrbClyfNdpU=; b=fIp00z2eXUWIuwDzLsGIKtSOJBQEMpHR9DLWNm4f9Tx3+Ukco7MSBoJQSEhpDMp3Yl lAhBN/p+mvqDOZHyX/RRSsB0IC/hagMSqt4s81kH5UmeyV2nV2SJVxV42SnegeZNQxwc nfXp/vyEoNTc+ubc+yFE0ZHwr7vgx3zrwbVSxXOpvAZ/dn+lN+uCGmNg8RZgaqkqOUAn y0Bx65KRLgyMImZoAbCYcjpUH8jDbzmN0OlHsOSgd8lFpeAlv7GytTbm0D8oTt3LBAte Tmsjp3GOegktzIo37tY80Dlvqk5whCNC9wH6HsBQqtPgU8UydrTfdbiqcZALS2LJF2Pd rTIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cNtnL98y; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id v10si1407169plp.249.2020.06.11.01.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 01:59:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cNtnL98y; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55B0B6E8B5; Thu, 11 Jun 2020 08:59:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 20D156E8B5 for ; Thu, 11 Jun 2020 08:59:35 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id p5so5273173wrw.9 for ; Thu, 11 Jun 2020 01:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yYF1qLiVcqC5+ofUdD+N961rSzft8TLHXK3pdCiJAf4=; b=cNtnL98yUbK2MCL+1+RKeOROIoB5KILcEmhKmzVSQ0JHP2sFlFMpJK5x2EyYKhMjev UWYHxlDYULDROij0/0uRsiQ7ejZvFyVLTCtOnTXZOy6SFSZgP/Um0CgXGUjh7L2HZZzD fxpqR3Hc6bXw3PHPrSq/6JElnTuXsntnW7cB3rappNwxzCynIC+beZ119+lurecYIHfz DUDRypO35acuvv2rERRb1XWP0578Z+NQGLRsa2VyEQ4cWvO3hFaYL39RyrPgjfUzY+2P +ILv81nreYMMHTMpuoJ+R43utIyD2ldbbWuPkOYdZsGJSWeMQSL3WzQ667IWnPZJ50Ph tEtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=yYF1qLiVcqC5+ofUdD+N961rSzft8TLHXK3pdCiJAf4=; b=W0H9AzZOqEmObmgMP7yeCkuqOMxWkCEaWSlX+tzyjbsf+lAvJX2M2AUrL9kxGPPsPB qdzzZ8ps4BH2lHdq81ELR/67XnhyKEiUZTQWlJa4VObkC2QzE7M440ZnZ4sYC24ymwiE 8Fl+YLXxe60DHLsIgcYAI2bYLAd9yUxEh9dqHEc2fXY3/pZ8y+tsMwj87Lh5is8NCk6S CwMz6jPGex2na/OixGPTJfIZnk/8cX2Q5I3SF4xIBdoIclRiHItuT7AO0jyfE0KwSgzR KHX95sYC1oqipBwRwWqnozpMuOpsZMwoowGxu1FH6wGj0t5iVcyhIBogOZoNUeNEkYWr LhGg== X-Gm-Message-State: AOAM530NLsBa83fbgtwyRgGbe0OsjlNDV8+FEO5c+2cipnC6WjPyCJ2X TZUo2+zcwW8g34TAjsFphWc= X-Received: by 2002:adf:dcc3:: with SMTP id x3mr8137121wrm.93.1591865973844; Thu, 11 Jun 2020 01:59:33 -0700 (PDT) Received: from cizrna.lan ([109.72.12.141]) by smtp.gmail.com with ESMTPSA id o20sm4205023wra.29.2020.06.11.01.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 01:59:33 -0700 (PDT) From: Tomeu Vizoso To: LKML Subject: [PATCH 2/2] panfrost: Add compatible string for bifrost Date: Thu, 11 Jun 2020 10:58:44 +0200 Message-Id: <20200611085900.49740-2-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200611085900.49740-1-tomeu.vizoso@collabora.com> References: <20200611085900.49740-1-tomeu.vizoso@collabora.com> 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: Tomeu Vizoso , David Airlie , dri-devel@lists.freedesktop.org, Steven Price , Alyssa Rosenzweig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mesa now supports some Bifrost devices, so enable it. Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + 1 file changed, 1 insertion(+) -- 2.21.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Steven Price diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 882fecc33fdb..8ff8e140f91e 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -677,6 +677,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-t830", .data = &default_data, }, { .compatible = "arm,mali-t860", .data = &default_data, }, { .compatible = "arm,mali-t880", .data = &default_data, }, + { .compatible = "arm,mali-bifrost", .data = &default_data, }, {} }; MODULE_DEVICE_TABLE(of, dt_match);