C/C++ Changing and recompiling the FreeBSD Intel i915 driver


I would like to recompile the Intel driver and install the compiled result to see if it changes anything.
I changed only 1 line in the source code: "dither = 0". So I hope this is all that has to be done to disable dithering under any circumstances.

I am NOT a programmer. I have a very basic understanding of the C language, and this is pretty much all I could change.
However, I am not sure how to compile this correctly so that my changes are included. Maybe you can help me.

I changed the file /usr/src/sys/dev/drm2/i915/intel_display.c.
Is all that I have to do now go to /usr/ports/x11-drivers/xf86-video-intel/ and type
make install clean
or would I somehow have to point to the local source folder?
I must admit I am not even sure if the code I changed actually refers to i915.


Ports and source are two completely different code repositories. If you change something under /usr/src then the https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html would cover compiling and installing a new kernel.

For the x11-drivers/xf86-video-intel port there is the x11-drivers/drm-kmod driver for FreeBSD 9.3 that does the same thing as the built in driver on FreeBSD 10. However that's still a separate port at that point.

What release are you dealing with?
I am using 10.2-RELEASE.

I did not know the driver is inside the Kernel. I thought it was a separate module like for example nvidia. Now that we talk about it, I should have wondered why I haven't had to modify /boot/loader.conf. This might get more difficult than I hoped.


The driver is compiled when the kernel is compiled (as a module) but is not inside the kernel. It should be /boot/kernel/i915.ko. Nvidia is a different story because it is a closed source driver, hence the x11/nvidia-driver port to install the separate /boot/modules/nvidia.ko and files to support it.