All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Stuart Summers <stuart.summers@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/9] drm/i915: Add function to set subslices
Date: Tue, 20 Aug 2019 11:51:35 +0100	[thread overview]
Message-ID: <156629829520.1374.3221723245199113812@skylake-alporthouse-com> (raw)
In-Reply-To: <20190819215003.48305-6-stuart.summers@intel.com>

Quoting Stuart Summers (2019-08-19 22:49:59)
> Add a new function to set a range of subslices for a
> specified slice based on a given mask.
> 
> v2: Use local variable for subslice_mask on HSW and
>     clean up a few other subslice_mask local variable
>     changes
> 
> Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_sseu.c     | 10 ++++
>  drivers/gpu/drm/i915/gt/intel_sseu.h     |  3 ++
>  drivers/gpu/drm/i915/intel_device_info.c | 59 +++++++++++++-----------
>  3 files changed, 46 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
> index 3a5c0f7b5a08..f5ee43a034bd 100644
> --- a/drivers/gpu/drm/i915/gt/intel_sseu.c
> +++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
> @@ -30,6 +30,16 @@ intel_sseu_subslice_total(const struct sseu_dev_info *sseu)
>         return total;
>  }
>  
> +void intel_sseu_set_subslices(struct sseu_dev_info *sseu, int slice,
> +                             u32 ss_mask)
> +{
> +       int i, offset = slice * sseu->ss_stride;
> +

Some sort of
	GEM_BUG_ON(sseu->ss_stride > 32);
to detect UB ?

> +       for (i = 0; i < sseu->ss_stride; i++)
> +               sseu->subslice_mask[offset + i] =
> +                       (ss_mask >> (BITS_PER_BYTE * i)) & 0xff;

This is a non-trivial transformation :|
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-08-20 10:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 21:49 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-08-19 21:49 ` [PATCH 1/9] drm/i915: Use variable for debugfs device status Stuart Summers
2019-08-19 21:49 ` [PATCH 2/9] drm/i915: Add function to set SSEU info per platform Stuart Summers
2019-08-20  7:44   ` Mika Kuoppala
2019-08-19 21:49 ` [PATCH 3/9] drm/i915: Add subslice stride runtime parameter Stuart Summers
2019-08-20 10:46   ` Chris Wilson
2019-08-19 21:49 ` [PATCH 4/9] drm/i915: Add EU " Stuart Summers
2019-08-20 10:47   ` Chris Wilson
2019-08-19 21:49 ` [PATCH 5/9] drm/i915: Add function to set subslices Stuart Summers
2019-08-20 10:51   ` Chris Wilson [this message]
2019-08-19 21:50 ` [PATCH 6/9] drm/i915: Add function to determine if a slice has a subslice Stuart Summers
2019-08-20 10:53   ` Chris Wilson
2019-08-20 19:01     ` Summers, Stuart
2019-08-20 19:20       ` Chris Wilson
2019-08-19 21:50 ` [PATCH 7/9] drm/i915: Refactor instdone loops on new subslice functions Stuart Summers
2019-08-19 21:50 ` [PATCH 8/9] drm/i915: Add new function to copy subslices for a slice Stuart Summers
2019-08-19 21:50 ` [PATCH 9/9] drm/i915: Expand subslice mask Stuart Summers
2019-08-19 21:55 ` ✗ Fi.CI.CHECKPATCH: warning for Refactor to expand subslice mask (rev 2) Patchwork
2019-08-19 22:39 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-20 10:44 ` ✓ Fi.CI.IGT: " Patchwork
2019-08-20 11:10 ` Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-08-19 21:18 [PATCH 0/9] " Stuart Summers
2019-08-19 21:18 ` [PATCH 5/9] drm/i915: Add function to set subslices Stuart Summers
2019-08-07 16:58 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-08-07 16:58 ` [PATCH 5/9] drm/i915: Add function to set subslices Stuart Summers
2019-07-24 17:12 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-07-24 17:12 ` [PATCH 5/9] drm/i915: Add function to set subslices Stuart Summers
2019-07-23 15:49 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-07-23 15:49 ` [PATCH 5/9] drm/i915: Add function to set subslices Stuart Summers

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=156629829520.1374.3221723245199113812@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stuart.summers@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.