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>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 9/9] drm/i915: Expand subslice mask
Date: Fri, 06 Sep 2019 19:13:14 +0100	[thread overview]
Message-ID: <156779359430.2967.9072538110573051346@skylake-alporthouse-com> (raw)
In-Reply-To: <b13ab867-0acd-fd87-173f-1cc3a3724a9b@linux.intel.com>

Quoting Tvrtko Ursulin (2019-09-02 14:42:44)
> 
> On 24/07/2019 14:05, Tvrtko Ursulin wrote:
> > 
> > On 23/07/2019 16:49, Stuart Summers wrote:
> >> +u32 intel_sseu_get_subslices(const struct sseu_dev_info *sseu, u8 slice)
> >> +{
> >> +    int i, offset = slice * sseu->ss_stride;
> >> +    u32 mask = 0;
> >> +
> >> +    if (slice >= sseu->max_slices) {
> >> +        DRM_ERROR("%s: invalid slice %d, max: %d\n",
> >> +              __func__, slice, sseu->max_slices);
> >> +        return 0;
> >> +    }
> >> +
> >> +    if (sseu->ss_stride > sizeof(mask)) {
> >> +        DRM_ERROR("%s: invalid subslice stride %d, max: %lu\n",
> >> +              __func__, sseu->ss_stride, sizeof(mask));
> >> +        return 0;
> >> +    }
> >> +
> >> +    for (i = 0; i < sseu->ss_stride; i++)
> >> +        mask |= (u32)sseu->subslice_mask[offset + i] <<
> >> +            i * BITS_PER_BYTE;
> >> +
> >> +    return mask;
> >> +}
> > 
> > Why do you actually need these complications when the plan from the 
> > start was that the driver and user sseu representation structures can be 
> > different?
> > 
> > I only gave it a quick look so I might be wrong, but why not just expand 
> > the driver representations of subslice mask up from u8? Userspace API 
> > should be able to cope with strides already.
> 
> I never got an answer to this and the series was merged in the meantime.
> 
> Maybe not much harm but I still don't understand why all the 
> complications seemingly just to avoid bumping the *internal* ss mask up 
> from u8. As long as the internal and abi sseu info struct are well 
> separated and access point few and well controlled (I think they are) 
> then I don't see why the internal side had to be converted to u8 and 
> strides. But maybe I am missing something.

I looked at it and thought it was open-coding bitmap.h as well. I
accepted it in good faith that it improved certain use cases and should
even make tidying up the code without regressing those easier.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-06 18:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 15:49 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-07-23 15:49 ` [PATCH 1/9] drm/i915: Use variable for debugfs device status Stuart Summers
2019-07-24 12:41   ` Tvrtko Ursulin
2019-07-23 15:49 ` [PATCH 2/9] drm/i915: Add function to set SSEU info per platform Stuart Summers
2019-07-24 12:50   ` Tvrtko Ursulin
2019-07-23 15:49 ` [PATCH 3/9] drm/i915: Add subslice stride runtime parameter Stuart Summers
2019-07-23 15:49 ` [PATCH 4/9] drm/i915: Add EU " Stuart Summers
2019-07-23 15:49 ` [PATCH 5/9] drm/i915: Add function to set subslices Stuart Summers
2019-07-23 15:49 ` [PATCH 6/9] drm/i915: Add function to determine if a slice has a subslice Stuart Summers
2019-07-23 15:49 ` [PATCH 7/9] drm/i915: Refactor instdone loops on new subslice functions Stuart Summers
2019-07-23 15:49 ` [PATCH 8/9] drm/i915: Add new function to copy subslices for a slice Stuart Summers
2019-07-23 15:49 ` [PATCH 9/9] drm/i915: Expand subslice mask Stuart Summers
2019-07-24 13:05   ` Tvrtko Ursulin
2019-09-02 13:42     ` Tvrtko Ursulin
2019-09-06 18:13       ` Chris Wilson [this message]
2019-09-10  4:53         ` Summers, Stuart
2019-09-10  8:13           ` Tvrtko Ursulin
2019-09-18 20:25             ` Summers, Stuart
2019-07-23 17:42 ` ✗ Fi.CI.CHECKPATCH: warning for Refactor to expand subslice mask (rev 2) Patchwork
2019-07-23 18:10 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-24  2:26 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-07-24 17:12 [PATCH 0/9] " Stuart Summers
2019-07-24 17:12 ` [PATCH 9/9] drm/i915: Expand subslice mask 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 9/9] drm/i915: Expand subslice mask Stuart Summers
2019-08-19 21:18 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-08-19 21:18 ` [PATCH 9/9] drm/i915: Expand subslice mask Stuart Summers
2019-08-19 21:49 [PATCH 0/9] Refactor to expand subslice mask (rev 2) Stuart Summers
2019-08-19 21:50 ` [PATCH 9/9] drm/i915: Expand subslice mask 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=156779359430.2967.9072538110573051346@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stuart.summers@intel.com \
    --cc=tvrtko.ursulin@linux.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.