summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_lpe_audio.c
diff options
context:
space:
mode:
authorPiotr PiĆ³rkowski <piotr.piorkowski@intel.com>2022-08-05 17:59:58 +0200
committerJani Nikula <jani.nikula@intel.com>2022-08-10 13:11:14 +0300
commit6bba2b30d29cbba78ba0f935210108e74dbe7ab3 (patch)
tree9f7dcd444a8b4ae964b650debfef16f8b01072e3 /drivers/gpu/drm/i915/display/intel_lpe_audio.c
parent1ed88a816d0037ea6fec1be18dfa9db8ee7196a7 (diff)
downloadlinux-6bba2b30d29cbba78ba0f935210108e74dbe7ab3.tar.gz
linux-6bba2b30d29cbba78ba0f935210108e74dbe7ab3.tar.bz2
linux-6bba2b30d29cbba78ba0f935210108e74dbe7ab3.zip
drm/i915: Use of BARs names instead of numbers
At the moment, when we refer to some PCI BAR we use the number of this BAR in the code. The meaning of BARs between different platforms may be different. Therefore, in order to organize the code, let's start using defined names instead of numbers. v2: Add lost header in cfg_space.c Signed-off-by: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220805155959.1983584-2-piotr.piorkowski@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_lpe_audio.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_lpe_audio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_lpe_audio.c b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
index 4970bf146c4a..1e18696aaecf 100644
--- a/drivers/gpu/drm/i915/display/intel_lpe_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
@@ -73,6 +73,7 @@
#include "i915_drv.h"
#include "intel_de.h"
#include "intel_lpe_audio.h"
+#include "intel_pci_config.h"
#define HAS_LPE_AUDIO(dev_priv) ((dev_priv)->audio.lpe.platdev != NULL)
@@ -100,9 +101,9 @@ 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, 0) +
+ rsc[1].start = pci_resource_start(pdev, GTTMMADR_BAR) +
I915_HDMI_LPE_AUDIO_BASE;
- rsc[1].end = pci_resource_start(pdev, 0) +
+ rsc[1].end = pci_resource_start(pdev, 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";