All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 2/3] drm/i915/guc: Make scratch register base	and count flexible
Date: Thu, 4 May 2017 21:52:29 +0100	[thread overview]
Message-ID: <20170504205229.GQ24019@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20170504162604.GB41764@mwajdecz-MOBL1.ger.corp.intel.com>

On Thu, May 04, 2017 at 06:26:04PM +0200, Michal Wajdeczko wrote:
> On Thu, May 04, 2017 at 04:22:15PM +0300, Jani Nikula wrote:
> > On Thu, 04 May 2017, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
> > > We are using some scratch registers in MMIO based send function.
> > > Make their base and count flexible in preparation of upcoming
> > > GuC firmware/hardware changes. While around, change cmd len
> > > parameter verification from WARN_ON to GEM_BUG_ON as we don't
> > > need this all the time.
> > 
> > I'm not generally fond of caching the registers like this or adding
> > _MMIO() wrapping outside of i915_reg.h. Sure, we have some of that here
> > and there, but here it's hard to see the rationale because you do this
> > in preparation for something that we you're not sharing.
> > 
> 
> I can't share details atm, but as commit message says, there will be a
> change in both offsets and number of scratch registers.
> 
> Imho any wrapping around these values can't go to the i915_[guc_]reg.h file
> as that file shall include only raw MMIO definitions, without any extra
> logic that is based on GEN or PLATFORM or FW version.

The guc->send.base + offset approach is reasonable; it is certainly
the tried and trusted approach. I would stick with it, but we just can't
help with any suggestions without seeing the destination. Oh well, we
can dream that instead of using mmio space for datagrams they move to
ring (even WC will be better than a bunch of UC)!

Don't overqualify the ints though, u32 base is ok, but it could be unsigned
count (though an alternative would be u32 end, and even mark it as
GEM_DEBUG_DECL!) and definitely unsigned fw_domains as that is not
defined as being u32. (Just more than 32 domains is unlikely before
tomorrow ;)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-05-04 20:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 12:39 [PATCH 1/3] drm/i915/guc: Move notification code into virtual function Michal Wajdeczko
2017-05-02 12:39 ` [PATCH 2/3] drm/i915/guc: Make scratch register base and count flexible Michal Wajdeczko
2017-05-02 16:54   ` Daniele Ceraolo Spurio
2017-05-02 12:39 ` [PATCH 3/3] HAX Enable GuC loading & submission Michal Wajdeczko
2017-05-02 13:54 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/guc: Move notification code into virtual function Patchwork
2017-05-02 16:37 ` [PATCH 1/3] " Daniele Ceraolo Spurio
2017-05-02 21:33   ` Michal Wajdeczko
2017-05-04 12:48 ` [PATCH v2 2/3] drm/i915/guc: Make scratch register base and count flexible Michal Wajdeczko
2017-05-04 13:22   ` Jani Nikula
2017-05-04 16:26     ` Michal Wajdeczko
2017-05-04 20:52       ` Chris Wilson [this message]
2017-05-05  6:08         ` Jani Nikula
2017-05-05 11:35 ` [PATCH v3 " Michal Wajdeczko
2017-05-08 11:31   ` Joonas Lahtinen
2017-05-08 12:07     ` Jani Nikula
2017-05-09 14:08 ` [PATCH v4 " Michal Wajdeczko
2017-05-10 10:24   ` Joonas Lahtinen
2017-05-10 10:32     ` Jani Nikula
2017-05-10 11:45       ` Joonas Lahtinen

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=20170504205229.GQ24019@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michal.wajdeczko@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.