linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm: fix race in Adreno header generation
@ 2025-08-23  2:09 Alex Robinson
  2025-08-23  2:19 ` Rob Clark
  2025-08-23 13:49 ` Dmitry Baryshkov
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Robinson @ 2025-08-23  2:09 UTC (permalink / raw)
  To: robin.clark
  Cc: lumag, abhinav.kumar, jessica.zhang, sean, marijn.suijten,
	airlied, simona, linux-arm-msm, dri-devel, freedreno,
	linux-kernel, Alex Robinson

Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
before adreno_common.xml.h is generated in trees that generate Adreno
headers at build time. Make msm-y depend on the generated headers,
removing the race.

Signed-off-by: Alex Robinson <alex@ironrobin.net>
---
 drivers/gpu/drm/msm/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index 0c0dfb25f01b..1a918d44ac48 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
 	generated/sfpb.xml.h
 
 $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
+$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
 $(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
 
 targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
-- 
2.50.1



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

* Re: [PATCH] drm/msm: fix race in Adreno header generation
  2025-08-23  2:09 [PATCH] drm/msm: fix race in Adreno header generation Alex Robinson
@ 2025-08-23  2:19 ` Rob Clark
  2025-08-23 13:49 ` Dmitry Baryshkov
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Clark @ 2025-08-23  2:19 UTC (permalink / raw)
  To: Alex Robinson
  Cc: lumag, abhinav.kumar, jessica.zhang, sean, marijn.suijten,
	airlied, simona, linux-arm-msm, dri-devel, freedreno,
	linux-kernel, Akhil P Oommen

On Fri, Aug 22, 2025 at 7:09 PM Alex Robinson <alex@ironrobin.net> wrote:
>
> Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
> before adreno_common.xml.h is generated in trees that generate Adreno
> headers at build time. Make msm-y depend on the generated headers,
> removing the race.
>
> Signed-off-by: Alex Robinson <alex@ironrobin.net>

looks like the issue is introduced by:
https://patchwork.freedesktop.org/patch/664829/?series=151864&rev=1

BR,
-R

> ---
>  drivers/gpu/drm/msm/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 0c0dfb25f01b..1a918d44ac48 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
>         generated/sfpb.xml.h
>
>  $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> +$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
>  $(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
>
>  targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
> --
> 2.50.1
>
>

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

* Re: [PATCH] drm/msm: fix race in Adreno header generation
  2025-08-23  2:09 [PATCH] drm/msm: fix race in Adreno header generation Alex Robinson
  2025-08-23  2:19 ` Rob Clark
@ 2025-08-23 13:49 ` Dmitry Baryshkov
  2025-08-23 14:16   ` Rob Clark
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-08-23 13:49 UTC (permalink / raw)
  To: Alex Robinson
  Cc: robin.clark, lumag, abhinav.kumar, jessica.zhang, sean,
	marijn.suijten, airlied, simona, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sat, Aug 23, 2025 at 02:09:39AM +0000, Alex Robinson wrote:
> Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
> before adreno_common.xml.h is generated in trees that generate Adreno
> headers at build time. Make msm-y depend on the generated headers,
> removing the race.
> 
> Signed-off-by: Alex Robinson <alex@ironrobin.net>
> ---
>  drivers/gpu/drm/msm/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 0c0dfb25f01b..1a918d44ac48 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
>  	generated/sfpb.xml.h
>  
>  $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> +$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))

I'd say, no. The idea was that msm-y should not depend on
ADRENO_HEADERS. If there is any dependency, please move it to adreno-y.

>  $(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
>  
>  targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
> -- 
> 2.50.1
> 
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH] drm/msm: fix race in Adreno header generation
  2025-08-23 13:49 ` Dmitry Baryshkov
@ 2025-08-23 14:16   ` Rob Clark
  2025-08-25 16:23     ` Akhil P Oommen
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Clark @ 2025-08-23 14:16 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Alex Robinson, lumag, abhinav.kumar, jessica.zhang, sean,
	marijn.suijten, airlied, simona, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sat, Aug 23, 2025 at 6:49 AM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Sat, Aug 23, 2025 at 02:09:39AM +0000, Alex Robinson wrote:
> > Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
> > before adreno_common.xml.h is generated in trees that generate Adreno
> > headers at build time. Make msm-y depend on the generated headers,
> > removing the race.
> >
> > Signed-off-by: Alex Robinson <alex@ironrobin.net>
> > ---
> >  drivers/gpu/drm/msm/Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> > index 0c0dfb25f01b..1a918d44ac48 100644
> > --- a/drivers/gpu/drm/msm/Makefile
> > +++ b/drivers/gpu/drm/msm/Makefile
> > @@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
> >       generated/sfpb.xml.h
> >
> >  $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> > +$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
>
> I'd say, no. The idea was that msm-y should not depend on
> ADRENO_HEADERS. If there is any dependency, please move it to adreno-y.

probably we should s/adreno/gpu/ and move all the msm_gpu*.* there..

In the mean time, I think we were going to drop this patch from the IFPC series

BR,
-R

> >  $(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
> >
> >  targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
> > --
> > 2.50.1
> >
> >
>
> --
> With best wishes
> Dmitry

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

* Re: [PATCH] drm/msm: fix race in Adreno header generation
  2025-08-23 14:16   ` Rob Clark
@ 2025-08-25 16:23     ` Akhil P Oommen
  2025-08-25 17:48       ` Rob Clark
  0 siblings, 1 reply; 7+ messages in thread
From: Akhil P Oommen @ 2025-08-25 16:23 UTC (permalink / raw)
  To: rob.clark, Dmitry Baryshkov
  Cc: Alex Robinson, lumag, abhinav.kumar, jessica.zhang, sean,
	marijn.suijten, airlied, simona, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On 8/23/2025 7:46 PM, Rob Clark wrote:
> On Sat, Aug 23, 2025 at 6:49 AM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
>>
>> On Sat, Aug 23, 2025 at 02:09:39AM +0000, Alex Robinson wrote:
>>> Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
>>> before adreno_common.xml.h is generated in trees that generate Adreno
>>> headers at build time. Make msm-y depend on the generated headers,
>>> removing the race.
>>>
>>> Signed-off-by: Alex Robinson <alex@ironrobin.net>
>>> ---
>>>  drivers/gpu/drm/msm/Makefile | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
>>> index 0c0dfb25f01b..1a918d44ac48 100644
>>> --- a/drivers/gpu/drm/msm/Makefile
>>> +++ b/drivers/gpu/drm/msm/Makefile
>>> @@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
>>>       generated/sfpb.xml.h
>>>
>>>  $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
>>> +$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
>>
>> I'd say, no. The idea was that msm-y should not depend on
>> ADRENO_HEADERS. If there is any dependency, please move it to adreno-y.
> 
> probably we should s/adreno/gpu/ and move all the msm_gpu*.* there..
> 
> In the mean time, I think we were going to drop this patch from the IFPC series

Yeah. I will drop that patch.

Btw, was my usage of adreno_gpu symbol in msm_gpu* files incorrect?

-Akhil

> 
> BR,
> -R
> 
>>>  $(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
>>>
>>>  targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
>>> --
>>> 2.50.1
>>>
>>>
>>
>> --
>> With best wishes
>> Dmitry


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

* Re: [PATCH] drm/msm: fix race in Adreno header generation
  2025-08-25 16:23     ` Akhil P Oommen
@ 2025-08-25 17:48       ` Rob Clark
  2025-08-25 19:59         ` Dmitry Baryshkov
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Clark @ 2025-08-25 17:48 UTC (permalink / raw)
  To: Akhil P Oommen
  Cc: Dmitry Baryshkov, Alex Robinson, lumag, abhinav.kumar,
	jessica.zhang, sean, marijn.suijten, airlied, simona,
	linux-arm-msm, dri-devel, freedreno, linux-kernel

On Mon, Aug 25, 2025 at 9:23 AM Akhil P Oommen <akhilpo@oss.qualcomm.com> wrote:
>
> On 8/23/2025 7:46 PM, Rob Clark wrote:
> > On Sat, Aug 23, 2025 at 6:49 AM Dmitry Baryshkov
> > <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >>
> >> On Sat, Aug 23, 2025 at 02:09:39AM +0000, Alex Robinson wrote:
> >>> Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
> >>> before adreno_common.xml.h is generated in trees that generate Adreno
> >>> headers at build time. Make msm-y depend on the generated headers,
> >>> removing the race.
> >>>
> >>> Signed-off-by: Alex Robinson <alex@ironrobin.net>
> >>> ---
> >>>  drivers/gpu/drm/msm/Makefile | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> >>> index 0c0dfb25f01b..1a918d44ac48 100644
> >>> --- a/drivers/gpu/drm/msm/Makefile
> >>> +++ b/drivers/gpu/drm/msm/Makefile
> >>> @@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
> >>>       generated/sfpb.xml.h
> >>>
> >>>  $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> >>> +$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> >>
> >> I'd say, no. The idea was that msm-y should not depend on
> >> ADRENO_HEADERS. If there is any dependency, please move it to adreno-y.
> >
> > probably we should s/adreno/gpu/ and move all the msm_gpu*.* there..
> >
> > In the mean time, I think we were going to drop this patch from the IFPC series
>
> Yeah. I will drop that patch.
>
> Btw, was my usage of adreno_gpu symbol in msm_gpu* files incorrect?

I suppose _technically_ it is, but the split btwn msm_gpu and adreno
really only made sense for a2xx, and only if we tried to upstream the
old 2d core, which never happened

BR,
-R

> -Akhil
>
> >
> > BR,
> > -R
> >
> >>>  $(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
> >>>
> >>>  targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
> >>> --
> >>> 2.50.1
> >>>
> >>>
> >>
> >> --
> >> With best wishes
> >> Dmitry
>

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

* Re: [PATCH] drm/msm: fix race in Adreno header generation
  2025-08-25 17:48       ` Rob Clark
@ 2025-08-25 19:59         ` Dmitry Baryshkov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-08-25 19:59 UTC (permalink / raw)
  To: Rob Clark
  Cc: Akhil P Oommen, Alex Robinson, lumag, abhinav.kumar,
	jessica.zhang, sean, marijn.suijten, airlied, simona,
	linux-arm-msm, dri-devel, freedreno, linux-kernel

On Mon, Aug 25, 2025 at 10:48:06AM -0700, Rob Clark wrote:
> On Mon, Aug 25, 2025 at 9:23 AM Akhil P Oommen <akhilpo@oss.qualcomm.com> wrote:
> >
> > On 8/23/2025 7:46 PM, Rob Clark wrote:
> > > On Sat, Aug 23, 2025 at 6:49 AM Dmitry Baryshkov
> > > <dmitry.baryshkov@oss.qualcomm.com> wrote:
> > >>
> > >> On Sat, Aug 23, 2025 at 02:09:39AM +0000, Alex Robinson wrote:
> > >>> Builds can compile msm-y objects (e.g. msm_gpu_devfreq.o)
> > >>> before adreno_common.xml.h is generated in trees that generate Adreno
> > >>> headers at build time. Make msm-y depend on the generated headers,
> > >>> removing the race.
> > >>>
> > >>> Signed-off-by: Alex Robinson <alex@ironrobin.net>
> > >>> ---
> > >>>  drivers/gpu/drm/msm/Makefile | 1 +
> > >>>  1 file changed, 1 insertion(+)
> > >>>
> > >>> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> > >>> index 0c0dfb25f01b..1a918d44ac48 100644
> > >>> --- a/drivers/gpu/drm/msm/Makefile
> > >>> +++ b/drivers/gpu/drm/msm/Makefile
> > >>> @@ -221,6 +221,7 @@ DISPLAY_HEADERS = \
> > >>>       generated/sfpb.xml.h
> > >>>
> > >>>  $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> > >>> +$(addprefix $(obj)/,$(msm-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
> > >>
> > >> I'd say, no. The idea was that msm-y should not depend on
> > >> ADRENO_HEADERS. If there is any dependency, please move it to adreno-y.
> > >
> > > probably we should s/adreno/gpu/ and move all the msm_gpu*.* there..
> > >
> > > In the mean time, I think we were going to drop this patch from the IFPC series
> >
> > Yeah. I will drop that patch.
> >
> > Btw, was my usage of adreno_gpu symbol in msm_gpu* files incorrect?
> 
> I suppose _technically_ it is, but the split btwn msm_gpu and adreno
> really only made sense for a2xx, and only if we tried to upstream the
> old 2d core, which never happened

Granted that there seem to be nobody interested in OpenVG anymore, I
suggest we forget that Z180 existed. I think it would be wise to
simplify things for the GPU cores (merging more of the msm_gpu_* into
adreno/).

-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2025-08-25 19:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-23  2:09 [PATCH] drm/msm: fix race in Adreno header generation Alex Robinson
2025-08-23  2:19 ` Rob Clark
2025-08-23 13:49 ` Dmitry Baryshkov
2025-08-23 14:16   ` Rob Clark
2025-08-25 16:23     ` Akhil P Oommen
2025-08-25 17:48       ` Rob Clark
2025-08-25 19:59         ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).