Display Driver ==================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`Architecure ` * :ref:`HW ` * :ref:`Identifying graphics card ` * :ref:`SW ` * :ref:`Application & Libraries ` * :ref:`xrandr ` * :ref:`Libraries ` * :ref:`Display settings from host driver ` * :ref:`Kernel & Driver modules ` * :ref:`List of driver modules ` * :ref:`Use case ` * :ref:`Driver Development ` * :ref:`Custom build of driver modules ` * :ref:`Loading driver modules ` * :ref:`Init path ` * :ref:`Control path ` * :ref:`Data path ` * :ref:`Contexts ` * :ref:`Threads ` * :ref:`Timers ` * :ref:`Interrupts ` * :ref:`Data Structures ` * :ref:`FAQs ` * :ref:`Reference links ` .. _FreebsdDeviceDriver_display_driver_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Display driver .. _FreebsdDeviceDriver_display_driver_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _FreebsdDeviceDriver_display_driver_step3: .. tab-set:: .. tab-item:: Version Info =============================== ======================================= # Version =============================== ======================================= Freebsd 14.1.0 =============================== ======================================= .. _FreebsdDeviceDriver_display_driver_step4: .. tab-set:: .. tab-item:: Architecture * Architecture .. _FreebsdDeviceDriver_display_driver_step5: .. tab-set:: .. tab-item:: HW .. _FreebsdDeviceDriver_display_driver_step6: .. tab-set:: .. tab-item:: Identifying graphics card * The following command can be used to identify which graphics card is installed in the system * Vendor name is Intel which means, system's display hardware is an Intel graphics adapter .. code-block:: shell test:~$ pciconf -lv | grep -B4 VGA vgapci0@pci0:0:2:0: class=0x030000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x9b41 subvendor=0x17aa subdevice=0x382f vendor = Intel Corporation device = CometLake-U GT2 [UHD Graphics] class = display subclass = VGA .. _FreebsdDeviceDriver_display_driver_step7: .. tab-set:: .. tab-item:: SW .. _FreebsdDeviceDriver_display_driver_step8: .. tab-set:: .. tab-item:: Application & Libraries .. _FreebsdDeviceDriver_display_driver_step9: .. tab-set:: .. tab-item:: xrandr .. csv-table:: :file: ./xrandr.csv :widths: 50, 50 .. _FreebsdDeviceDriver_display_driver_step10: .. tab-set:: .. tab-item:: Libraries .. code-block:: c $ xrandr libXrandr.so.2 => /usr/local/lib/libXrandr.so.2 (0x29af3e471000) libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x29af3f82e000) libX11.so.6 => /usr/local/lib/libX11.so.6 (0x29af3ec9d000) libm.so.5 => /lib/libm.so.5 (0x29af3ffd2000) libc.so.7 => /lib/libc.so.7 (0x29af40e48000) libXext.so.6 => /usr/local/lib/libXext.so.6 (0x29af414d3000) libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x29af42300000) libthr.so.3 => /lib/libthr.so.3 (0x29af43032000) libXau.so.6 => /usr/local/lib/libXau.so.6 (0x29af4350f000) libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x29af43d89000) [vdso] (0x29af3d535000) * libXrandr - This package contains the X Resize and Rotate extension library. https://www.freshports.org/x11/libXrandr * libXrender - This package contains X render library and server implementations for XFree86. https://www.freshports.org/x11/libXrender * libX11 - This package contains the X11 library. https://www.freshports.org/x11/libX11/ * libc - libc++ is a new implementation of the C++ standard library made by the llvm project targeting C++11. https://www.freshports.org/devel/libc++/ * libm - OpenLibm is an effort to have a high quality, portable, standalone C mathematical library (libm). It can be used standalone in applications and programming language implementations. https://www.freshports.org/math/openlibm/ * libXext - This package contains the X Extension library. https://www.freshports.org/x11/libXext * libXcb - The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility. https://www.freshports.org/x11/libxcb * libthr - Threading Library https://man.freebsd.org/cgi/man.cgi?query=libthr&apropos=0&sektion=0&manpath=FreeBSD+7.3-RELEASE&format=html * libXau - This package contains a library for the Authorization Protocol for X11. https://www.freshports.org/x11/libXau * libXdmcp - This package contains the X Display Manager Control Protocol library. https://www.freshports.org/x11/libXdmcp .. _FreebsdDeviceDriver_display_driver_step11: .. tab-set:: .. tab-item:: Display settings from host driver * Connect a monitor to your system via HDMI or VGA cable * Xrandr is used to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size. * Check the status by running below command .. code-block:: c test:~$ xrandr -q * set resolution by running below command .. code-block:: c test:~$ xrandr --output HDMI-2 --mode 1920x1080 * set resolution with refresh rate by running below command .. code-block:: c test:~$ xrandr --output HDMI-2 --mode 1920x1080 --rate 60.00 * Flips the display horizontally .. code-block:: c test:~$ xrandr -x * Flips the display vertically .. code-block:: c test:~$ xrandr -y * Rotates the display to the default orientation .. code-block:: c test:~$ xrandr -o normal * Rotates the display to the left .. code-block:: c test:~$ xrandr -o left * Rotates the display to the right .. code-block:: c test:~$ xrandr -o right * Lists currently active monitors .. code-block:: c test:~$ xrandr --listmonitors * Shows information about display configuration .. code-block:: c test:~$ xrandr --verbose * Displays the current screen configuration .. code-block:: c test:~$ xrandr --current * Lists available display output providers .. code-block:: c test:~$ xrandr --listproviders * Lists all currently active monitors .. code-block: c test:~$ xrandr --listactivemonitors .. _FreebsdDeviceDriver_display_driver_step12: .. tab-set:: .. tab-item:: Kernel & Driver modules .. _FreebsdDeviceDriver_display_driver_step13: .. tab-set:: .. tab-item:: List of driver modules .. tab-set:: .. tab-item:: 1. i915kms.ko .. csv-table:: :file: ./i915kms_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 2. linuxkpi_hdmi.ko .. csv-table:: :file: ./linuxkpi_hdmi_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 3. drm.ko .. csv-table:: :file: ./drm_ko.csv :widths: 50, 50 .. tab-set:: .. tab-item:: 4. dmabuf.ko .. csv-table:: :file: ./dmabuf_ko.csv :widths: 50, 50 .. _FreebsdDeviceDriver_display_driver_step14: .. tab-set:: .. tab-item:: Use case * Use case .. _FreebsdDeviceDriver_display_driver_step15: .. tab-set:: .. tab-item:: Driver Development .. _FreebsdDeviceDriver_display_driver_step16: .. tab-set:: .. tab-item:: Custom build of driver modules .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step17: .. tab-set:: .. tab-item:: Loading driver modules .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step18: .. tab-set:: .. tab-item:: Init path .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step19: .. tab-set:: .. tab-item:: Control path .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step20: .. tab-set:: .. tab-item:: Data path .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step21: .. tab-set:: .. tab-item:: Contexts .. _FreebsdDeviceDriver_display_driver_step22: .. tab-set:: .. tab-item:: Threads .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step23: .. tab-set:: .. tab-item:: Timers .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step24: .. tab-set:: .. tab-item:: Interrupts .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step25: .. tab-set:: .. tab-item:: Data Structures .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step26: .. tab-set:: .. tab-item:: FAQs .. code-block:: c test:~$ .. _FreebsdDeviceDriver_display_driver_step27: .. tab-set:: .. tab-item:: Reference links .. code-block:: c test:~$