mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-06-10 17:58:23 +02:00
read-only mirror of https://gitlab.freedesktop.org/mesa/drm
For the scenario where user may require to modeset with a mode supporting a fractional value for vertical refresh-rate, appropriate mode can be selected by searching for mode having matching fractional vertical refresh rate using below equation. vrefresh = (1000 * pixel clock) / (htotal * vtotal) Hz. We do this way since driver doesn't return float value of vrefresh as it use int for vrefresh in struct drm_mode_info, but we can derive the actual value using pixel clock, horizontal total size and vertical total size values. So for e.g. if user want to select mode having 59.94 Hz as refresh rate then with this patch it be can done as shown in below command, given there is an appropriate mode is available : modetest -M xlnx -s 39:1920x1080-59.94@BG24 -v NOTE: Above command was tested on xilinx DRM driver with DP monitor which was supporting mode having 59.94 Hz refresh rate. V2: Update commit message V3: Update with below changes as per review comments : 1) Use epsilon for vrefresh comparison 2) Use implicit type-casting wherever possible V4: Keep patch version history on main commit message Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> |
||
|---|---|---|
| .gitlab-ci | ||
| amdgpu | ||
| android | ||
| data | ||
| etnaviv | ||
| exynos | ||
| freedreno | ||
| include/drm | ||
| intel | ||
| libkms | ||
| man | ||
| nouveau | ||
| omap | ||
| radeon | ||
| tegra | ||
| tests | ||
| vc4 | ||
| .editorconfig | ||
| .gitlab-ci.yml | ||
| Android.common.mk | ||
| Android.mk | ||
| CleanSpec.mk | ||
| CONTRIBUTING.rst | ||
| libdrm.pc.in | ||
| libdrm_lists.h | ||
| libdrm_macros.h | ||
| libsync.h | ||
| Makefile.sources | ||
| meson.build | ||
| meson_options.txt | ||
| README.rst | ||
| RELEASING | ||
| symbols-check.py | ||
| util_double_list.h | ||
| util_math.h | ||
| xf86atomic.h | ||
| xf86drm.c | ||
| xf86drm.h | ||
| xf86drmHash.c | ||
| xf86drmHash.h | ||
| xf86drmMode.c | ||
| xf86drmMode.h | ||
| xf86drmRandom.c | ||
| xf86drmRandom.h | ||
| xf86drmSL.c | ||
libdrm - userspace library for drm
----------------------------------
This is libdrm, a userspace library for accessing the DRM, direct rendering
manager, on Linux, BSD and other operating systems that support the ioctl
interface.
The library provides wrapper functions for the ioctls to avoid exposing the
kernel interface directly, and for chipsets with drm memory manager, support
for tracking relocations and buffers.
New functionality in the kernel DRM drivers typically requires a new libdrm,
but a new libdrm will always work with an older kernel.
libdrm is a low-level library, typically used by graphics drivers such as
the Mesa drivers, the X drivers, libva and similar projects.
Compiling
---------
To set up meson:
meson builddir/
By default this will install into /usr/local, you can change your prefix
with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after
the initial meson setup).
Then use ninja to build and install:
ninja -C builddir/ install
If you are installing into a system location you will need to run install
separately, and as root.