Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp672832pxk; Wed, 16 Sep 2020 14:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2sK3AcUNeaAAWRvQjQJdHaK0ei2NNTkyEgQY7dxBE6Up9pffc1MEl3ShMcT/DjZzsJ3zG X-Received: by 2002:a05:6402:16c9:: with SMTP id r9mr29032661edx.27.1600290200097; Wed, 16 Sep 2020 14:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600290200; cv=none; d=google.com; s=arc-20160816; b=VpqvhBG6mIEZfowXJ5SIR4zAbs0TEL9r0rwW/WNZ9UEvoaDuh+7kJZAVGIHF+Y9GQ7 P9eE50UX2dwVIxTPBEdImfpcW8GEnlvXeTT35dxrGbUQ5hR45s+MWUcU56BQiiPcs0V5 TaT9dzyd+WCTDejLCOOlQwKlGraXErUtxR1X0G34EW3jWwL3dAJbXZTMn1Hx0cYJrpP4 3+oushOzZJzajGiI6voQrEQIL4JSZMPJ03rbEbJL3IvrN2+l8P/nSYM3jVMKl2EDrUDZ BdJp720esd1mJs+WTVGG+wjM19g50sFKUb4Ik9yOzpNHlDeeyOXCTpAmkpyhHeb77wpv YlUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hImJ77lnVX3Gt8BtSBrQ9L58KJd7sxpK5SqbvVqBDT4=; b=G1eBGUAgrkJM5yM+Gd5I7ArHluhDuu97MAgLCxQ1Dfz1uJqYO/ILv/0YSb0nOEY1Pj 81lelFo4eKfYDK369hrp8jbK8Vpf/SViZjrpOztiRxxvIMKEtXlp1zhKDg3+MBZ84und fmAH8y4YiqRGbgSTTU1pax/lN6pOJU2a7qa06cOXG+ix9KjvXpaDl5/rZLf9706MPYOv oTRZDhz/f01eWdaqv7b9hGbJbBAqAgfLz6c+kNJ+pwmRydFY2aUm31wVXVvoi+gXZ7Yy 6IGUfytDpu1028zNz2jEqsqx8chOPsuWmR/egtyw/xXjzneiFz+Vjqemc96WEU5i5pbn iyYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=zn+OYs3Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mc3si13078408ejb.404.2020.09.16.14.02.52; Wed, 16 Sep 2020 14:03:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=zn+OYs3Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726433AbgIPVBx (ORCPT + 99 others); Wed, 16 Sep 2020 17:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbgIPQaY (ORCPT ); Wed, 16 Sep 2020 12:30:24 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC669C0D9430 for ; Wed, 16 Sep 2020 08:01:55 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id e16so7308380wrm.2 for ; Wed, 16 Sep 2020 08:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hImJ77lnVX3Gt8BtSBrQ9L58KJd7sxpK5SqbvVqBDT4=; b=zn+OYs3Yc6TjDeDMLiJWpLLWggFqYNeLgm6J18K4sU21Tf8A707dIRS/zJPSWEBT2o mOrJtvn+/XGRVorYTU1AR22L+QJt+mapeRzWYs+8v78LOCpeuWjvFgy3Ve1kCJjDlKzk vc6ow+f7V56/J3+1AB12ZA0MTx3oPMNEuiXq1S2mNaVT9aJrcGow+Nd2Z+dB2ii9rkkf aX5fRJNsu46XIPQpdADaIQEhHFm6Ix91chLutkMAfxAGo9b/yfulX/dAIMbMAliOiff1 c9EY0xmyHleE6D1Iq2v8+pccK4susTBg181AxyOhknWw2l3AfwxxqxgLUtujtfkihSdi O3EQ== 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:mime-version:content-transfer-encoding; bh=hImJ77lnVX3Gt8BtSBrQ9L58KJd7sxpK5SqbvVqBDT4=; b=dM9DQsDtu92hrjjc0vvCkGsEunQpOndOSbSOh/nwwJ4b0Fytu5OHr/g/XephtDNeFF ZTXYqC6ux6Z31DNmofWrdW6+G2hL+FGMmSoImH6l4RyIBABxIpODteX1JTXs/lbsabWv ujqVOetHz/vpvSHI4JvNfl7EWXqBHKsd+E1s7MZtVjMVI8lsP4fdxA30tqe39hZb1J66 Ag90zc6AaPtNbSACVtxsUvOvmaNJ7s1lOjz/nLAab4/k+PDHjoN7hTGIHHw+fCmMTSUx XcmRBU4GOIRQWBjySBI+O4rXo9oGG93SAQByx3dQYBUZHi6hCpgRS0+4hQ0i0FAtSR7q uTqA== X-Gm-Message-State: AOAM530DvDfqmhfBWeh6W1TZ/9ji7OeVjGrsVotwb0Ke8dpt5JVO2uEC PlAF9h1s041bof1l3ka1mgXV6A== X-Received: by 2002:adf:eecb:: with SMTP id a11mr27578093wrp.356.1600268514278; Wed, 16 Sep 2020 08:01:54 -0700 (PDT) Received: from bender.baylibre.local (home.beaume.starnux.net. [82.236.8.43]) by smtp.gmail.com with ESMTPSA id m3sm33275243wrs.83.2020.09.16.08.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 08:01:53 -0700 (PDT) From: Neil Armstrong To: robh@kernel.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Neil Armstrong Subject: [PATCH v2 1/3] drm/panfrost: add support for vendor quirk Date: Wed, 16 Sep 2020 17:01:45 +0200 Message-Id: <20200916150147.25753-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200916150147.25753-1-narmstrong@baylibre.com> References: <20200916150147.25753-1-narmstrong@baylibre.com> 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 The T820, G31 & G52 GPUs integratewd by Amlogic in the respective GXM, G12A/SM1 & G12B SoCs needs a quirk in the PWR registers after each reset. This adds a callback in the device compatible struct of permit this. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/panfrost/panfrost_device.h | 3 +++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h index abfc78db193a..140e004a3790 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.h +++ b/drivers/gpu/drm/panfrost/panfrost_device.h @@ -70,6 +70,9 @@ struct panfrost_compatible { int num_pm_domains; /* Only required if num_pm_domains > 1. */ const char * const *pm_domain_names; + + /* Vendor implementation quirks callback */ + void (*vendor_quirk)(struct panfrost_device *pfdev); }; struct panfrost_device { diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index c7c5da5a31d4..a6de78bc1fa8 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -136,6 +136,10 @@ static void panfrost_gpu_init_quirks(struct panfrost_device *pfdev) if (quirks) gpu_write(pfdev, GPU_JM_CONFIG, quirks); + + /* Here goes platform specific quirks */ + if (pfdev->comp->vendor_quirk) + pfdev->comp->vendor_quirk(pfdev); } #define MAX_HW_REVS 6 -- 2.22.0