From patchwork Sun Jun 23 19:34:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13708720 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 77F94C27C4F for ; Sun, 23 Jun 2024 19:34:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EA2F10E0AE; Sun, 23 Jun 2024 19:34:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Zz4ClLMM"; dkim-atps=neutral Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF09310E0AE for ; Sun, 23 Jun 2024 19:34:26 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3608e6d14b6so2363566f8f.0 for ; Sun, 23 Jun 2024 12:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719171265; x=1719776065; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jlJ9HKaPN5zKWsVg50zksinAvfEscvtSvPK9OhtidXw=; b=Zz4ClLMMEdcgJtbzoKlQnFr9rSJZlKudAAxQj6wpYLP1z+/1GcbWq7qwklU0F+joZZ eYvHhhd6wCd3JBO/wLeNYUH/01rm0gh+yE9HRYWRYrRJkCp+nXGrH8igj6P5FMjPxdUn iLv1L/VUXoke2dp5yiBDkOVidS+45jSdRmeAB7QNLvTX6HsmPf9QF29qW6o2fmSXxqEo G93YsiXiE4uKQAsCpo+lrYs4Wy7skdWeb+qe3QYwuoGZDAYkL5xxr7R7P8imwJL/WIXm UafeFp8xJUABweZH+2nWAFhhRtlrR9vDQ5COyX2oB47qWCEEaMtTIKBCi7HUBSpQorhr WiKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719171265; x=1719776065; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jlJ9HKaPN5zKWsVg50zksinAvfEscvtSvPK9OhtidXw=; b=OgJoBo8Z8OmrhnkBB5mOQuye+XUOG5yp8UwtLY2iYqIAf7KbjnkF1j2+wgTkOOvoxX qAd5dYjJMZn8Px2vue4w7FkzICkMnqAQZsiMBm0Bc39pFjEWcfmSfxkcfvkexF/W2EyU Fq0DK5gZ2jB8HbcMCyfaAa75hdFUAQ9UPjo/aHL5E53OANNtepRFikX+UCIwE7jvROKh +D6hhjHW5G7CF/00pIbB0QFmJDxiqTn1rgqLE3wt6XePLSekDkGevj8aeK9hDwjvy/Bq dId+IRVQEHcLy+M96diNb5lyy1SCvbur/LjofGnTYxW5HsxutKmzX8Ok/Osd1alzp+0Z Om0Q== X-Forwarded-Encrypted: i=1; AJvYcCWB7pgiJsiuEAnf2Qt5M7OuyV4+P/Y8OTutkClFvb8065AtNquZR076a2zR3FFauJBa66sLo77wPdtHj6glwfw2+QFMgnUNQFRCe5Zirt7e X-Gm-Message-State: AOJu0Yx1eFEXn54fz7TB3vdaBGag2S+Ey4ew9O/mLCMvwe+ZSiYrRwV8 9dYPi72bHc2ECTuiQu8LVTt6QEoy0aoyiQUs7MLCTIPMojjBI2WoXsTWCYe7/Ms= X-Google-Smtp-Source: AGHT+IHxnvgnCBnVOx5YrWZI7IIYL0JKxRUHUwFMlSq0RLjcqe7o5RxhbPGXRRATXFAddTNZRIxxnA== X-Received: by 2002:adf:f003:0:b0:365:b695:ef76 with SMTP id ffacd0b85a97d-366e94d148amr1518807f8f.36.1719171265098; Sun, 23 Jun 2024 12:34:25 -0700 (PDT) Received: from krzk-bin.. ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4248179d1fdsm114756015e9.7.2024.06.23.12.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 12:34:24 -0700 (PDT) From: Krzysztof Kozlowski To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Sean Paul , Abhinav Kumar , Dmitry Baryshkov , Marijn Suijten , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Date: Sun, 23 Jun 2024 21:34:19 +0200 Message-ID: <20240623193420.333735-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit f30ac26def18 ("arm64: dts: qcom: add sm8150 GPU nodes") re-used amd,imageon compatible for the SM8150 just to enable headless mode due to missing display controller nodes. This work-around was later narrowed to the SM8150 MTP board in commit 1642ab96efa4 ("arm64: dts: qcom: sm8150: Don't start Adreno in headless mode"). This was not a correct solution, because the Qualcomm SM8150 SoC does not have an AMD GPU and the SM8150 MTP board does not have magically different GPU than SM8150 SoC. Rely on board compatible to achieve the same in a Devicetree-correct way. Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/msm/adreno/adreno_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index c3703a51287b..a8afe0b6429b 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -838,7 +838,8 @@ static int adreno_probe(struct platform_device *pdev) if (ret) return ret; - if (of_device_is_compatible(pdev->dev.of_node, "amd,imageon")) + if (of_device_is_compatible(pdev->dev.of_node, "amd,imageon") || + of_machine_is_compatible("qcom,sm8150-mtp")) adreno_device_register_headless(); return 0; From patchwork Sun Jun 23 19:34:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13708721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3D995C2BA18 for ; Sun, 23 Jun 2024 19:34:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 04E6410E0D5; Sun, 23 Jun 2024 19:34:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="C1fVLDFs"; dkim-atps=neutral Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FD3A10E0BB for ; Sun, 23 Jun 2024 19:34:29 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-52cdbc20faeso2144620e87.1 for ; Sun, 23 Jun 2024 12:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719171267; x=1719776067; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iDaFCIv9yP8iEYUX+Yf8rcMTPFjNoAdph08aEYT9HUg=; b=C1fVLDFsheA/4FBO5FXRUuSq4+Mpo/NAEBjAL3jQZoAchzsDl7sORwt6tSVOpx0n75 LdnznBd6t7bQ7+HhruNjNDjQG2QSEwAgUw6WlKG/OfuE293hip6BVuDUo7W1ohX5EDhH pTuBf2yOyh318sdHBNUVlmZDTRc4yZftVlKyW455XBI1XJDasE+Eg0CRSnzowe4MUhR4 XmRdltpPTpOIT9KJNyotSYRIPBrIM3Els/T7KriagyFy/8zF89Qt5oUWjNuDRXSWL3eT l79wI06WMhc0ygm9J+hMJJsZy8/Czk0knkvQROL4LcaV3VSN+rd2gnZ1k6nPbytxBdJ+ ylzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719171267; x=1719776067; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iDaFCIv9yP8iEYUX+Yf8rcMTPFjNoAdph08aEYT9HUg=; b=SIq1dE3Zwy7HrhXlZp9gWroiOKz2PGgWn961b3Ajl3ssulNfQD1BbIpRpp36PBcVro Rzz2vrMLWmvXZdh6D2Yui5S5kez5hO6MGT6FP4d0AVtZbSr30yNpILzZt0kQNP5xdWqn zcoQx9D42WX5Z1VjTuJssNMhxY9rrRwAO9FJuYjbN25ML/O5I1cTcbHUXlD0AnJ8Qxja +BRh3pCRKUOx/nI/TniVcd0wXW9pcDgiN8g5gDzQL/ij46DBwU5ufXLmD5wDwcDBN1vn VnE+ljm821Fm+NCmQN1Vfb9xTwzAPDFdUEwr2dIBXDnsbYAM16ZhGxU+i96/cAf8UkFi V6Bg== X-Forwarded-Encrypted: i=1; AJvYcCXALd2GqPrcX2D/Me3nYBMtqU/e9meHQGLfQiKt6yf7GZwZ/KzJJgjFTbbbVzg5H7i5PGaHFLzSihBYvdOi3MMZvPkv64tNTuJ4GH5q76Q/ X-Gm-Message-State: AOJu0YwPw6g9Y6qWiaMjNbSKEj60dpRTuw12a3fWKwi9VzlQirQbiSR6 iydXiqaplSYlnRNcZ11vh7Nrkkr7EkM23sOOfeZFh2kXLXSho4RKVUgkGpK1iF8= X-Google-Smtp-Source: AGHT+IFiF4v5vQQ8+INAB3JrDali3WgslfxwWLouELwfpZN6txtwJoppt3sxXUoF77ksqCi2N31WFw== X-Received: by 2002:a05:6512:1151:b0:52c:e6e8:7a91 with SMTP id 2adb3069b0e04-52ce6e87b8fmr457502e87.4.1719171266809; Sun, 23 Jun 2024 12:34:26 -0700 (PDT) Received: from krzk-bin.. ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4248179d1fdsm114756015e9.7.2024.06.23.12.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 12:34:26 -0700 (PDT) From: Krzysztof Kozlowski To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Sean Paul , Abhinav Kumar , Dmitry Baryshkov , Marijn Suijten , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] arm64: dts: qcom: sm8150-mtp: drop incorrect amd,imageon Date: Sun, 23 Jun 2024 21:34:20 +0200 Message-ID: <20240623193420.333735-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240623193420.333735-1-krzysztof.kozlowski@linaro.org> References: <20240623193420.333735-1-krzysztof.kozlowski@linaro.org> 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The SM8150 MTP board does not have magically different GPU than the SM8150, so it cannot use amd,imageon compatible, also pointed by dtbs_check: sm8150-mtp.dtb: gpu@2c00000: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,adreno-640.1', 'qcom,adreno', 'amd,imageon'] is too long 'qcom,adreno-640.1' does not match '^qcom,adreno-[0-9a-f]{8}$' 'qcom,adreno-640.1' does not match '^amd,imageon-200\\.[0-1]$' 'amd,imageon' was expected The incorrect amd,imageon compatible was added in commit f30ac26def18 ("arm64: dts: qcom: add sm8150 GPU nodes") to the SM8150 and later moved to the SM8150 MTP board in commit 1642ab96efa4 ("arm64: dts: qcom: sm8150: Don't start Adreno in headless mode") with an intention to allow headless mode. This should be solved via proper driver quirks, not fake compatibles. Signed-off-by: Krzysztof Kozlowski --- This change depends on previous driver support, unless we do not care because MTP is a development platform, not a product. --- arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150-mtp.dts b/arch/arm64/boot/dts/qcom/sm8150-mtp.dts index 286350ac7751..256a1ba94945 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8150-mtp.dts @@ -355,11 +355,6 @@ &gmu { }; &gpu { - /* - * NOTE: "amd,imageon" makes Adreno start in headless mode, remove it - * after display support is added on this board. - */ - compatible = "qcom,adreno-640.1", "qcom,adreno", "amd,imageon"; status = "okay"; };