All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, daniel.vetter@ffwll.ch, patrik.r.jakobsson@gmail.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH v4 1/9] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers
Date: Thu,  6 Apr 2023 10:32:32 +0200	[thread overview]
Message-ID: <20230406083240.14031-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20230406083240.14031-1-tzimmermann@suse.de>

From: Daniel Vetter <daniel.vetter@ffwll.ch>

This one nukes all framebuffers, which is a bit much. In reality
gma500 is igpu and never shipped with anything discrete, so there should
not be any difference.

v2: Unfortunately the framebuffer sits outside of the pci bars for
gma500, and so only using the pci helpers won't be enough. Otoh if we
only use non-pci helper, then we don't get the vga handling, and
subsequent refactoring to untangle these special cases won't work.

It's not pretty, but the simplest fix (since gma500 really is the only
quirky pci driver like this we have) is to just have both calls.

v4:
- fix Daniel's S-o-b address

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 2ce96b1b9c74..f1e0eed8fea4 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -422,12 +422,17 @@ static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	/*
 	 * We cannot yet easily find the framebuffer's location in memory. So
-	 * remove all framebuffers here.
+	 * remove all framebuffers here. Note that we still want the pci special
+	 * handling to kick out vgacon.
 	 *
 	 * TODO: Refactor psb_driver_load() to map vdc_reg earlier. Then we
 	 *       might be able to read the framebuffer range from the device.
 	 */
-	ret = drm_aperture_remove_framebuffers(true, &driver);
+	ret = drm_aperture_remove_framebuffers(false, &driver);
+	if (ret)
+		return ret;
+
+	ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, &driver);
 	if (ret)
 		return ret;
 
-- 
2.40.0


  reply	other threads:[~2023-04-06  8:33 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 ` Thomas Zimmermann [this message]
2023-04-06  8:41   ` [PATCH v4 1/9] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers 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 ` [PATCH v4 5/9] video/aperture: Move vga handling to pci function Thomas Zimmermann
2023-04-06  8:32   ` 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-2-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --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.