From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>,
stable@kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: Add early unregister of firmware fb's
Date: Wed, 6 Oct 2010 20:20:15 +0200 [thread overview]
Message-ID: <20101006182015.GA3640@joi.lan> (raw)
In-Reply-To: <1286383147-5180-1-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Oct 06, 2010 at 06:39:07PM +0200, Daniel Vetter wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> Without this, we attempt the handover too late, the firmware fb
> might be accessing the chip simultaneously to us re-initializing
> various parts of it, which might frighten babies or cause all sort
> of nasty psychologic trauma to kitten.
>
> Cc: stable@kernel.org
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> [danvet: add cc: stable, forward ported and compile-fixed for X86]
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>
> This patch is required to get the agp rv270 in my ppc Mac Mini working with
> kms. Also tested on my agp rv570 on amd64, doesn't seem to have ill
> effects there.
>
> Please review and apply.
>
> Thanks, Daniel
>
> drivers/gpu/drm/radeon/radeon_device.c | 19 +++++++++++++++++++
> 1 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 256d204..3aea1a8 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -584,6 +584,22 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
> }
>
>
> +static void radeon_kick_out_firmware_fb(struct drm_device *ddev)
> +{
> + struct apertures_struct *ap;
> + bool primary = false;
> +
> + ap = alloc_apertures(1);
> + ap->ranges[0].base = pci_resource_start(ddev->pdev, 0);
> + ap->ranges[0].size = pci_resource_len(ddev->pdev, 0);
Any reason why this range differs from the one in radeonfb_create?
Maybe it needs to be fixed there too?
> +
> +#ifdef CONFIG_X86
> + primary = ddev->pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW;
> +#endif
> + remove_conflicting_framebuffers(ap, "radeondrmfb", primary);
> + kfree(ap);
> +}
> +
> int radeon_device_init(struct radeon_device *rdev,
> struct drm_device *ddev,
> struct pci_dev *pdev,
> @@ -623,6 +639,9 @@ int radeon_device_init(struct radeon_device *rdev,
> init_waitqueue_head(&rdev->irq.vblank_queue);
> init_waitqueue_head(&rdev->irq.idle_queue);
>
> + /* Get rid of things like offb */
> + radeon_kick_out_firmware_fb(ddev);
> +
> /* setup workqueue */
> rdev->wq = create_workqueue("radeon");
> if (rdev->wq == NULL)
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2010-10-06 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 16:39 [PATCH] drm/radeon: Add early unregister of firmware fb's Daniel Vetter
2010-10-06 18:20 ` Marcin Slusarz [this message]
2010-10-06 18:54 ` Daniel Vetter
2010-10-06 19:46 ` Marcin Slusarz
2010-10-31 15:47 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2010-08-10 7:34 Benjamin Herrenschmidt
2010-08-16 7:00 ` Rafał Miłecki
2010-08-16 7:31 ` Benjamin Herrenschmidt
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=20101006182015.GA3640@joi.lan \
--to=marcin.slusarz@gmail.com \
--cc=airlied@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=stable@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox