From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, daniel.vetter@ffwll.ch, patrik.r.jakobsson@gmail.com
Cc: dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
Helge Deller <deller@gmx.de>,
linux-fbdev@vger.kernel.org
Subject: [PATCH v4 5/9] video/aperture: Move vga handling to pci function
Date: Thu, 6 Apr 2023 10:32:36 +0200 [thread overview]
Message-ID: <20230406083240.14031-6-tzimmermann@suse.de> (raw)
In-Reply-To: <20230406083240.14031-1-tzimmermann@suse.de>
From: Daniel Vetter <daniel.vetter@ffwll.ch>
A few reasons for this:
- It's really the only one where this matters. I tried looking around,
and I didn't find any non-pci vga-compatible controllers for x86
(since that's the only platform where we had this until a few
patches ago), where a driver participating in the aperture claim
dance would interfere.
- I also don't expect that any future bus anytime soon will
not just look like pci towards the OS, that's been the case for like
25+ years by now for practically everything (even non non-x86).
- Also it's a bit funny if we have one part of the vga removal in the
pci function, and the other in the generic one.
v2: Rebase.
v4:
- fix Daniel's S-o-b address
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/video/aperture.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c
index 26bdba6b2725..3aad10ab620e 100644
--- a/drivers/video/aperture.c
+++ b/drivers/video/aperture.c
@@ -298,14 +298,6 @@ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t si
aperture_detach_devices(base, size);
- /*
- * If this is the primary adapter, there could be a VGA device
- * that consumes the VGA framebuffer I/O range. Remove this device
- * as well.
- */
- if (primary)
- aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE);
-
return 0;
}
EXPORT_SYMBOL(aperture_remove_conflicting_devices);
@@ -343,6 +335,13 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na
}
if (primary) {
+ /*
+ * If this is the primary adapter, there could be a VGA device
+ * that consumes the VGA framebuffer I/O range. Remove this
+ * device as well.
+ */
+ aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE);
+
/*
* WARNING: Apparently we must kick fbdev drivers before vgacon,
* otherwise the vga fbdev driver falls over.
--
2.40.0
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, daniel.vetter@ffwll.ch, patrik.r.jakobsson@gmail.com
Cc: Helge Deller <deller@gmx.de>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: [PATCH v4 5/9] video/aperture: Move vga handling to pci function
Date: Thu, 6 Apr 2023 10:32:36 +0200 [thread overview]
Message-ID: <20230406083240.14031-6-tzimmermann@suse.de> (raw)
In-Reply-To: <20230406083240.14031-1-tzimmermann@suse.de>
From: Daniel Vetter <daniel.vetter@ffwll.ch>
A few reasons for this:
- It's really the only one where this matters. I tried looking around,
and I didn't find any non-pci vga-compatible controllers for x86
(since that's the only platform where we had this until a few
patches ago), where a driver participating in the aperture claim
dance would interfere.
- I also don't expect that any future bus anytime soon will
not just look like pci towards the OS, that's been the case for like
25+ years by now for practically everything (even non non-x86).
- Also it's a bit funny if we have one part of the vga removal in the
pci function, and the other in the generic one.
v2: Rebase.
v4:
- fix Daniel's S-o-b address
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/video/aperture.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c
index 26bdba6b2725..3aad10ab620e 100644
--- a/drivers/video/aperture.c
+++ b/drivers/video/aperture.c
@@ -298,14 +298,6 @@ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t si
aperture_detach_devices(base, size);
- /*
- * If this is the primary adapter, there could be a VGA device
- * that consumes the VGA framebuffer I/O range. Remove this device
- * as well.
- */
- if (primary)
- aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE);
-
return 0;
}
EXPORT_SYMBOL(aperture_remove_conflicting_devices);
@@ -343,6 +335,13 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na
}
if (primary) {
+ /*
+ * If this is the primary adapter, there could be a VGA device
+ * that consumes the VGA framebuffer I/O range. Remove this
+ * device as well.
+ */
+ aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE);
+
/*
* WARNING: Apparently we must kick fbdev drivers before vgacon,
* otherwise the vga fbdev driver falls over.
--
2.40.0
next prev parent reply other threads:[~2023-04-06 8:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 8:32 [PATCH v4 0/9] video/aperture: Ignore firmware framebuffers with non-primary devices Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 1/9] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers Thomas Zimmermann
2023-04-06 8:41 ` Javier Martinez Canillas
2023-04-06 8:53 ` Thomas Zimmermann
2023-04-06 9:01 ` Javier Martinez Canillas
2023-04-06 8:32 ` [PATCH v4 2/9] video/aperture: use generic code to figure out the vga default device Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 3/9] drm/aperture: Remove primary argument Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 4/9] video/aperture: Only kick vgacon when the pdev is decoding vga Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann [this message]
2023-04-06 8:32 ` [PATCH v4 5/9] video/aperture: Move vga handling to pci function Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 6/9] video/aperture: Drop primary argument Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 7/9] video/aperture: Only remove sysfb on the default vga pci device Thomas Zimmermann
2023-04-06 8:32 ` Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 8/9] fbdev: Simplify fb_is_primary_device for x86 Thomas Zimmermann
2023-04-06 8:32 ` [PATCH v4 9/9] video/aperture: Provide a VGA helper for gma500 and internal use Thomas Zimmermann
2023-04-06 8:40 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230406083240.14031-6-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=daniel.vetter@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=patrik.r.jakobsson@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.