From owner-freebsd-x11@FreeBSD.ORG Tue Dec 23 19:11:29 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E361C5AF for ; Tue, 23 Dec 2014 19:11:28 +0000 (UTC) Received: from mail.myota.org (mail.myota.org [85.10.206.105]) by mx1.freebsd.org (Postfix) with ESMTP id 861B164C1C for ; Tue, 23 Dec 2014 19:11:27 +0000 (UTC) Received: from mobile.client (159.49.166.190.f.sta.codetel.net.do [190.166.49.159] (may be forged)) (authenticated bits=128) by mail.myota.org (8.14.9/8.14.9) with ESMTP id sBNJB10m094737; Tue, 23 Dec 2014 20:11:02 +0100 (CET) (envelope-from andre@fbsd.ata.myota.org) Received: from submit.client ([127.0.0.1]) by schlappy.local (8.14.9/8.14.9) with ESMTP id sBNJAN6g001520; Tue, 23 Dec 2014 20:10:29 +0100 (CET) (envelope-from andre@fbsd.ata.myota.org) Received: (from user@localhost) by schlappy.local (8.14.9/8.14.9/Submit) id sBNJANf1001519; Tue, 23 Dec 2014 20:10:23 +0100 (CET) (envelope-from andre@fbsd.ata.myota.org) Date: Tue, 23 Dec 2014 20:10:23 +0100 From: Andre Albsmeier To: Konstantin Belousov Subject: Re: [PATCH] drm2 and i915kms compiled into kernel Message-ID: <20141223191023.GA1493@schlappy> References: <20141222184706.GA1922@schlappy> <20141223102303.GC2148@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141223102303.GC2148@kib.kiev.ua> X-Echelon: Privacy, USSS, assault, 767, interception X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Not delayed on 85.10.206.105, ACL: AUTH(59), Origin: DO, OS: FreeBSD 9.x X-Virus-Scanned: clamav-milter 0.98.5 at colo X-Virus-Status: Clean Cc: Andre Albsmeier , freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 19:11:29 -0000 On Tue, 23-Dec-2014 at 12:23:03 +0200, Konstantin Belousov wrote: > On Mon, Dec 22, 2014 at 07:47:06PM +0100, Andre Albsmeier wrote: > > As someone who prefers to have (for me) mandatory stuff compiled > > into the kernel, here is what I had to do w.r.t. drm2 and i915kms > > in case someone likes to do the same (tested on 9.3-STABLE): > > > The patch below is not correct for HEAD or stable/10, because it does > not take TTM/radeon into the consideration. That's why I wrote that it is for drm2 and i915kms on 9.3-STABLE. > > I did not added the option to compile i915kms into static kernel, because > display console is non-functional in such setup. It is changed in > HEAD and 10 with vt(4) integration, but definitely cannot be made > working on 9. I don't understand. With the patch below, I actually _have_ i915kms and drm2 statically in the kernel on 9.3-STABLE. It boots, switches to graphics mode during boot and Xorg starts fine. I can switch back to the console with ctrl-alt-f1 and even scroll back here -- at least up to the line info: [drm] Initialized i915 1.6.0 20080730 And of course I can switch back to the running Xorg... -Andre > > > --- sys/conf/files.ORI 2014-10-31 19:21:35.000000000 +0100 > > +++ sys/conf/files 2014-12-18 13:57:01.000000000 +0100 > > @@ -1127,6 +1127,70 @@ > > compile-with "${NORMAL_C} -I$S/dev/e1000" > > dev/e1000/e1000_osdep.c optional em | igb \ > > compile-with "${NORMAL_C} -I$S/dev/e1000" > > +dev/drm2/drm_drv.c optional drm2 > > +dev/drm2/drm_crtc.c optional drm2 > > +dev/drm2/drm_ioc32.c optional drm2 > > +dev/drm2/drm_modes.c optional drm2 > > +dev/drm2/drm_gem_names.c optional drm2 > > +dev/drm2/drm_agpsupport.c optional drm2 > > +dev/drm2/drm_stub.c optional drm2 > > +dev/drm2/drm_context.c optional drm2 > > +dev/drm2/drm_dma.c optional drm2 > > +dev/drm2/drm_irq.c optional drm2 > > +dev/drm2/drm_vm.c optional drm2 > > +dev/drm2/drm_drawable.c optional drm2 > > +dev/drm2/drm_linux_list_sort.c optional drm2 > > +dev/drm2/drm_fops.c optional drm2 > > +dev/drm2/drm_gem.c optional drm2 > > +dev/drm2/drm_bufs.c optional drm2 > > +dev/drm2/drm_ioctl.c optional drm2 > > +dev/drm2/drm_sysctl.c optional drm2 > > +dev/drm2/drm_sman.c optional drm2 > > +dev/drm2/drm_hashtab.c optional drm2 > > +dev/drm2/drm_mm.c optional drm2 > > +dev/drm2/drm_memory.c optional drm2 > > +dev/drm2/drm_global.c optional drm2 > > +dev/drm2/drm_scatter.c optional drm2 > > +dev/drm2/drm_pci.c optional drm2 > > +dev/drm2/drm_auth.c optional drm2 > > +dev/drm2/drm_lock.c optional drm2 > > +dev/drm2/ttm/ttm_tt.c optional drm2 > > +dev/drm2/ttm/ttm_bo.c optional drm2 > > +dev/drm2/ttm/ttm_bo_vm.c optional drm2 > > +dev/drm2/ttm/ttm_bo_util.c optional drm2 > > +dev/drm2/ttm/ttm_memory.c optional drm2 > > +dev/drm2/ttm/ttm_page_alloc.c optional drm2 > > +dev/drm2/drm_crtc_helper.c optional drm2 > > +dev/drm2/drm_edid.c optional drm2 > > +dev/drm2/drm_fb_helper.c optional drm2 > > +dev/drm2/drm_dp_iic_helper.c optional drm2 > > +dev/drm2/i915/i915_drv.c optional i915kms drm2 > > +dev/drm2/i915/i915_dma.c optional i915kms drm2 > > +dev/drm2/i915/i915_gem.c optional i915kms drm2 > > +dev/drm2/i915/i915_gem_gtt.c optional i915kms drm2 > > +dev/drm2/i915/i915_gem_evict.c optional i915kms drm2 > > +dev/drm2/i915/i915_gem_tiling.c optional i915kms drm2 > > +dev/drm2/i915/i915_suspend.c optional i915kms drm2 > > +dev/drm2/i915/i915_irq.c optional i915kms drm2 > > +dev/drm2/i915/i915_gem_execbuffer.c optional i915kms drm2 > > +dev/drm2/i915/i915_debug.c optional i915kms drm2 > > +dev/drm2/i915/intel_ringbuffer.c optional i915kms drm2 > > +dev/drm2/i915/intel_overlay.c optional i915kms drm2 > > +dev/drm2/i915/intel_display.c optional i915kms drm2 > > +dev/drm2/i915/intel_dp.c optional i915kms drm2 > > +dev/drm2/i915/intel_sdvo.c optional i915kms drm2 > > +dev/drm2/i915/intel_panel.c optional i915kms drm2 > > +dev/drm2/i915/intel_opregion.c optional i915kms drm2 > > +dev/drm2/i915/intel_modes.c optional i915kms drm2 > > +dev/drm2/i915/intel_fb.c optional i915kms drm2 > > +dev/drm2/i915/intel_hdmi.c optional i915kms drm2 > > +dev/drm2/i915/intel_sdvo.c optional i915kms drm2 > > +dev/drm2/i915/intel_sprite.c optional i915kms drm2 > > +dev/drm2/i915/intel_iic.c optional i915kms drm2 > > +dev/drm2/i915/intel_bios.c optional i915kms drm2 > > +dev/drm2/i915/intel_crt.c optional i915kms drm2 > > +dev/drm2/i915/intel_lvds.c optional i915kms drm2 > > +dev/drm2/i915/intel_tv.c optional i915kms drm2 > > dev/et/if_et.c optional et > > dev/en/if_en_pci.c optional en pci > > dev/en/midway.c optional en > > > > Now one can specify drm2 and i915kms in the kernel config and > > the resulting kernel works perfectly. > > > > For reasons unknown to me, files/patch-i915kms of xf86-video-intel > > makes the driver load the i915kms module unconditionally. This > > results in complaints about existing module (but works otherwise) > > and can be prevented by this patch: > > > > --- src/intel_device.c.orig 2014-12-18 15:58:17.000000000 +0100 > > +++ src/intel_device.c 2014-12-18 16:12:15.000000000 +0100 > > @@ -135,6 +135,7 @@ > > > > ret = drmCheckModesettingSupported(id); > > if (ret || 1) { > > + if( kld_isloaded( "vgapci/i915kms") == 0 ) > > if (xf86LoadKernelModule("i915kms")) > > ret = drmCheckModesettingSupported(id); > > if (ret) > > > > > > For this to work, we have to link xf86-video-intel against libutil. > > I use: > > > > --- Makefile.ORI 2014-12-22 19:40:20.000000000 +0100 > > +++ Makefile 2014-12-22 19:40:45.000000000 +0100 > > @@ -28,6 +28,7 @@ > > CONFIGURE_ENV+= xorg_cv_cc_flag__Wno_maybe_uninitialized=no > > CONFIGURE_ARGS+= --enable-sna > > CONFIGURE_ARGS+= --disable-glamor > > +CONFIGURE_ARGS+= LDFLAGS=-lutil > > INSTALL_TARGET= install-strip > > > > .include > > > > > > Maybe someone even wants to commit this stuff (which doesn't hurt > > when using drm2 and i915kms as module). > > > > -Andre > > > > _______________________________________________ > > freebsd-x11@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-x11 > > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org" -- Micro$oft: When will your system crash today?