All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>
To: Riana Tauro <riana.tauro@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <rodrigo.vivi@intel.com>,
	<badal.nilawar@intel.com>, <aravind.iddamsetty@linux.intel.com>,
	<raag.jadav@intel.com>, <ravi.kishore.koppuravuri@intel.com>,
	<tejas.upadhyay@intel.com>
Subject: Re: [PATCH v2] drm/xe/sysctrl: Drain page offline queue on queue-full event
Date: Mon, 23 Nov 2026 14:37:37 +0530	[thread overview]
Message-ID: <c62b4400-7c77-4ffa-acaf-d707ccb2ac28@intel.com> (raw)
In-Reply-To: <20261123063932.1061164-2-riana.tauro@intel.com>


On 23-11-2026 12:09 pm, Riana Tauro wrote:
> The firmware raises a System Controller event when its page offline
> queue is full and cannot track further pages until the queue is read.
> Handle it by draining the queue and offlining the returned pages, so the
> firmware can resume queueing new pages.
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
LGTM,
Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
> ---
> v2: rebase
> ---
>   drivers/gpu/drm/xe/xe_ras.c                 | 12 +++++++-----
>   drivers/gpu/drm/xe/xe_ras.h                 |  1 +
>   drivers/gpu/drm/xe/xe_sysctrl_event.c       | 10 ++++++++--
>   drivers/gpu/drm/xe/xe_sysctrl_event_types.h |  4 +++-
>   4 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index b35c77caeaae..4014945b47ba 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -483,11 +483,13 @@ static void process_offline_pages(struct xe_device *xe, u32 cmd, void *req, size
>   	} while (common->additional_data);
>   }
>   
> -/*
> - * Retrieve firmware queued pages from warm-retained SRAM during probe. Handle and soft-offline
> - * each page as required.
> +/**
> + * xe_ras_get_offline_queue() - Drain page offline queue
> + * @xe: xe device instance
> + *
> + * Retrieve firmware queued pages from warm-retained SRAM and process each page as required.
>    */
> -static void get_offline_queue(struct xe_device *xe)
> +void xe_ras_get_offline_queue(struct xe_device *xe)
>   {
>   	struct xe_ras_offline_common response = {0};
>   
> @@ -1524,7 +1526,7 @@ int xe_ras_init(struct xe_device *xe)
>   
>   	/* Fetch the offline list before queue to avoid duplication */
>   	get_offline_list(xe);
> -	get_offline_queue(xe);
> +	xe_ras_get_offline_queue(xe);
>   
>   	/*
>   	 * During probe, process and log any errors detected by firmware while the driver was not
> diff --git a/drivers/gpu/drm/xe/xe_ras.h b/drivers/gpu/drm/xe/xe_ras.h
> index 5d41c4543c55..5d24390c8f56 100644
> --- a/drivers/gpu/drm/xe/xe_ras.h
> +++ b/drivers/gpu/drm/xe/xe_ras.h
> @@ -23,6 +23,7 @@ int xe_ras_init(struct xe_device *xe);
>   enum xe_ras_recovery_action xe_ras_process_errors(struct xe_device *xe);
>   bool xe_ras_get_disable_vram_page_offline(struct xe_device *xe);
>   u32 xe_ras_get_max_pages(struct xe_device *xe);
> +void xe_ras_get_offline_queue(struct xe_device *xe);
>   int xe_ras_get_counter_response(struct xe_device *xe, const struct xe_ras_error_class *counter,
>   				struct xe_ras_get_counter_response *response);
>   u32 xe_ras_get_info_queue_size(struct xe_device *xe,
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_event.c b/drivers/gpu/drm/xe/xe_sysctrl_event.c
> index 3239c110a66a..9afd2b231793 100644
> --- a/drivers/gpu/drm/xe/xe_sysctrl_event.c
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_event.c
> @@ -37,11 +37,17 @@ static void get_pending_event(struct xe_sysctrl *sc, struct xe_sysctrl_mailbox_c
>   			return;
>   		}
>   
> -		if (response->event == XE_SYSCTRL_EVENT_THRESHOLD_CROSSED)
> +		switch (response->event) {
> +		case XE_SYSCTRL_EVENT_THRESHOLD_CROSSED:
>   			xe_ras_counter_threshold_crossed(xe, response);
> -		else
> +			break;
> +		case XE_SYSCTRL_EVENT_PAGE_OFFLINE_QUEUE_FULL:
> +			xe_ras_get_offline_queue(xe);
> +			break;
> +		default:
>   			xe_log_err_info(xe, SYSCTRL, -ENOPKG,
>   					"Unexpected event %#x\n", response->event);
> +		}
>   
>   		if (!--count) {
>   			xe_log_err(xe, SYSCTRL, -EXFULL,
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_event_types.h b/drivers/gpu/drm/xe/xe_sysctrl_event_types.h
> index 348768ca454a..03bb34e279f0 100644
> --- a/drivers/gpu/drm/xe/xe_sysctrl_event_types.h
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_event_types.h
> @@ -14,9 +14,11 @@
>    * enum xe_sysctrl_event - Events reported by System Controller
>    *
>    * @XE_SYSCTRL_EVENT_THRESHOLD_CROSSED: Error counter threshold crossed
> + * @XE_SYSCTRL_EVENT_PAGE_OFFLINE_QUEUE_FULL: Page offline queue full
>    */
>   enum xe_sysctrl_event {
> -	XE_SYSCTRL_EVENT_THRESHOLD_CROSSED	= 0x01,
> +	XE_SYSCTRL_EVENT_THRESHOLD_CROSSED		= 0x01,
> +	XE_SYSCTRL_EVENT_PAGE_OFFLINE_QUEUE_FULL	= 0x02,
>   };
>   
>   /**

      parent reply	other threads:[~2026-11-23  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  6:39 [PATCH v2] drm/xe/sysctrl: Drain page offline queue on queue-full event Riana Tauro
2026-11-23  6:47 ` ✗ CI.KUnit: failure for drm/xe/sysctrl: Drain page offline queue on queue-full event (rev2) Patchwork
2026-11-23  7:03 ` [PATCH v2] drm/xe/sysctrl: Drain page offline queue on queue-full event Raag Jadav
2026-11-23  9:07 ` Mallesh, Koujalagi [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=c62b4400-7c77-4ffa-acaf-d707ccb2ac28@intel.com \
    --to=mallesh.koujalagi@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=raag.jadav@intel.com \
    --cc=ravi.kishore.koppuravuri@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tejas.upadhyay@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.