diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_audio.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_audio.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index d32f586f9c05..762572aeca23 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c | |||
@@ -581,26 +581,26 @@ void intel_init_audio_hooks(struct drm_i915_private *dev_priv) | |||
581 | } | 581 | } |
582 | } | 582 | } |
583 | 583 | ||
584 | static void i915_audio_component_get_power(struct device *dev) | 584 | static void i915_audio_component_get_power(struct device *kdev) |
585 | { | 585 | { |
586 | intel_display_power_get(dev_to_i915(dev), POWER_DOMAIN_AUDIO); | 586 | intel_display_power_get(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO); |
587 | } | 587 | } |
588 | 588 | ||
589 | static void i915_audio_component_put_power(struct device *dev) | 589 | static void i915_audio_component_put_power(struct device *kdev) |
590 | { | 590 | { |
591 | intel_display_power_put(dev_to_i915(dev), POWER_DOMAIN_AUDIO); | 591 | intel_display_power_put(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO); |
592 | } | 592 | } |
593 | 593 | ||
594 | static void i915_audio_component_codec_wake_override(struct device *dev, | 594 | static void i915_audio_component_codec_wake_override(struct device *kdev, |
595 | bool enable) | 595 | bool enable) |
596 | { | 596 | { |
597 | struct drm_i915_private *dev_priv = dev_to_i915(dev); | 597 | struct drm_i915_private *dev_priv = kdev_to_i915(kdev); |
598 | u32 tmp; | 598 | u32 tmp; |
599 | 599 | ||
600 | if (!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv)) | 600 | if (!IS_SKYLAKE(dev_priv) && !IS_KABYLAKE(dev_priv)) |
601 | return; | 601 | return; |
602 | 602 | ||
603 | i915_audio_component_get_power(dev); | 603 | i915_audio_component_get_power(kdev); |
604 | 604 | ||
605 | /* | 605 | /* |
606 | * Enable/disable generating the codec wake signal, overriding the | 606 | * Enable/disable generating the codec wake signal, overriding the |
@@ -618,13 +618,13 @@ static void i915_audio_component_codec_wake_override(struct device *dev, | |||
618 | usleep_range(1000, 1500); | 618 | usleep_range(1000, 1500); |
619 | } | 619 | } |
620 | 620 | ||
621 | i915_audio_component_put_power(dev); | 621 | i915_audio_component_put_power(kdev); |
622 | } | 622 | } |
623 | 623 | ||
624 | /* Get CDCLK in kHz */ | 624 | /* Get CDCLK in kHz */ |
625 | static int i915_audio_component_get_cdclk_freq(struct device *dev) | 625 | static int i915_audio_component_get_cdclk_freq(struct device *kdev) |
626 | { | 626 | { |
627 | struct drm_i915_private *dev_priv = dev_to_i915(dev); | 627 | struct drm_i915_private *dev_priv = kdev_to_i915(kdev); |
628 | 628 | ||
629 | if (WARN_ON_ONCE(!HAS_DDI(dev_priv))) | 629 | if (WARN_ON_ONCE(!HAS_DDI(dev_priv))) |
630 | return -ENODEV; | 630 | return -ENODEV; |
@@ -632,10 +632,10 @@ static int i915_audio_component_get_cdclk_freq(struct device *dev) | |||
632 | return dev_priv->cdclk_freq; | 632 | return dev_priv->cdclk_freq; |
633 | } | 633 | } |
634 | 634 | ||
635 | static int i915_audio_component_sync_audio_rate(struct device *dev, | 635 | static int i915_audio_component_sync_audio_rate(struct device *kdev, |
636 | int port, int rate) | 636 | int port, int rate) |
637 | { | 637 | { |
638 | struct drm_i915_private *dev_priv = dev_to_i915(dev); | 638 | struct drm_i915_private *dev_priv = kdev_to_i915(kdev); |
639 | struct intel_encoder *intel_encoder; | 639 | struct intel_encoder *intel_encoder; |
640 | struct intel_crtc *crtc; | 640 | struct intel_crtc *crtc; |
641 | struct drm_display_mode *mode; | 641 | struct drm_display_mode *mode; |
@@ -652,7 +652,7 @@ static int i915_audio_component_sync_audio_rate(struct device *dev, | |||
652 | !IS_HASWELL(dev_priv)) | 652 | !IS_HASWELL(dev_priv)) |
653 | return 0; | 653 | return 0; |
654 | 654 | ||
655 | i915_audio_component_get_power(dev); | 655 | i915_audio_component_get_power(kdev); |
656 | mutex_lock(&dev_priv->av_mutex); | 656 | mutex_lock(&dev_priv->av_mutex); |
657 | /* 1. get the pipe */ | 657 | /* 1. get the pipe */ |
658 | intel_encoder = dev_priv->dig_port_map[port]; | 658 | intel_encoder = dev_priv->dig_port_map[port]; |
@@ -703,15 +703,15 @@ static int i915_audio_component_sync_audio_rate(struct device *dev, | |||
703 | 703 | ||
704 | unlock: | 704 | unlock: |
705 | mutex_unlock(&dev_priv->av_mutex); | 705 | mutex_unlock(&dev_priv->av_mutex); |
706 | i915_audio_component_put_power(dev); | 706 | i915_audio_component_put_power(kdev); |
707 | return err; | 707 | return err; |
708 | } | 708 | } |
709 | 709 | ||
710 | static int i915_audio_component_get_eld(struct device *dev, int port, | 710 | static int i915_audio_component_get_eld(struct device *kdev, int port, |
711 | bool *enabled, | 711 | bool *enabled, |
712 | unsigned char *buf, int max_bytes) | 712 | unsigned char *buf, int max_bytes) |
713 | { | 713 | { |
714 | struct drm_i915_private *dev_priv = dev_to_i915(dev); | 714 | struct drm_i915_private *dev_priv = kdev_to_i915(kdev); |
715 | struct intel_encoder *intel_encoder; | 715 | struct intel_encoder *intel_encoder; |
716 | struct intel_digital_port *intel_dig_port; | 716 | struct intel_digital_port *intel_dig_port; |
717 | const u8 *eld; | 717 | const u8 *eld; |
@@ -745,11 +745,11 @@ static const struct i915_audio_component_ops i915_audio_component_ops = { | |||
745 | .get_eld = i915_audio_component_get_eld, | 745 | .get_eld = i915_audio_component_get_eld, |
746 | }; | 746 | }; |
747 | 747 | ||
748 | static int i915_audio_component_bind(struct device *i915_dev, | 748 | static int i915_audio_component_bind(struct device *i915_kdev, |
749 | struct device *hda_dev, void *data) | 749 | struct device *hda_kdev, void *data) |
750 | { | 750 | { |
751 | struct i915_audio_component *acomp = data; | 751 | struct i915_audio_component *acomp = data; |
752 | struct drm_i915_private *dev_priv = dev_to_i915(i915_dev); | 752 | struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev); |
753 | int i; | 753 | int i; |
754 | 754 | ||
755 | if (WARN_ON(acomp->ops || acomp->dev)) | 755 | if (WARN_ON(acomp->ops || acomp->dev)) |
@@ -757,7 +757,7 @@ static int i915_audio_component_bind(struct device *i915_dev, | |||
757 | 757 | ||
758 | drm_modeset_lock_all(&dev_priv->drm); | 758 | drm_modeset_lock_all(&dev_priv->drm); |
759 | acomp->ops = &i915_audio_component_ops; | 759 | acomp->ops = &i915_audio_component_ops; |
760 | acomp->dev = i915_dev; | 760 | acomp->dev = i915_kdev; |
761 | BUILD_BUG_ON(MAX_PORTS != I915_MAX_PORTS); | 761 | BUILD_BUG_ON(MAX_PORTS != I915_MAX_PORTS); |
762 | for (i = 0; i < ARRAY_SIZE(acomp->aud_sample_rate); i++) | 762 | for (i = 0; i < ARRAY_SIZE(acomp->aud_sample_rate); i++) |
763 | acomp->aud_sample_rate[i] = 0; | 763 | acomp->aud_sample_rate[i] = 0; |
@@ -767,11 +767,11 @@ static int i915_audio_component_bind(struct device *i915_dev, | |||
767 | return 0; | 767 | return 0; |
768 | } | 768 | } |
769 | 769 | ||
770 | static void i915_audio_component_unbind(struct device *i915_dev, | 770 | static void i915_audio_component_unbind(struct device *i915_kdev, |
771 | struct device *hda_dev, void *data) | 771 | struct device *hda_kdev, void *data) |
772 | { | 772 | { |
773 | struct i915_audio_component *acomp = data; | 773 | struct i915_audio_component *acomp = data; |
774 | struct drm_i915_private *dev_priv = dev_to_i915(i915_dev); | 774 | struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev); |
775 | 775 | ||
776 | drm_modeset_lock_all(&dev_priv->drm); | 776 | drm_modeset_lock_all(&dev_priv->drm); |
777 | acomp->ops = NULL; | 777 | acomp->ops = NULL; |