public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/i915: Check num_pipes before initializing audio component
@ 2016-12-19 10:19 Wang Elaine
  2016-12-19 10:19 ` [PATCH v2 2/2] drm/i915: Check num_pipes before initializing or calling display hooks Wang Elaine
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Wang Elaine @ 2016-12-19 10:19 UTC (permalink / raw)
  To: intel-gfx, elaine.wang

From: Elaine Wang <elaine.wang@intel.com>

when num_pipes is zero, it indicates there is no display and HDMI
audio doesn't exist.

v2: Move the check from caller to callee for consistency.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 3bbc96c..16c2027 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -928,6 +928,9 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv)
 {
 	int ret;
 
+	if (INTEL_INFO(dev_priv)->num_pipes == 0)
+		return;
+
 	ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops);
 	if (ret < 0) {
 		DRM_ERROR("failed to add audio component (%d)\n", ret);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-23  3:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-19 10:19 [PATCH v2 1/2] drm/i915: Check num_pipes before initializing audio component Wang Elaine
2016-12-19 10:19 ` [PATCH v2 2/2] drm/i915: Check num_pipes before initializing or calling display hooks Wang Elaine
2016-12-22 10:48   ` Jani Nikula
2016-12-23  3:33     ` Wang, Elaine
2016-12-19 11:45 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/2] drm/i915: Check num_pipes before initializing audio component Patchwork
2016-12-20  3:04   ` Wang, Elaine
2016-12-22  7:03 ` [PATCH v2 1/2] " Wang, Elaine
2016-12-22 10:48 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox