From: Daniel Vetter <daniel@ffwll.ch>
To: Dave Gordon <david.s.gordon@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/skl: replace csr_mutex by completion in csr firmware loading
Date: Mon, 15 Jun 2015 12:07:52 +0200 [thread overview]
Message-ID: <20150615100752.GO8341@phenom.ffwll.local> (raw)
In-Reply-To: <55706270.5060404@intel.com>
On Thu, Jun 04, 2015 at 03:36:32PM +0100, Dave Gordon wrote:
> On 04/06/15 06:59, Sagar Arun Kamble wrote:
> >
> > Hi Daniel,
> >
> > We already are grabbing RPM reference before start of DMC FW load and
> > release post load completion.
> >
> > DC5/6 can happen without Runtime PM as well. So we need to wait for CSR
> > FW load for some time once we disable PW2.
> >
> > Having completion instead of csr.lock+csr.state is correct thing to do.
> >
> > Thanks,
> > Sagar
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> Hi guys,
>
> we have a new unified loader for GuC and HuC, which we intend should be
> usable for any other microcontrollers that might be added in future. So
> it would be good to consider using it for the DMC/CSR/etc.
>
> The most-recently posted version was Alex's on 2015-04-29, but we're
> just about to re-post an updated patchset for command submission via the
> GuC, which will include the both unified firmware loading module and the
> GuC-specific part of the loader.
>
> Please have a look at these patches and let me know whether there's
> anything that would help with using the unified code for your uC(s).
>
> http://lists.freedesktop.org/archives/intel-gfx/2015-April/065575.html
> http://lists.freedesktop.org/archives/intel-gfx/2015-April/065583.html
>
> One thing that may not be obvious from the posted patches is that the
> uC-specific code can override the way the f/w image is saved e.g. if the
> loaded file image contains sections that are only needed once, they need
> not be saved; more generally, if the way that the data in the image file
> is organised doesn't match the way the data is used, the loader can
> shuffle the content around for the convenience of the final consumer.
> (We needed that at one stage, as the GuC firmware format didn't match
> the constraints of the GuC DMA engine; but the format has been fixed
> since, so the data-shuffler is not part of the public patch sequence).
Hm just looked at the generic firmware loader and not convinced this is a
good idea at all. As this discussion here shows synchronization here is a
tricky business. And in general driver load ordering is full of peril.
Trying to force a common abstraction for something rather trivial (we have
completions for the most basic case already) will only result in pains
trying to work around the not-quite-fitting infrastructure.
In my experience trying to extract common code at all costs is harmful
way too often.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-15 10:05 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 10:19 [PATCH] drm/i915/skl: replace csr_mutex by completion in csr firmware loading Animesh Manna
2015-05-21 12:11 ` Daniel Vetter
2015-05-21 17:05 ` Animesh Manna
2015-05-21 21:29 ` Daniel Vetter
2015-06-04 5:59 ` Sagar Arun Kamble
2015-06-04 14:36 ` Dave Gordon
2015-06-15 10:07 ` Daniel Vetter [this message]
2015-06-15 18:41 ` Dave Gordon
2015-06-15 10:02 ` Daniel Vetter
2015-06-29 8:39 ` Daniel Vetter
2015-07-07 12:40 ` [PATCH] drm/i915: Resign firmware loading for dmc Animesh Manna
2015-07-07 13:18 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 0/6] Redesign the dmc firmware loading Animesh Manna
2015-07-08 14:24 ` [PATCH 1/6] drm/i915/gen9: Removed csr-lock and csr-state Animesh Manna
2015-07-09 18:17 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 2/6] drm/i915/gen9: Added a async work for fw-loading and dc5/dc6 programming Animesh Manna
2015-07-08 14:24 ` [PATCH 3/6] drm/i915/gen9: Replaced request_firmware_nowait() by request_firmware() Animesh Manna
2015-07-09 18:24 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 4/6] drm/i915/gen9: Added dmc_present flag to check firmware loading status Animesh Manna
2015-07-09 18:19 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 5/6] drm/i915/skl: Removed assert for csr-fw-loading during disabling dc6 Animesh Manna
2015-07-08 14:24 ` [PATCH 6/6] drm/i915/gen9: Corrected the sanity check of mmio address range for csr Animesh Manna
2015-07-08 19:39 ` shuang.he
2015-07-09 17:32 ` Daniel Vetter
2015-07-09 20:04 ` [PATCH 01/12] drm/i915: use correct power domain for csr loading Daniel Vetter
2015-07-09 20:04 ` [PATCH 02/12] drm/i915: Only allow rpm on gen9+ with dmc loaded Daniel Vetter
2015-07-10 8:20 ` Animesh Manna
2015-07-10 16:44 ` Daniel Vetter
2015-07-09 20:04 ` [PATCH 03/12] drm/i915: move assert_csr_loaded into intel_rpm.c Daniel Vetter
2015-07-09 20:04 ` [PATCH 04/12] drm/i915: Remove csr.state, csr_lock and related code Daniel Vetter
2015-07-09 20:04 ` [PATCH 05/12] drm/i915: Align line continuations in intel_csr.c Daniel Vetter
2015-07-09 20:04 ` [PATCH 06/12] drm/i915: Simplify csr loading failure printing Daniel Vetter
2015-07-09 20:04 ` [PATCH 07/12] drm/i915/csr: extract parse_csr_fw Daniel Vetter
2015-07-09 20:04 ` [PATCH 08/12] drm/i915: Don't try to load garbage dmc firmware on resume Daniel Vetter
2015-07-09 20:04 ` [PATCH 09/12] drm/i915: Use dev_priv in csr functions Daniel Vetter
2015-07-09 20:04 ` [PATCH 10/12] drm/i915: Use request_firmware and our own async work Daniel Vetter
2015-07-09 20:04 ` [PATCH 11/12] drm/i915: Use flush_work to synchronize with dmc loader Daniel Vetter
2015-07-09 20:04 ` [PATCH 12/12] drm/i915/csr: Simplify stepping computation Daniel Vetter
2015-07-11 9:22 ` shuang.he
2015-07-10 8:12 ` [PATCH 01/12] drm/i915: use correct power domain for csr loading Animesh Manna
2015-07-10 16:46 ` Daniel Vetter
2015-07-08 10:31 ` [PATCH] drm/i915: Resign firmware loading for dmc shuang.he
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=20150615100752.GO8341@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=david.s.gordon@intel.com \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox