All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/6] drm/i915: store all subslice masks
Date: Fri, 12 Jan 2018 12:01:47 +0000	[thread overview]
Message-ID: <bcbec163-00e8-320d-ebb9-96024c63a21f@linux.intel.com> (raw)
In-Reply-To: <f9146a40-9802-3c48-1b96-766048a7ef43@intel.com>


On 12/01/2018 10:58, Lionel Landwerlin wrote:
> On 12/01/18 10:15, Tvrtko Ursulin wrote:
>>

[snip]

>>> +static inline int sseu_eu_idx(const struct sseu_dev_info *sseu,
>>> +                  int slice, int subslice, int eu_group)
>>
>> What is eu_group for? Will it be used at some point?
> 
> In case we ever have more than 8 EUs per subslice.

I am thinking if we could hide that from the call sites, to avoid it 
being passed as zeros, and to avoid having to write loops in other 
patches which reference eu_groups, when it is not immediately obvious 
what that means.

Could we for instance have a helper which would clear/set numbered EUs 
in sseu_dev_info, and so hide all the implementation details?

sseu_enable_eus(sseu, slice, subslice, start, end);

Then when you have code like:

  sseu->eu_mask[sseu_eu_idx(sseu, s, ss, 0)] = ~eu_disabled_mask;

You would write it as:

  /* On this slice/subslice mark EUs 0 to N as enabled. */
  sseu_enable_eus(sseu, s, ss, 0, fls(~eu_disabled_mask));

Helper would internally know the size of the underlying storage and 
dtrt. There would be no need to manually manage eu_groups. In the 
initial implementation you could simply GEM_BUG_ON if the EU range does 
not fit into the current storage. Later u8 could be turned into u16 or 
similar. You also wouldn't have any iteration over eu_groups in this 
version.

I think that would be cleaner and easier to extend in the future. Unless 
I overlooked some important detail?

Or even simplify it by passing bitmask instead of start/end, and just 
have no support for more than 8 EUs in this version? No eu_group etc. 
When the need arises to have more, bump the eu_mask type to u16. That 
would require you to put back the stride parameter in the uAPI I think.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-01-12 13:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 19:53 [PATCH v2 0/6] drm/i915: expose RCS topology to userspace Lionel Landwerlin
2018-01-11 19:53 ` [PATCH v2 1/6] drm/i915: store all subslice masks Lionel Landwerlin
2018-01-12 10:15   ` Tvrtko Ursulin
2018-01-12 10:58     ` Lionel Landwerlin
2018-01-12 11:05       ` Tvrtko Ursulin
2018-01-12 11:31         ` Lionel Landwerlin
2018-01-12 12:01       ` Tvrtko Ursulin [this message]
2018-01-12 13:53         ` Lionel Landwerlin
2018-01-12 17:37           ` Tvrtko Ursulin
2018-01-11 19:53 ` [PATCH v2 2/6] drm/i915/debugfs: reuse max slice/subslices already stored in sseu Lionel Landwerlin
2018-01-11 19:53 ` [PATCH v2 3/6] drm/i915/debugfs: add rcs topology entry Lionel Landwerlin
2018-01-12 10:21   ` Tvrtko Ursulin
2018-01-12 11:02     ` Lionel Landwerlin
2018-01-11 19:53 ` [PATCH v2 4/6] drm/i915: add rcs topology to error state Lionel Landwerlin
2018-01-11 19:53 ` [PATCH v2 5/6] drm/i915: add query uAPI Lionel Landwerlin
2018-01-12 12:06   ` Tvrtko Ursulin
2018-01-11 19:53 ` [PATCH v2 6/6] drm/i915: expose rcs topology through " Lionel Landwerlin
2018-01-12 12:27   ` Tvrtko Ursulin
2018-01-12 14:04     ` Lionel Landwerlin
2018-01-12 10:06 ` ✓ Fi.CI.BAT: success for drm/i915: expose RCS topology to userspace Patchwork
2018-01-12 11:49 ` ✗ Fi.CI.IGT: warning " Patchwork

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=bcbec163-00e8-320d-ebb9-96024c63a21f@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lionel.g.landwerlin@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.