From owner-freebsd-current@FreeBSD.ORG Mon May 14 07:28:31 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0C01065676; Mon, 14 May 2012 07:28:30 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2211D8FC12; Mon, 14 May 2012 07:28:29 +0000 (UTC) Received: by laai10 with SMTP id i10so3133545laa.13 for ; Mon, 14 May 2012 00:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=azpMRlMTpF9i0gwdIyiJXZiwDn/Tdfj13ffYNPLCWlE=; b=wQo+jAam2y56UGXynRWVV59YPhC/Zke25S0C6UcN29LCk+P9jeCC/cAnfhc43g36Ua 57m8r9jycTOtRJo1ajFz8y2v3cy59kLRz/udpt4FHLTaO0In36eNCOc1i9SUV4hULbs/ 2qq0W1RGp/BUV6G5omJaedtAez9q2+T+bkqARWPeALhlnN0LqStb0YBLQzl+jsQyWMee qlgBtnADHCVAE6Ik6KTjwmoOLlptsLTibzAKETdWJvFHU/6MLDu/tGpPgMDiMvHamtze aW6wPgbbB4Y3H0o4LskrF3HV9Cyq+F/kcPwkYZ5zbfBxONnDyDz+g41wmo06diso3xJ2 lOhQ== Received: by 10.112.44.233 with SMTP id h9mr3298725lbm.26.1336980508952; Mon, 14 May 2012 00:28:28 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id k4sm23084722lbb.12.2012.05.14.00.28.26 (version=SSLv3 cipher=OTHER); Mon, 14 May 2012 00:28:27 -0700 (PDT) Date: Mon, 14 May 2012 10:28:25 +0300 From: Gleb Kurtsou To: Konstantin Belousov Message-ID: <20120514072825.GA22399@reks> References: <20120512213950.GZ2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120512213950.GZ2358@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: x11@freebsd.org, current@freebsd.org Subject: Re: Intel GPU driver import X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 07:28:31 -0000 On (13/05/2012 00:39), Konstantin Belousov wrote: > With r235375, all required VM support for new Intel GPU driver was > committed into HEAD. There are still some things to improve and > change, but now the all.14.9.patch does not touch anything outside agp > or drm. This allows to start the process of importing the new Intel > GPU driver into HEAD. > > I am writing this as initial head-up and to discuss some questions, > for which I do have answers but would prefer to have additional > feedback from people doing Xorg work. > > The patch as-is just replaces the Intel DRI1 bits with DRI2 > driver. Patch added most of the KMS infrastructure into DRM > core. Also, patch completely changed the locking model used by Intel > driver. I made absolutely minimal efforts needed to keep other DRI1 > drivers compilable. Despite that, I got several surpising reports that > Radeon DRI1 still works. > > That said, for import I can (first choice) just apply the patch, > replacing the Intel driver with new one. Or (second choice) I may > create another directory, say sys/dev/drm2, and import _only_ Intel > driver together with updated DRM core, there. > > The positive points to the second approach is that we still have older > kernel drivers around. Also, I have more freedom in changing the DRM > core, without fearing breakage in the DRI1 land. Since I do not really > want to deal with Gen2-3 hardware, and VGA console does not work with > new driver (yet), there are definite advantages. > > On the other hand, driver automatic loading will not work with > dev/drm2 approach. New driver have to use different module name to > co-exist with dri1 driver, so ddx driver cannot load new driver by old > name. As result, users need to manually kldload new driver before > starting Xorg. > > My own preference is to implement second choice and put the driver > into dev/drm2. We had somewhat similar situation with new USB stack import. First imported as 'usb2' then renamed to 'usb'. Considering there will be no new DRI1 drivers in tree we could import drm2 into sys/dev/drm and move old implementation under sys/dev/drm_compat1. It will break POLA until automatic driver loading by X fixed. Thanks, Gleb.