mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP
@ 2024-06-23 19:34 Krzysztof Kozlowski
  2024-06-23 19:34 ` [PATCH 2/2] arm64: dts: qcom: sm8150-mtp: drop incorrect amd,imageon Krzysztof Kozlowski
  2024-06-24 14:06 ` [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Konrad Dybcio
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 19:34 UTC (permalink / raw)
  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, devicetree, linux-kernel, dri-devel, freedreno
  Cc: Krzysztof Kozlowski

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 <krzysztof.kozlowski@linaro.org>
---
 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;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: sm8150-mtp: drop incorrect amd,imageon
  2024-06-23 19:34 [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Krzysztof Kozlowski
@ 2024-06-23 19:34 ` Krzysztof Kozlowski
  2024-06-24 14:06 ` [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Konrad Dybcio
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 19:34 UTC (permalink / raw)
  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, devicetree, linux-kernel, dri-devel, freedreno
  Cc: Krzysztof Kozlowski

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 <krzysztof.kozlowski@linaro.org>

---

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";
 };
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP
  2024-06-23 19:34 [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Krzysztof Kozlowski
  2024-06-23 19:34 ` [PATCH 2/2] arm64: dts: qcom: sm8150-mtp: drop incorrect amd,imageon Krzysztof Kozlowski
@ 2024-06-24 14:06 ` Konrad Dybcio
  2024-06-24 14:10   ` Krzysztof Kozlowski
  2024-06-24 15:13   ` Dmitry Baryshkov
  1 sibling, 2 replies; 5+ messages in thread
From: Konrad Dybcio @ 2024-06-24 14:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Rob Clark, Sean Paul,
	Abhinav Kumar, Dmitry Baryshkov, Marijn Suijten, David Airlie,
	Daniel Vetter, linux-arm-msm, devicetree, linux-kernel,
	dri-devel, freedreno



On 6/23/24 21:34, Krzysztof Kozlowski wrote:
> 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 <krzysztof.kozlowski@linaro.org>
> ---

Let's just forget this exists, this was a hack from the start and not
a very necessary one given display bringup followed soon..

This should be handled by a module parameter if anything

Konrad

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP
  2024-06-24 14:06 ` [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Konrad Dybcio
@ 2024-06-24 14:10   ` Krzysztof Kozlowski
  2024-06-24 15:13   ` Dmitry Baryshkov
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-24 14:10 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Rob Clark, Sean Paul, Abhinav Kumar,
	Dmitry Baryshkov, Marijn Suijten, David Airlie, Daniel Vetter,
	linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno

On 24/06/2024 16:06, Konrad Dybcio wrote:
> 
> 
> On 6/23/24 21:34, Krzysztof Kozlowski wrote:
>> 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 <krzysztof.kozlowski@linaro.org>
>> ---
> 
> Let's just forget this exists, this was a hack from the start and not
> a very necessary one given display bringup followed soon..
> 

This will affect SM8150-MTP, but I don't mind. This patch can be just
ignored and only the second patch - DTS - picked up via Qcom soc.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP
  2024-06-24 14:06 ` [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Konrad Dybcio
  2024-06-24 14:10   ` Krzysztof Kozlowski
@ 2024-06-24 15:13   ` Dmitry Baryshkov
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-06-24 15:13 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Rob Clark, Sean Paul,
	Abhinav Kumar, Marijn Suijten, David Airlie, Daniel Vetter,
	linux-arm-msm, devicetree, linux-kernel, dri-devel, freedreno

On Mon, Jun 24, 2024 at 04:06:24PM GMT, Konrad Dybcio wrote:
> 
> 
> On 6/23/24 21:34, Krzysztof Kozlowski wrote:
> > 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 <krzysztof.kozlowski@linaro.org>
> > ---
> 
> Let's just forget this exists, this was a hack from the start and not
> a very necessary one given display bringup followed soon..
> 
> This should be handled by a module parameter if anything

We discussed having a modparam for separate KMS and GPU msm drivers, but
I've never implemented it.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-24 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-23 19:34 [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Krzysztof Kozlowski
2024-06-23 19:34 ` [PATCH 2/2] arm64: dts: qcom: sm8150-mtp: drop incorrect amd,imageon Krzysztof Kozlowski
2024-06-24 14:06 ` [PATCH 1/2] drm/msm/adreno: allow headless setup on SM8150 MTP Konrad Dybcio
2024-06-24 14:10   ` Krzysztof Kozlowski
2024-06-24 15:13   ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®