[PATCH v2 05/21] drm/imagination: Use more specific compatible strings

Matt Coster posted 21 patches 6 days ago
[PATCH v2 05/21] drm/imagination: Use more specific compatible strings
Posted by Matt Coster 6 days ago
Follow-on from the companion dt-bindings change ("dt-bindings: gpu: img:
More explicit compatible strings"), deprecating "img,img-axe" in favour of
the more specific "img,img-axe-1-16m".

Keep the previous compatible string around for backwards compatibility.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
---
Changes in v2:
- None
- Link to v1: https://lore.kernel.org/r/20241105-sets-bxs-4-64-patch-v1-v1-5-4ed30e865892@imgtec.com
---
 drivers/gpu/drm/imagination/pvr_drv.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagination/pvr_drv.c
index 684a9b9a2247b8f5b0f4a91ec984af2cff5a4c29..fbd8802abcf1271e260209957d95ea705dbe7f14 100644
--- a/drivers/gpu/drm/imagination/pvr_drv.c
+++ b/drivers/gpu/drm/imagination/pvr_drv.c
@@ -1471,6 +1471,16 @@ static void pvr_remove(struct platform_device *plat_dev)
 }
 
 static const struct of_device_id dt_match[] = {
+	{ .compatible = "img,img-rogue", .data = NULL },
+
+	/* All supported GPU models */
+	{ .compatible = "img,img-axe-1-16m", .data = NULL },
+
+	/*
+	 * This legacy compatible string was introduced early on before the more specific GPU
+	 * identifiers were used. Keep it around here for compatibility, but never use
+	 * "img,img-axe" in new devicetrees.
+	 */
 	{ .compatible = "img,img-axe", .data = NULL },
 	{}
 };

-- 
2.47.0
Re: [PATCH v2 05/21] drm/imagination: Use more specific compatible strings
Posted by Krzysztof Kozlowski 4 days, 4 hours ago
On 18/11/2024 14:01, Matt Coster wrote:
> Follow-on from the companion dt-bindings change ("dt-bindings: gpu: img:
> More explicit compatible strings"), deprecating "img,img-axe" in favour of
> the more specific "img,img-axe-1-16m".
> 
> Keep the previous compatible string around for backwards compatibility.
> 
> Signed-off-by: Matt Coster <matt.coster@imgtec.com>
> ---
> Changes in v2:
> - None
> - Link to v1: https://lore.kernel.org/r/20241105-sets-bxs-4-64-patch-v1-v1-5-4ed30e865892@imgtec.com
> ---
>  drivers/gpu/drm/imagination/pvr_drv.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagination/pvr_drv.c
> index 684a9b9a2247b8f5b0f4a91ec984af2cff5a4c29..fbd8802abcf1271e260209957d95ea705dbe7f14 100644
> --- a/drivers/gpu/drm/imagination/pvr_drv.c
> +++ b/drivers/gpu/drm/imagination/pvr_drv.c
> @@ -1471,6 +1471,16 @@ static void pvr_remove(struct platform_device *plat_dev)
>  }
>  
>  static const struct of_device_id dt_match[] = {
> +	{ .compatible = "img,img-rogue", .data = NULL },
> +
> +	/* All supported GPU models */
> +	{ .compatible = "img,img-axe-1-16m", .data = NULL },

This makes no sense. It's the same as rogue. Use compatibility properly.

Best regards,
Krzysztof