Date: Mon, 22 Dec 2014 21:17:27 +0100 From: Joel Dahl <joel@vnode.se> To: Andre Albsmeier <andre@fbsd.ata.myota.org> Cc: freebsd-x11@freebsd.org Subject: Re: [PATCH] drm2 and i915kms compiled into kernel Message-ID: <6ECD0C3C-8364-4524-8E0F-0EFF36364E6D@vnode.se> In-Reply-To: <20141222184706.GA1922@schlappy> References: <20141222184706.GA1922@schlappy>
next in thread | previous in thread | raw e-mail | index | archive | help
> 22 dec 2014 kl. 19:47 skrev Andre Albsmeier = <andre@fbsd.ata.myota.org>: >=20 > 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): >=20 > --- 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 >=20 > Now one can specify drm2 and i915kms in the kernel config and > the resulting kernel works perfectly. >=20 > 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: >=20 > --- 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 @@ >=20 > ret =3D drmCheckModesettingSupported(id); > if (ret || 1) { > + if( kld_isloaded( "vgapci/i915kms") =3D=3D 0 ) > if (xf86LoadKernelModule("i915kms")) > ret =3D = drmCheckModesettingSupported(id); > if (ret) >=20 >=20 > For this to work, we have to link xf86-video-intel against libutil. > I use: >=20 > --- 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+=3D xorg_cv_cc_flag__Wno_maybe_uninitialized=3Dno > CONFIGURE_ARGS+=3D --enable-sna > CONFIGURE_ARGS+=3D --disable-glamor > +CONFIGURE_ARGS+=3D LDFLAGS=3D-lutil > INSTALL_TARGET=3D install-strip >=20 > .include <bsd.port.mk> >=20 >=20 > Maybe someone even wants to commit this stuff (which doesn't hurt > when using drm2 and i915kms as module). Hi Andre, Can you file a bug report for this? Just so it doesn=E2=80=99t get lost. =E2=80=94 Joel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6ECD0C3C-8364-4524-8E0F-0EFF36364E6D>