From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Slusarz Subject: Re: [PATCH] drm/radeon: Add early unregister of firmware fb's Date: Wed, 6 Oct 2010 21:46:46 +0200 Message-ID: <20101006194646.GB3640@joi.lan> References: <1286383147-5180-1-git-send-email-daniel.vetter@ffwll.ch> <20101006182015.GA3640@joi.lan> <20101006185412.GB3555@viiv.ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 264D49E762 for ; Wed, 6 Oct 2010 12:47:56 -0700 (PDT) Received: by fxm15 with SMTP id 15so5900226fxm.36 for ; Wed, 06 Oct 2010 12:47:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20101006185412.GB3555@viiv.ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Daniel Vetter , stable@kernel.org, dri-devel@lists.freedesktop.org, Dave Airlie List-Id: dri-devel@lists.freedesktop.org On Wed, Oct 06, 2010 at 08:54:12PM +0200, Daniel Vetter wrote: > On Wed, Oct 06, 2010 at 08:20:15PM +0200, Marcin Slusarz wrote: > > On Wed, Oct 06, 2010 at 06:39:07PM +0200, Daniel Vetter wrote: > > > +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? > > I've stumbled over that, too. It won't really matter at all because the > fb subsystem does an intersection check. The values in radeonfb_create > look more like the correct ones, but I can't get at them before the card > is initialized. I think regions passed to fb layer should be "memory I want exclusive access to", not "memory where I want to have the framebuffer", because the first one is stronger - you don't want other framebuffer to mess with your non-fb memory... Marcin