From: Jon Hunter <jonathanh@nvidia.com>
To: Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH] drm/msm: Fix gen_header.py for older python3 versions
Date: Fri, 19 Apr 2024 15:22:02 +0100 [thread overview]
Message-ID: <81c72b06-d3db-49d5-b1a7-9d16cd9ea0a4@nvidia.com> (raw)
In-Reply-To: <20240412165407.42163-1-jonathanh@nvidia.com>
Hi all,
On 12/04/2024 17:54, Jon Hunter wrote:
> The gen_header.py script is failing for older versions of python3 such
> as python 3.5. Two issues observed with python 3.5 are ...
>
> 1. Python 3 versions prior to 3.6 do not support the f-string format.
> 2. Early python 3 versions do not support the 'required' argument for
> the argparse add_subparsers().
>
> Fix both of the above so that older versions of python 3 still work.
>
> Fixes: 8f7abf0b86fe ("drm/msm: generate headers on the fly")
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> drivers/gpu/drm/msm/registers/gen_header.py | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/registers/gen_header.py b/drivers/gpu/drm/msm/registers/gen_header.py
> index 9b2842d4a354..90d5c2991d05 100644
> --- a/drivers/gpu/drm/msm/registers/gen_header.py
> +++ b/drivers/gpu/drm/msm/registers/gen_header.py
> @@ -323,7 +323,7 @@ class Array(object):
> indices = []
> if self.length != 1:
> if self.fixed_offsets:
> - indices.append((self.index_ctype(), None, f"__offset_{self.local_name}"))
> + indices.append((self.index_ctype(), None, "__offset_%s" % self.local_name))
> else:
> indices.append((self.index_ctype(), self.stride, None))
> return indices
> @@ -942,7 +942,8 @@ def main():
> parser.add_argument('--rnn', type=str, required=True)
> parser.add_argument('--xml', type=str, required=True)
>
> - subparsers = parser.add_subparsers(required=True)
> + subparsers = parser.add_subparsers()
> + subparsers.required = True
>
> parser_c_defines = subparsers.add_parser('c-defines')
> parser_c_defines.set_defaults(func=dump_c_defines)
Any feedback on this? All our farm builders are still broken :-(
Thanks
Jon
--
nvpublic
next prev parent reply other threads:[~2024-04-19 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 16:54 [PATCH] drm/msm: Fix gen_header.py for older python3 versions Jon Hunter
2024-04-19 14:22 ` Jon Hunter [this message]
2024-04-19 15:03 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81c72b06-d3db-49d5-b1a7-9d16cd9ea0a4@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox