From: "Yuan, Shengquan" Subject: Re: [PATCH] DRM/TTM: add NO_EVICTION flag for type manager Date: Thu, 4 Feb 2010 22:41:35 +0800 Message-ID: References: <20100204085913.GG10289@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100204085913.GG10289@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: Jerome Glisse Cc: dri-devel@lists.sf.net List-Id: dri-devel@lists.freedesktop.org On Thu, Feb 4, 2010 at 4:59 PM, Jerome Glisse wrot= e: > On Thu, Feb 04, 2010 at 04:31:13PM +0800, Yuan, Shengquan wrote: >> The patch still needs some refine, just want to check if it make sense. >> >> >From 104a4800ef8d10fbcc5bd830d0ef0040bd4249e9 Mon Sep 17 00:00:00 2001 >> From: Austin Yuan >> Date: Thu, 4 Feb 2010 16:18:28 +0800 >> Subject: [PATCH] DRM/TTM: add NO_EVICTION flag for type manager >> >> All buffers allocated from this manager will derive this flag, it is >> convenient for two reasons: >> 1) TTM_PL_FLAG_NO_EVICT needs root permission, for non-root X, >> cursor/overlay buffers need NO_EVICT >> 2) Some small devices (camera, video) want to use TTM, but don't want >> to burden driver with heavy >> =A0 =A0swap/relocation stuff because only one or two applications run at= one time. >> >> Signed-off-by: Austin Yuan > > My feeling is NAK, you can do that that by always oring TTM_PL_FLAG_NO_EV= ICT > to the flags you give a BO allocation time. It's not hard. The problem is TTM_PL_FLAG_NO_EVICT needs root permission (checked in ttm_bo_check_placement which is called by ttm_bo_init), and then non-root user hasn't a way to allocate such BO. Austin > > Cheers, > Jerome > ---------------------------------------------------------------------------= --- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the busine= ss Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --