From: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH 1/2] drm/xe: Assert pat.ops function pointers
Date: Tue, 9 Apr 2024 15:09:34 +0200 [thread overview]
Message-ID: <20240409130934.fsvt33zm3jskemm7@intel.com> (raw)
In-Reply-To: <20240409105106.1067-1-michal.wajdeczko@intel.com>
Michal Wajdeczko <michal.wajdeczko@intel.com> wrote on wto [2024-kwi-09 12:51:05 +0200]:
> Make sure that pat.ops (if selected) has all required function
> pointers setup. Only .program_media may be omitted if we have
> older media version.
>
> This should help avoid late runtime checks against individual
> function pointers.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pat.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
> index 66d8e3dd8237..026e4a9fe124 100644
> --- a/drivers/gpu/drm/xe/xe_pat.c
> +++ b/drivers/gpu/drm/xe/xe_pat.c
> @@ -428,6 +428,10 @@ void xe_pat_init_early(struct xe_device *xe)
> /* VFs can't program nor dump PAT settings */
> if (IS_SRIOV_VF(xe))
> xe->pat.ops = NULL;
> +
> + xe_assert(xe, !xe->pat.ops || xe->pat.ops->dump);
> + xe_assert(xe, !xe->pat.ops || xe->pat.ops->program_graphics);
> + xe_assert(xe, !xe->pat.ops || MEDIA_VER(xe) < 13 || xe->pat.ops->program_media);
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> }
>
> void xe_pat_init(struct xe_gt *gt)
> --
> 2.43.0
>
--
prev parent reply other threads:[~2024-04-09 13:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 10:51 [PATCH 1/2] drm/xe: Assert pat.ops function pointers Michal Wajdeczko
2024-04-09 10:51 ` [PATCH 2/2] drm/xe: Check pat.ops before dumping PAT settings Michal Wajdeczko
2024-04-09 13:09 ` Piotr Piórkowski
2024-04-09 10:56 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: Assert pat.ops function pointers Patchwork
2024-04-09 10:57 ` ✓ CI.checkpatch: " Patchwork
2024-04-09 10:58 ` ✓ CI.KUnit: " Patchwork
2024-04-09 11:10 ` ✓ CI.Build: " Patchwork
2024-04-09 11:12 ` ✓ CI.Hooks: " Patchwork
2024-04-09 11:14 ` ✓ CI.checksparse: " Patchwork
2024-04-09 11:37 ` ✓ CI.BAT: " Patchwork
2024-04-09 12:48 ` ✗ CI.FULL: failure " Patchwork
2024-04-09 16:30 ` Michal Wajdeczko
2024-04-09 13:09 ` Piotr Piórkowski [this message]
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=20240409130934.fsvt33zm3jskemm7@intel.com \
--to=piotr.piorkowski@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=michal.wajdeczko@intel.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