All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Chris Wilson <chris.p.wilson@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Matt Roper <matthew.d.roper@intel.com>,
	stable@vger.kernel.org, Andi Shyti <andi.shyti@kernel.org>
Subject: Re: [PATCH 2/2] drm/i915/gt: Set default CCS mode '1'
Date: Tue, 20 Feb 2024 11:15:05 +0000	[thread overview]
Message-ID: <97b11121-4c48-4dd9-b966-4c42eda3f6a3@linux.intel.com> (raw)
In-Reply-To: <ZdR6zeDlKXqR1mvZ@ashyti-mobl2.lan>


On 20/02/2024 10:11, Andi Shyti wrote:
> Hi Tvrtko,
> 
> On Mon, Feb 19, 2024 at 12:51:44PM +0000, Tvrtko Ursulin wrote:
>> On 19/02/2024 11:16, Tvrtko Ursulin wrote:
>>> On 15/02/2024 13:59, Andi Shyti wrote:
> 
> ...
> 
>>>> +/*
>>>> + * Exclude unavailable engines.
>>>> + *
>>>> + * Only the first CCS engine is utilized due to the disabling of
>>>> CCS auto load
>>>> + * balancing. As a result, all CCS engines operate collectively,
>>>> functioning
>>>> + * essentially as a single CCS engine, hence the count of active
>>>> CCS engines is
>>>> + * considered '1'.
>>>> + * Currently, this applies to platforms with more than one CCS engine,
>>>> + * specifically DG2.
>>>> + */
>>>> +#define for_each_available_uabi_engine(engine__, i915__) \
>>>> +    for_each_uabi_engine(engine__, i915__) \
>>>> +        if ((IS_DG2(i915__)) && \
>>>> +            ((engine__)->uabi_class == I915_ENGINE_CLASS_COMPUTE) && \
>>>> +            ((engine__)->uabi_instance)) { } \
>>>> +        else
>>>> +
>>>
>>> If you don't want userspace to see some engines, just don't add them to
>>> the uabi list in intel_engines_driver_register or thereabouts?
> 
> It will be dynamic. In next series I am preparing the user will
> be able to increase the number of CCS engines he wants to use.

Oh tricky and new. Does it need to be at runtime or could be boot time?

If you are aiming to make the static single CCS only into the 6.9 
release, and you feel running out of time, you could always do a simple 
solution for now. The one I mentioned of simply not registering on the 
uabi list. Then you can refine more leisurely for the next release.

Regards,

Tvrtko

> 
>>> Similar as we do for gsc which uses I915_NO_UABI_CLASS, although for ccs
>>> you can choose a different approach, whatever is more elegant.
>>>
>>> That is also needed for i915->engine_uabi_class_count to be right, so
>>> userspace stats which rely on it are correct.
> 
> Oh yes. Will update it.
> 
>> I later realized it is more than that - everything that uses
>> intel_engine_lookup_user to look up class instance passed in from userspace
>> relies on the engine not being on the user list otherwise userspace could
>> bypass the fact engine query does not list it. Like PMU, Perf/POA, context
>> engine map and SSEU context query.
> 
> Correct, will look into that, thank you!
> 
> Andi

  reply	other threads:[~2024-02-20 11:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 13:59 [PATCH 0/2] Disable automatic load CCS load balancing Andi Shyti
2024-02-15 13:59 ` [PATCH 1/2] drm/i915/gt: Disable HW load balancing for CCS Andi Shyti
2024-02-15 16:55   ` Matt Roper
2024-02-19 10:17     ` Andi Shyti
2024-02-19 10:31       ` Andi Shyti
2024-02-15 13:59 ` [PATCH 2/2] drm/i915/gt: Set default CCS mode '1' Andi Shyti
2024-02-15 21:23   ` John Harrison
2024-02-15 22:34     ` Andi Shyti
2024-02-15 22:55       ` John Harrison
2024-02-19 11:16   ` Tvrtko Ursulin
2024-02-19 12:51     ` Tvrtko Ursulin
2024-02-20 10:11       ` Andi Shyti
2024-02-20 11:15         ` Tvrtko Ursulin [this message]
2024-02-20 11:21           ` Andi Shyti
2024-02-15 14:53 ` ✗ Fi.CI.CHECKPATCH: warning for Disable automatic load CCS load balancing Patchwork
2024-02-15 14:53 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-15 15:13 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-02-20 14:20 [PATCH 0/2] " Andi Shyti
2024-02-20 14:20 ` [PATCH 2/2] drm/i915/gt: Set default CCS mode '1' Andi Shyti
2024-02-20 14:27   ` Tvrtko Ursulin
2024-02-20 14:33     ` Andi Shyti
2024-02-27 12:18   ` Jani Nikula
2024-02-27 13:01     ` Andi Shyti

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=97b11121-4c48-4dd9-b966-4c42eda3f6a3@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=andi.shyti@linux.intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=stable@vger.kernel.org \
    /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.