All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Shi, Yang A" <yang.a.shi@intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "De Marchi, Lucas" <lucas.demarchi@intel.com>,
	"He, Bo" <bo.he@intel.com>
Subject: Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
Date: Wed, 11 Apr 2018 12:48:47 +0300	[thread overview]
Message-ID: <87woxegjk0.fsf@intel.com> (raw)
In-Reply-To: <E3ED5BF57CCD1C40876FA2D3385ED5D37B618350@SHSMSX101.ccr.corp.intel.com>

On Wed, 11 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>No, that's not true. Just as an example, dev_priv->cdclk.hw.cdclk
>>hasn't been initialized.
> i915_load_modeset_init->intel_power_domains_init_hw->bxt_display_core_init->bxt_init_cdclk
> dev_priv->cdclk.hw.cdclk will be initialized here.
> It happened before driver enter into intel_modeset_init.
> So it should be safe to be used from audio driver.

Was it easy to figure that out? Imagine double checking everything
whenever a) intel_audio.c gets changed, or b) anything in our probe that
might impact intel_audio.c gets changed. It's untenable. Our probe
ordering is what it is to manage the complexity of the driver. When
everything is done, we expose the driver to the rest of the system. Same
with sysfs, debugfs, etc.

>>> Would you like to suggest a better place to do intel_audio_init?
>>
>>I think the call is already where it is supposed to be. We expose
>>ourselves to the rest of the system when we are ready. If it takes
>>long, it takes long. I think you have a race in your driver, and you
>>need to deal with it properly in your driver.
>>
> No, display driver consume too much time to do initialization when it
> don't connect any display Output device.It influence whole audio
> driver and cause whole audio driver can't works well.  This don't make
> sense.

Our probe takes as long as it takes. It's a complicated driver with
complicated probing to do. Why does your design require i915 to be
probed as part of your probe? The component interface supports the
master and client binding in any order, asynchronously.

If you have issues because of the timing, it's probably a race condition
in your driver. Doing the audio init earlier on our side just papers
over your race condition without actually fixing it.

If we were to optimize our probe, it would probably mean more
parallelism and asynchronous probing, and that in turn means even
stricter requirements for finding the root cause instead of just
fiddling with the call site.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-04-11  9:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29  7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
2018-03-29  8:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] " Patchwork
2018-03-29  8:25 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-29 11:39 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-29 11:55 ` [PATCH 1/1] " Chris Wilson
2018-03-29 13:15   ` Jani Nikula
2018-04-10  7:23     ` Shi, Yang A
2018-04-10  7:56       ` Jani Nikula
2018-04-10  8:21         ` Shi, Yang A
2018-04-10 10:57           ` Jani Nikula
2018-04-10 13:58             ` Jani Nikula
2018-04-11  1:37               ` Lucas De Marchi
     [not found]                 ` <E3ED5BF57CCD1C40876FA2D3385ED5D37B6183A4@SHSMSX101.ccr.corp.intel.com>
2018-04-11 12:25                   ` Jani Nikula
2018-04-12  3:32                     ` Shi, Yang A
2018-04-12  8:06                       ` Jani Nikula
2018-04-12  8:22                         ` Shi, Yang A
2018-04-11  2:07             ` Shi, Yang A
2018-04-11  9:48               ` Jani Nikula [this message]
2018-04-10  7:14   ` Shi, Yang A
2018-04-27  7:59 ` Jani Nikula

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=87woxegjk0.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=bo.he@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=yang.a.shi@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.