Merge drm/drm-next into drm-intel-next
[sfrench/cifs-2.6.git] / drivers / gpu / drm / i915 / display / intel_lpe_audio.c
index dca6003ccac80f5da3753039f7b2fe92de0a2ee7..8aaaef4d78568ecf7fdfe66e3bfe738e564655f9 100644 (file)
@@ -71,6 +71,8 @@
 #include <drm/intel_lpe_audio.h>
 
 #include "i915_drv.h"
+#include "i915_irq.h"
+#include "i915_reg.h"
 #include "intel_de.h"
 #include "intel_lpe_audio.h"
 #include "intel_pci_config.h"
@@ -80,8 +82,7 @@
 static struct platform_device *
 lpe_audio_platdev_create(struct drm_i915_private *dev_priv)
 {
-       struct drm_device *dev = &dev_priv->drm;
-       struct pci_dev *pdev = to_pci_dev(dev->dev);
+       struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev);
        struct platform_device_info pinfo = {};
        struct resource *rsc;
        struct platform_device *platdev;
@@ -101,14 +102,14 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv)
        rsc[0].flags    = IORESOURCE_IRQ;
        rsc[0].name     = "hdmi-lpe-audio-irq";
 
-       rsc[1].start    = pci_resource_start(pdev, GTTMMADR_BAR) +
+       rsc[1].start    = pci_resource_start(pdev, GEN4_GTTMMADR_BAR) +
                I915_HDMI_LPE_AUDIO_BASE;
-       rsc[1].end      = pci_resource_start(pdev, GTTMMADR_BAR) +
+       rsc[1].end      = pci_resource_start(pdev, GEN4_GTTMMADR_BAR) +
                I915_HDMI_LPE_AUDIO_BASE + I915_HDMI_LPE_AUDIO_SIZE - 1;
        rsc[1].flags    = IORESOURCE_MEM;
        rsc[1].name     = "hdmi-lpe-audio-mmio";
 
-       pinfo.parent = dev->dev;
+       pinfo.parent = dev_priv->drm.dev;
        pinfo.name = "hdmi-lpe-audio";
        pinfo.id = -1;
        pinfo.res = rsc;