summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2022-12-22 23:15:24 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-12 22:06:01 +0300
commit9a6e6c14bfde967fca5a052cbee206d0b6169a1e (patch)
tree32fdcf22a0e86cfb0fd00c32a819e80c0249e6c1 /drivers/gpu/drm/xe
parent857912c37ea786715e03b5bf25db07e28fc2ba73 (diff)
downloadlinux-9a6e6c14bfde967fca5a052cbee206d0b6169a1e.tar.xz
drm/xe/mmio: Use non-atomic writeq/readq variant for 32b
writeq() and readq() and other functions working on 64 bit variables are not provided by 32b arch. For that it's needed to choose between linux/io-64-nonatomic-hi-lo.h and linux/io-64-nonatomic-lo-hi.h, spliting the read/write in 2 accesses. For xe driver, it doesn't matter much, so just choose one and include in xe_mmio.h. This also removes some ifdef CONFIG_64BIT we had around because of the missing 64bit functions. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r--drivers/gpu/drm/xe/xe_mmio.c7
-rw-r--r--drivers/gpu/drm/xe/xe_mmio.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 7c87be130e02..8a953df2b468 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -48,7 +48,6 @@ mask_err:
return err;
}
-#ifdef CONFIG_64BIT
static int
_resize_bar(struct xe_device *xe, int resno, resource_size_t size)
{
@@ -132,9 +131,6 @@ static int xe_resize_lmem_bar(struct xe_device *xe, resource_size_t lmem_size)
pci_write_config_dword(pdev, PCI_COMMAND, pci_cmd);
return ret;
}
-#else
-static int xe_resize_lmem_bar(struct xe_device *xe, resource_size_t lmem_size) { return 0; }
-#endif
static bool xe_pci_resource_valid(struct pci_dev *pdev, int bar)
{
@@ -236,10 +232,7 @@ int xe_mmio_probe_vram(struct xe_device *xe)
drm_warn(&xe->drm, "Restricting VRAM size to PCI resource size (0x%llx->0x%llx)\n",
lmem_size, (u64)xe->mem.vram.size);
-#ifdef CONFIG_64BIT
xe->mem.vram.mapping = ioremap_wc(xe->mem.vram.io_start, xe->mem.vram.size);
-#endif
-
xe->mem.vram.size = min_t(u64, xe->mem.vram.size, usable_size);
drm_info(&xe->drm, "TOTAL VRAM: %pa, %pa\n", &xe->mem.vram.io_start, &xe->mem.vram.size);
diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h
index a3b144553873..354be6fae0d4 100644
--- a/drivers/gpu/drm/xe/xe_mmio.h
+++ b/drivers/gpu/drm/xe/xe_mmio.h
@@ -7,6 +7,7 @@
#define _XE_MMIO_H_
#include <linux/delay.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
#include "xe_gt_types.h"