diff mbox series

[v2,2/2] drm/ci: validate drm/msm XML register files against schema

Message ID 20240503-fd-fix-lxml-v2-2-f80a60ce21a1@linaro.org
State New
Headers show
Series drm/msm/gen_header: allow skipping the validation | expand

Commit Message

Dmitry Baryshkov May 3, 2024, 6:15 p.m. UTC
In order to validate drm/msm register definition files against schema,
reuse the nodebugfs build step. The validation entry is guarded by
the EXPERT Kconfig option and we don't want to enable that option for
all the builds.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/ci/build.sh  | 3 +++
 drivers/gpu/drm/ci/build.yml | 1 +
 2 files changed, 4 insertions(+)

Comments

Dmitry Baryshkov May 3, 2024, 8:20 p.m. UTC | #1
On Fri, 3 May 2024 at 22:42, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>
>
>
> On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote:
> > In order to validate drm/msm register definition files against schema,
> > reuse the nodebugfs build step. The validation entry is guarded by
> > the EXPERT Kconfig option and we don't want to enable that option for
> > all the builds.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >   drivers/gpu/drm/ci/build.sh  | 3 +++
> >   drivers/gpu/drm/ci/build.yml | 1 +
> >   2 files changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
> > index 106f2d40d222..28a495c0c39c 100644
> > --- a/drivers/gpu/drm/ci/build.sh
> > +++ b/drivers/gpu/drm/ci/build.sh
> > @@ -12,6 +12,9 @@ rm -rf .git/rebase-apply
> >   apt-get update
> >   apt-get install -y libssl-dev
> >
> > +# for msm header validation
> > +apt-get install -y python3-lxml
> > +
> >   if [[ "$KERNEL_ARCH" = "arm64" ]]; then
> >       GCC_ARCH="aarch64-linux-gnu"
> >       DEBIAN_ARCH="arm64"
> > diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
> > index 17ab38304885..9c198239033d 100644
> > --- a/drivers/gpu/drm/ci/build.yml
> > +++ b/drivers/gpu/drm/ci/build.yml
> > @@ -106,6 +106,7 @@ build-nodebugfs:arm64:
> >     extends: .build:arm64
> >     variables:
> >       DISABLE_KCONFIGS: "DEBUG_FS"
> > +    ENABLE_KCONFIGS: "EXPERT DRM_MSM_VALIDATE_XML"
> >
>
> Wouldnt this end up enabling DRM_MSM_VALIDATE_XML for any arm64 device.
>
> Cant we make this build rule msm specific?

No need to. We just need to validate the files at least once during
the whole pipeline build.
Abhinav Kumar May 3, 2024, 10:38 p.m. UTC | #2
On 5/3/2024 1:20 PM, Dmitry Baryshkov wrote:
> On Fri, 3 May 2024 at 22:42, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>>
>>
>> On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote:
>>> In order to validate drm/msm register definition files against schema,
>>> reuse the nodebugfs build step. The validation entry is guarded by
>>> the EXPERT Kconfig option and we don't want to enable that option for
>>> all the builds.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>    drivers/gpu/drm/ci/build.sh  | 3 +++
>>>    drivers/gpu/drm/ci/build.yml | 1 +
>>>    2 files changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
>>> index 106f2d40d222..28a495c0c39c 100644
>>> --- a/drivers/gpu/drm/ci/build.sh
>>> +++ b/drivers/gpu/drm/ci/build.sh
>>> @@ -12,6 +12,9 @@ rm -rf .git/rebase-apply
>>>    apt-get update
>>>    apt-get install -y libssl-dev
>>>
>>> +# for msm header validation
>>> +apt-get install -y python3-lxml
>>> +
>>>    if [[ "$KERNEL_ARCH" = "arm64" ]]; then
>>>        GCC_ARCH="aarch64-linux-gnu"
>>>        DEBIAN_ARCH="arm64"
>>> diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
>>> index 17ab38304885..9c198239033d 100644
>>> --- a/drivers/gpu/drm/ci/build.yml
>>> +++ b/drivers/gpu/drm/ci/build.yml
>>> @@ -106,6 +106,7 @@ build-nodebugfs:arm64:
>>>      extends: .build:arm64
>>>      variables:
>>>        DISABLE_KCONFIGS: "DEBUG_FS"
>>> +    ENABLE_KCONFIGS: "EXPERT DRM_MSM_VALIDATE_XML"
>>>
>>
>> Wouldnt this end up enabling DRM_MSM_VALIDATE_XML for any arm64 device.
>>
>> Cant we make this build rule msm specific?
> 
> No need to. We just need to validate the files at least once during
> the whole pipeline build.
>

ah okay, today the arm64 config anyway sets all arm64 vendor drm configs 
to y.

A couple of more questions:

1) Why is this enabled only for no-debugfs option?
2) Will there be any concerns from other vendors to enable CONFIG_EXPERT 
in their CI runs as the arm64 config is shared across all arm64 vendors.
Dmitry Baryshkov May 4, 2024, 12:02 a.m. UTC | #3
On Sat, 4 May 2024 at 01:38, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>
>
>
> On 5/3/2024 1:20 PM, Dmitry Baryshkov wrote:
> > On Fri, 3 May 2024 at 22:42, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
> >>
> >>
> >>
> >> On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote:
> >>> In order to validate drm/msm register definition files against schema,
> >>> reuse the nodebugfs build step. The validation entry is guarded by
> >>> the EXPERT Kconfig option and we don't want to enable that option for
> >>> all the builds.
> >>>
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>> ---
> >>>    drivers/gpu/drm/ci/build.sh  | 3 +++
> >>>    drivers/gpu/drm/ci/build.yml | 1 +
> >>>    2 files changed, 4 insertions(+)
> >>>
> >>> diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
> >>> index 106f2d40d222..28a495c0c39c 100644
> >>> --- a/drivers/gpu/drm/ci/build.sh
> >>> +++ b/drivers/gpu/drm/ci/build.sh
> >>> @@ -12,6 +12,9 @@ rm -rf .git/rebase-apply
> >>>    apt-get update
> >>>    apt-get install -y libssl-dev
> >>>
> >>> +# for msm header validation
> >>> +apt-get install -y python3-lxml
> >>> +
> >>>    if [[ "$KERNEL_ARCH" = "arm64" ]]; then
> >>>        GCC_ARCH="aarch64-linux-gnu"
> >>>        DEBIAN_ARCH="arm64"
> >>> diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
> >>> index 17ab38304885..9c198239033d 100644
> >>> --- a/drivers/gpu/drm/ci/build.yml
> >>> +++ b/drivers/gpu/drm/ci/build.yml
> >>> @@ -106,6 +106,7 @@ build-nodebugfs:arm64:
> >>>      extends: .build:arm64
> >>>      variables:
> >>>        DISABLE_KCONFIGS: "DEBUG_FS"
> >>> +    ENABLE_KCONFIGS: "EXPERT DRM_MSM_VALIDATE_XML"
> >>>
> >>
> >> Wouldnt this end up enabling DRM_MSM_VALIDATE_XML for any arm64 device.
> >>
> >> Cant we make this build rule msm specific?
> >
> > No need to. We just need to validate the files at least once during
> > the whole pipeline build.
> >
>
> ah okay, today the arm64 config anyway sets all arm64 vendor drm configs
> to y.
>
> A couple of more questions:
>
> 1) Why is this enabled only for no-debugfs option?
> 2) Will there be any concerns from other vendors to enable CONFIG_EXPERT
> in their CI runs as the arm64 config is shared across all arm64 vendors.

I don't get the second question. This option is only enabled for
no-debugfs, which isn't used for execution.

I didn't want to add an extra build stage, just for the sake of
validating regs against the schema, nor did I want EXPERT to find its
way into the actual running kernels.
Abhinav Kumar May 4, 2024, 12:07 a.m. UTC | #4
On 5/3/2024 5:02 PM, Dmitry Baryshkov wrote:
> On Sat, 4 May 2024 at 01:38, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>>
>>
>> On 5/3/2024 1:20 PM, Dmitry Baryshkov wrote:
>>> On Fri, 3 May 2024 at 22:42, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>>>
>>>>
>>>>
>>>> On 5/3/2024 11:15 AM, Dmitry Baryshkov wrote:
>>>>> In order to validate drm/msm register definition files against schema,
>>>>> reuse the nodebugfs build step. The validation entry is guarded by
>>>>> the EXPERT Kconfig option and we don't want to enable that option for
>>>>> all the builds.
>>>>>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>>>     drivers/gpu/drm/ci/build.sh  | 3 +++
>>>>>     drivers/gpu/drm/ci/build.yml | 1 +
>>>>>     2 files changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
>>>>> index 106f2d40d222..28a495c0c39c 100644
>>>>> --- a/drivers/gpu/drm/ci/build.sh
>>>>> +++ b/drivers/gpu/drm/ci/build.sh
>>>>> @@ -12,6 +12,9 @@ rm -rf .git/rebase-apply
>>>>>     apt-get update
>>>>>     apt-get install -y libssl-dev
>>>>>
>>>>> +# for msm header validation
>>>>> +apt-get install -y python3-lxml
>>>>> +
>>>>>     if [[ "$KERNEL_ARCH" = "arm64" ]]; then
>>>>>         GCC_ARCH="aarch64-linux-gnu"
>>>>>         DEBIAN_ARCH="arm64"
>>>>> diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
>>>>> index 17ab38304885..9c198239033d 100644
>>>>> --- a/drivers/gpu/drm/ci/build.yml
>>>>> +++ b/drivers/gpu/drm/ci/build.yml
>>>>> @@ -106,6 +106,7 @@ build-nodebugfs:arm64:
>>>>>       extends: .build:arm64
>>>>>       variables:
>>>>>         DISABLE_KCONFIGS: "DEBUG_FS"
>>>>> +    ENABLE_KCONFIGS: "EXPERT DRM_MSM_VALIDATE_XML"
>>>>>
>>>>
>>>> Wouldnt this end up enabling DRM_MSM_VALIDATE_XML for any arm64 device.
>>>>
>>>> Cant we make this build rule msm specific?
>>>
>>> No need to. We just need to validate the files at least once during
>>> the whole pipeline build.
>>>
>>
>> ah okay, today the arm64 config anyway sets all arm64 vendor drm configs
>> to y.
>>
>> A couple of more questions:
>>
>> 1) Why is this enabled only for no-debugfs option?
>> 2) Will there be any concerns from other vendors to enable CONFIG_EXPERT
>> in their CI runs as the arm64 config is shared across all arm64 vendors.
> 
> I don't get the second question. This option is only enabled for
> no-debugfs, which isn't used for execution.
> 

Ah I see, makes sense.

> I didn't want to add an extra build stage, just for the sake of
> validating regs against the schema, nor did I want EXPERT to find its
> way into the actual running kernels.
> 

This answered my second question actually. That basically I didnt also 
want EXPERT to find its way into actual running kernels.

Hence, I am fine with this change now

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

But, I will wait to hear from helen, vignesh about what they think of this.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index 106f2d40d222..28a495c0c39c 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -12,6 +12,9 @@  rm -rf .git/rebase-apply
 apt-get update
 apt-get install -y libssl-dev
 
+# for msm header validation
+apt-get install -y python3-lxml
+
 if [[ "$KERNEL_ARCH" = "arm64" ]]; then
     GCC_ARCH="aarch64-linux-gnu"
     DEBIAN_ARCH="arm64"
diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
index 17ab38304885..9c198239033d 100644
--- a/drivers/gpu/drm/ci/build.yml
+++ b/drivers/gpu/drm/ci/build.yml
@@ -106,6 +106,7 @@  build-nodebugfs:arm64:
   extends: .build:arm64
   variables:
     DISABLE_KCONFIGS: "DEBUG_FS"
+    ENABLE_KCONFIGS: "EXPERT DRM_MSM_VALIDATE_XML"
 
 build:x86_64:
   extends: .build:x86_64