From: Sascha Hauer Subject: Re: [PATCH 09/20] drm fb_helper: use lists for crtcs. Date: Sat, 4 Feb 2012 11:47:34 +0100 Message-ID: <20120204104734.GJ1990@pengutronix.de> References: <1328092718-28951-1-git-send-email-s.hauer@pengutronix.de> <1328092718-28951-10-git-send-email-s.hauer@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by gabe.freedesktop.org (Postfix) with ESMTP id C97359E7CA for ; Sat, 4 Feb 2012 02:47:40 -0800 (PST) Content-Disposition: inline In-Reply-To: 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: Dave Airlie Cc: kernel@pengutronix.de, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Feb 03, 2012 at 10:04:27AM +0000, Dave Airlie wrote: > On Wed, Feb 1, 2012 at 10:38 AM, Sascha Hauer wrote: > > The fb helper uses fixed size arrays for the associated crtcs. > > This is an unnecessary limitation, so instead use a list to > > store the crtcs and allocate them dynamically. > > I need more reasons on why this is a unnecessary limitation, for what? > > Its a lot less cache friendly to use a linked list here for not much gain, How often do you change modes? This code is run when the user changes virtual terminals, which is not very performance critical. > > do you want to attach/detach crtcs from fb at runtime? I am working on a mid layer to connect simple framebuffer devices to kms and it would be convenient to just add a crtc to a drm device once it appears. This works fine for connectors and encoders, why not also for crtcs? Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |