* [PATCH] tests/intel/xe_oa: Remove buffer overflow guard from buffer-size tests
@ 2025-04-18 20:51 Jonathan Cavitt
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cavitt @ 2025-04-18 20:51 UTC (permalink / raw)
To: igt-dev
Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt, umesh.nerlige.ramappa,
ashutosh.dixit
The guard was a holdover from i915 that is not relevant to Xe because
the buffer contents are preserved during an overflow. Remove the check.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4541
Suggested-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Suggested-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
tests/intel/xe_oa.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 1fc8bfaafe..7d13bd340a 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -2503,10 +2503,6 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
while (total_len < buf_size &&
((len = read(stream_fd, &buf[total_len], buf_size - total_len)) > 0 ||
(len == -1 && (errno == EINTR || errno == EIO)))) {
- if (errno == EIO) {
- oa_status = get_stream_status(stream_fd);
- igt_assert(!(oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW));
- }
if (len > 0)
total_len += len;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] tests/intel/xe_oa: Remove buffer overflow guard from buffer-size tests
@ 2025-04-18 20:42 Jonathan Cavitt
2025-04-18 20:45 ` Dixit, Ashutosh
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cavitt @ 2025-04-18 20:42 UTC (permalink / raw)
To: igt-dev
Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt, umesh.nerlige.ramappa,
ashutosh.dixit
The guard was a holdover from i915 that is not relevant to Xe because
the buffer contents are preserved during an overflow. Remove the check.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4541
Suggested-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Suggested-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
tests/intel/xe_oa.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 1fc8bfaafe..7d13bd340a 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -2503,10 +2503,6 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
while (total_len < buf_size &&
((len = read(stream_fd, &buf[total_len], buf_size - total_len)) > 0 ||
(len == -1 && (errno == EINTR || errno == EIO)))) {
- if (errno == EIO) {
- oa_status = get_stream_status(stream_fd);
- igt_assert(!(oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW));
- }
if (len > 0)
total_len += len;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] tests/intel/xe_oa: Remove buffer overflow guard from buffer-size tests
2025-04-18 20:42 Jonathan Cavitt
@ 2025-04-18 20:45 ` Dixit, Ashutosh
0 siblings, 0 replies; 3+ messages in thread
From: Dixit, Ashutosh @ 2025-04-18 20:45 UTC (permalink / raw)
To: Jonathan Cavitt; +Cc: igt-dev, saurabhg.gupta, alex.zuo, umesh.nerlige.ramappa
On Fri, 18 Apr 2025 13:42:02 -0700, Jonathan Cavitt wrote:
>
> The guard was a holdover from i915 that is not relevant to Xe because
> the buffer contents are preserved during an overflow. Remove the check.
>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4541
> Suggested-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> Suggested-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> ---
> tests/intel/xe_oa.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 1fc8bfaafe..7d13bd340a 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -2503,10 +2503,6 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
> while (total_len < buf_size &&
> ((len = read(stream_fd, &buf[total_len], buf_size - total_len)) > 0 ||
> (len == -1 && (errno == EINTR || errno == EIO)))) {
> - if (errno == EIO) {
> - oa_status = get_stream_status(stream_fd);
> - igt_assert(!(oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW));
> - }
if (errno == EIO) {
oa_status = get_stream_status(stream_fd);
/* Assert only for default OA buffer size */
if (!oa_buffer_size)
igt_assert(!(oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW));
}
> if (len > 0)
> total_len += len;
> }
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-18 20:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18 20:51 [PATCH] tests/intel/xe_oa: Remove buffer overflow guard from buffer-size tests Jonathan Cavitt
-- strict thread matches above, loose matches on Subject: below --
2025-04-18 20:42 Jonathan Cavitt
2025-04-18 20:45 ` Dixit, Ashutosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox