aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/ast/ast_main.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2023-05-12 05:32:36 +1000
committerDave Airlie <airlied@redhat.com>2023-05-12 05:32:36 +1000
commitdc49c3b1d463a99fb529d2a69cc0e2270d6cb27e (patch)
treeeb8fcf729b3e449446439458204545ead8de374c /drivers/gpu/drm/ast/ast_main.c
parentLinux 6.4-rc1 (diff)
parentdrm/sched: Check scheduler work queue before calling timeout handling (diff)
downloadwireguard-linux-dc49c3b1d463a99fb529d2a69cc0e2270d6cb27e.tar.xz
wireguard-linux-dc49c3b1d463a99fb529d2a69cc0e2270d6cb27e.zip
Merge tag 'drm-misc-fixes-2023-05-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
drm-misc-fixes for v6.4-rc2: - More DSC macro fixes. - Small mipi-dsi fix. - Scheduler timeout handling fix. --- drm-misc-fixes for v6.4-rc1: - Fix DSC macros. - Fix VESA format for simplefb. - Prohibit potential out-of-bounds access in generic fbdev emulation. - Improve AST2500+ compat on ARM. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b34135e3-2651-4e0a-a776-9b047882b1b2@linux.intel.com
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/ast/ast_main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 794ffd4a29c5..f32ce29edba7 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -425,11 +425,12 @@ struct ast_device *ast_device_create(const struct drm_driver *drv,
return ERR_PTR(-EIO);
/*
- * If we don't have IO space at all, use MMIO now and
- * assume the chip has MMIO enabled by default (rev 0x20
- * and higher).
+ * After AST2500, MMIO is enabled by default, and it should be adopted
+ * to be compatible with Arm.
*/
- if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) {
+ if (pdev->revision >= 0x40) {
+ ast->ioregs = ast->regs + AST_IO_MM_OFFSET;
+ } else if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) {
drm_info(dev, "platform has no IO space, trying MMIO\n");
ast->ioregs = ast->regs + AST_IO_MM_OFFSET;
}