Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe/oa: Ensure that polled read returns latest data
Date: Tue, 11 Feb 2025 18:27:01 -0800	[thread overview]
Message-ID: <85a5ar3nka.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250212010255.1423343-1-umesh.nerlige.ramappa@intel.com>

On Tue, 11 Feb 2025 17:02:55 -0800, Umesh Nerlige Ramappa wrote:
>
> In polled mode, user calls poll() for read data to be available before
> performing a read(). In the duration between these 2 calls, there may be
> new data available in the OA buffer. To ensure user reads all available
> data, check for latest data in the OA buffer in polled read.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_oa.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> index fa873f3d0a9d..a692dffcb638 100644
> --- a/drivers/gpu/drm/xe/xe_oa.c
> +++ b/drivers/gpu/drm/xe/xe_oa.c
> @@ -548,6 +548,7 @@ static ssize_t xe_oa_read(struct file *file, char __user *buf,
>			mutex_unlock(&stream->stream_lock);
>		} while (!offset && !ret);
>	} else {
> +		xe_oa_buffer_check_unlocked(stream);
>		mutex_lock(&stream->stream_lock);
>		ret = __xe_oa_read(stream, buf, count, &offset);
>		mutex_unlock(&stream->stream_lock);

OK, this is what blocking read does when it gets unblocked, so this is
equivalent to blocking read.

No need to add 'Fixes:' correct?

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

  parent reply	other threads:[~2025-02-12  2:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  1:02 [PATCH] drm/xe/oa: Ensure that polled read returns latest data Umesh Nerlige Ramappa
2025-02-12  1:08 ` ✓ CI.Patch_applied: success for " Patchwork
2025-02-12  1:08 ` ✓ CI.checkpatch: " Patchwork
2025-02-12  1:09 ` ✓ CI.KUnit: " Patchwork
2025-02-12  1:38 ` ✓ CI.Build: " Patchwork
2025-02-12  1:41 ` ✓ CI.Hooks: " Patchwork
2025-02-12  1:42 ` ✓ CI.checksparse: " Patchwork
2025-02-12  2:13 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-12  2:27 ` Dixit, Ashutosh [this message]
2025-02-12 16:20   ` [PATCH] " Umesh Nerlige Ramappa
2025-02-12  7:28 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-02-21  1:38   ` Umesh Nerlige Ramappa

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=85a5ar3nka.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@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