* [PATCH] drm/msm: Fix the a650 hw_apriv check
@ 2020-09-15 15:56 ` Jordan Crouse
0 siblings, 0 replies; 4+ messages in thread
From: Jordan Crouse @ 2020-09-15 15:56 UTC (permalink / raw)
To: linux-arm-msm
Cc: Akhil P Oommen, Daniel Vetter, David Airlie, Eric Anholt,
Jonathan Marek, Rob Clark, Sean Paul, Sharat Masetty, dri-devel,
freedreno, linux-kernel
Commit 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
was checking the result of adreno_is_a650() before the gpu revision
got probed in adreno_gpu_init() so it was always coming across as
false. Snoop into the revision ID ahead of time to correctly set the
hw_apriv flag so that it can be used by msm_gpu to properly setup
global buffers.
Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 74bc27eb4203..f3b6d93c207c 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1048,6 +1048,8 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
{
struct msm_drm_private *priv = dev->dev_private;
struct platform_device *pdev = priv->gpu_pdev;
+ struct adreno_platform_config *config = pdev->dev.platform_data;
+ const struct adreno_info *info;
struct device_node *node;
struct a6xx_gpu *a6xx_gpu;
struct adreno_gpu *adreno_gpu;
@@ -1064,7 +1066,14 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
adreno_gpu->registers = NULL;
adreno_gpu->reg_offsets = a6xx_register_offsets;
- if (adreno_is_a650(adreno_gpu))
+ /*
+ * We need to know the platform type before calling into adreno_gpu_init
+ * so that the hw_apriv flag can be correctly set. Snoop into the info
+ * and grab the revision number
+ */
+ info = adreno_info(config->rev);
+
+ if (info && info->revn == 650)
adreno_gpu->base.hw_apriv = true;
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/msm: Fix the a650 hw_apriv check
@ 2020-09-15 15:56 ` Jordan Crouse
0 siblings, 0 replies; 4+ messages in thread
From: Jordan Crouse @ 2020-09-15 15:56 UTC (permalink / raw)
To: linux-arm-msm
Cc: Jonathan Marek, David Airlie, freedreno, Sharat Masetty,
Akhil P Oommen, dri-devel, linux-kernel, Sean Paul
Commit 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
was checking the result of adreno_is_a650() before the gpu revision
got probed in adreno_gpu_init() so it was always coming across as
false. Snoop into the revision ID ahead of time to correctly set the
hw_apriv flag so that it can be used by msm_gpu to properly setup
global buffers.
Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 74bc27eb4203..f3b6d93c207c 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1048,6 +1048,8 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
{
struct msm_drm_private *priv = dev->dev_private;
struct platform_device *pdev = priv->gpu_pdev;
+ struct adreno_platform_config *config = pdev->dev.platform_data;
+ const struct adreno_info *info;
struct device_node *node;
struct a6xx_gpu *a6xx_gpu;
struct adreno_gpu *adreno_gpu;
@@ -1064,7 +1066,14 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
adreno_gpu->registers = NULL;
adreno_gpu->reg_offsets = a6xx_register_offsets;
- if (adreno_is_a650(adreno_gpu))
+ /*
+ * We need to know the platform type before calling into adreno_gpu_init
+ * so that the hw_apriv flag can be correctly set. Snoop into the info
+ * and grab the revision number
+ */
+ info = adreno_info(config->rev);
+
+ if (info && info->revn == 650)
adreno_gpu->base.hw_apriv = true;
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
--
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Freedreno] [PATCH] drm/msm: Fix the a650 hw_apriv check
2020-09-15 15:56 ` Jordan Crouse
@ 2020-09-15 16:01 ` Jonathan Marek
-1 siblings, 0 replies; 4+ messages in thread
From: Jonathan Marek @ 2020-09-15 16:01 UTC (permalink / raw)
To: Jordan Crouse, linux-arm-msm
Cc: David Airlie, freedreno, Sharat Masetty, Akhil P Oommen,
dri-devel, linux-kernel, Eric Anholt, Rob Clark, Daniel Vetter,
Sean Paul
On 9/15/20 11:56 AM, Jordan Crouse wrote:
> Commit 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
> was checking the result of adreno_is_a650() before the gpu revision
> got probed in adreno_gpu_init() so it was always coming across as
> false. Snoop into the revision ID ahead of time to correctly set the
> hw_apriv flag so that it can be used by msm_gpu to properly setup
> global buffers.
>
> Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Tested-by: Jonathan Marek <jonathan@marek.ca>
> ---
>
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index 74bc27eb4203..f3b6d93c207c 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -1048,6 +1048,8 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
> {
> struct msm_drm_private *priv = dev->dev_private;
> struct platform_device *pdev = priv->gpu_pdev;
> + struct adreno_platform_config *config = pdev->dev.platform_data;
> + const struct adreno_info *info;
> struct device_node *node;
> struct a6xx_gpu *a6xx_gpu;
> struct adreno_gpu *adreno_gpu;
> @@ -1064,7 +1066,14 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
> adreno_gpu->registers = NULL;
> adreno_gpu->reg_offsets = a6xx_register_offsets;
>
> - if (adreno_is_a650(adreno_gpu))
> + /*
> + * We need to know the platform type before calling into adreno_gpu_init
> + * so that the hw_apriv flag can be correctly set. Snoop into the info
> + * and grab the revision number
> + */
> + info = adreno_info(config->rev);
> +
> + if (info && info->revn == 650)
> adreno_gpu->base.hw_apriv = true;
>
> ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Freedreno] [PATCH] drm/msm: Fix the a650 hw_apriv check
@ 2020-09-15 16:01 ` Jonathan Marek
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Marek @ 2020-09-15 16:01 UTC (permalink / raw)
To: Jordan Crouse, linux-arm-msm
Cc: David Airlie, Sean Paul, Sharat Masetty, Akhil P Oommen,
dri-devel, linux-kernel, freedreno
On 9/15/20 11:56 AM, Jordan Crouse wrote:
> Commit 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
> was checking the result of adreno_is_a650() before the gpu revision
> got probed in adreno_gpu_init() so it was always coming across as
> false. Snoop into the revision ID ahead of time to correctly set the
> hw_apriv flag so that it can be used by msm_gpu to properly setup
> global buffers.
>
> Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650")
> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Tested-by: Jonathan Marek <jonathan@marek.ca>
> ---
>
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index 74bc27eb4203..f3b6d93c207c 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -1048,6 +1048,8 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
> {
> struct msm_drm_private *priv = dev->dev_private;
> struct platform_device *pdev = priv->gpu_pdev;
> + struct adreno_platform_config *config = pdev->dev.platform_data;
> + const struct adreno_info *info;
> struct device_node *node;
> struct a6xx_gpu *a6xx_gpu;
> struct adreno_gpu *adreno_gpu;
> @@ -1064,7 +1066,14 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
> adreno_gpu->registers = NULL;
> adreno_gpu->reg_offsets = a6xx_register_offsets;
>
> - if (adreno_is_a650(adreno_gpu))
> + /*
> + * We need to know the platform type before calling into adreno_gpu_init
> + * so that the hw_apriv flag can be correctly set. Snoop into the info
> + * and grab the revision number
> + */
> + info = adreno_info(config->rev);
> +
> + if (info && info->revn == 650)
> adreno_gpu->base.hw_apriv = true;
>
> ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-15 22:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 15:56 [PATCH] drm/msm: Fix the a650 hw_apriv check Jordan Crouse
2020-09-15 15:56 ` Jordan Crouse
2020-09-15 16:01 ` [Freedreno] " Jonathan Marek
2020-09-15 16:01 ` Jonathan Marek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.