- 06 Jan, 2021 1 commit
-
-
Povilas Kanapickas authored
Signed-off-by:
Povilas Kanapickas <povilas@radix.lt>
-
- 18 Dec, 2020 1 commit
-
-
Povilas Kanapickas authored
Signed-off-by:
Povilas Kanapickas <povilas@radix.lt>
-
- 17 Dec, 2020 3 commits
-
-
Povilas Kanapickas authored
Signed-off-by:
Povilas Kanapickas <povilas@radix.lt>
-
Povilas Kanapickas authored
Signed-off-by:
Povilas Kanapickas <povilas@radix.lt>
-
Povilas Kanapickas authored
Signed-off-by:
Povilas Kanapickas <povilas@radix.lt>
-
- 14 Dec, 2020 1 commit
-
-
Signed-off-by:
Povilas Kanapickas <povilas@radix.lt>
-
- 26 Nov, 2020 1 commit
-
-
By default, the macro DebugPresent() is a no-op but it can be enabled at build time for debugging purpose. However, doing so prevents the code to build because one debug statement tries to make use of a non-existent variable: present.c: In function ‘ms_present_queue_vblank’: present.c:147:18: error: ‘vbl’ undeclared (first use in this function) 147 | vbl.request.sequence)); | ^~~ present.c:49:32: note: in definition of macro ‘DebugPresent’ 49 | #define DebugPresent(x) ErrorF x | ^ Fix the build with DebugPresent() by removing the vbl variable from the debug message. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com>
-
- 25 Nov, 2020 1 commit
-
-
I forgot to add these in commits 4fefe73f, b6985d6b, 245b9db0, and 4e670f12 . Signed-off-by:
Aaron Plattner <aplattner@nvidia.com>
-
- 29 Oct, 2020 4 commits
-
-
Aaron Plattner authored
When the "CTM" (color transform matrix) modesetting property is available, create a corresponding RandR property. To match the format of the property available in the amdgpu driver, expose it as an array of 18 32-bit XA_INTEGERs representing a 3x3 matrix in row-major order, where each entry is a S31.32 sign-magnitude fixed-point number with the fractional part listed first. Signed-off-by:
Aaron Plattner <aplattner@nvidia.com> Acked-by:
Michel Dänzer <mdaenzer@redhat.com> Reviewed-by:
James Jones <jajones@nvidia.com>
-
Aaron Plattner authored
If the kernel exposes GAMMA_LUT and GAMMA_LUT_SIZE properties and the size is not what the server has pre-configured for the crtc, free the old gamma ramp memory allocated by the server and replace it with new allocations of the appropriate size. In addition, when GAMMA_LUT is available, use drmModeCreatePropertyBlob() and drmModeObjectSetProperty() to set the gamma ramp rather than using the legacy drmModeCrtcSetGamma() function. Add a new option "UseGammaLUT" to allow disabling this new behavior and falling back to drmModeCrtcSetGamma() unconditionally. Signed-off-by:
Aaron Plattner <aplattner@nvidia.com>
-
Aaron Plattner authored
Modeset properties can be set even when ms->atomic_modeset is disabled by using the drmModeObjectSetProperty() function. This will be necessary in a later change in order to set the GAMMA_LUT and CTM properties. Signed-off-by:
Aaron Plattner <aplattner@nvidia.com>
-
Aaron Plattner authored
A later change will need to read the value of the GAMMA_LUT_SIZE property. Signed-off-by:
Aaron Plattner <aplattner@nvidia.com>
-
- 25 Sep, 2020 2 commits
-
-
There was a time when setting a mode on a CRTC would not depend on the associated connector's state. If a mode had been set successfully once, it would mean it would work later on. This changed with the introduction of new connectors type that now require a link training sequence (DP, HDMI 2.0), and that means that some events may have happened while the X server was not master that would then prevent the mode from successfully be restored to its previous state. This patch relaxes the requirement that all modes should be restored on EnterVT, or the entire X-Server would go down by allowing modesets to fail (with some warnings). If a modeset fails, the CRTC will be disabled, and a RandR event will be sent for the desktop environment to fix the situation as well as possible. Additional patches might be needed to make sure that the user would never be left with all screens black in some scenarios. v2 (Martin Peres): - whitespace fixes - remove the uevent handling (it is done in a previous patch) - improve the commit message - reduce the size of the patch by not changing lines needlessly - return FALSE if one modeset fails in ignore mode - add comments/todos to explain why we do things - disable the CRTCs that failed the modeset Signed-off-by:
Kishore Kadiyala <kishore.kadiyala@intel.com> Signed-off-by:
Martin Peres <martin.peres@linux.intel.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by:
Kishore Kadiyala <kishore.kadiyala@intel.com> Closes: #1010
-
Martin Roukala authored
Normally, we would receive a uevent coming from Linux's DRM subsystem, which would trigger the check for disappearing/appearing resources. However, this event is not received when X is not master (another VT is selected), and so the userspace / desktop environment would not be notified about the changes that happened while X wasn't master. To fix the issue, this patch forces a refresh on EnterVT by splitting the kms-checking code from the uevent handling into its own (exported) function called drmmode_update_kms_state. This function is then called from both the uevent-handling function, and on EnterVT right before restoring the modes. Signed-off-by:
Martin Peres <martin.peres@linux.intel.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by:
Kishore Kadiyala <kishore.kadiyala@intel.com> Tested-by:
Kishore Kadiyala <kishore.kadiyala@intel.com>
-
- 08 Sep, 2020 3 commits
-
-
Fetch VariableRefresh option value from X conf file for modesetting backend DDX driver. This option defaults to false, and must be set to "true" in conf file for variable refresh support in the DDX driver. Signed-off-by:
Uday Kiran Pichika <pichika.uday.kiran@intel.com>
-
Window wrappers gets the notification when the window properties changes. These wrappers are mainly used to keep track of per-window _VARIABLE_REFRESH property values. These changes have been ported from AMDGPU Signed-off-by:
Uday Kiran Pichika <pichika.uday.kiran@intel.com>
-
These changes have been ported from AMD GPU DDX driver. This patch adds support for setting the CRTC variable refresh property for suitable windows flipping via the Present extension. In order for a window to be suitable for variable refresh it must have the _VARIABLE_REFRESH property set by the MESA and inform Modesetting DDX driver with window property updates. Then the window must pass the checks required to be suitable for Present extension flips - it must cover the entire X screen and no other window may already be flipping. And also DRM connector should be VRR capable. With these conditions met every CRTC for the X screen will have their variable refresh property set to true. Kernel Changes to support this feature in I915 driver is under development. Tested with DOTA2, Xonotic and custom GLX apps. Signed-off-by:
Uday Kiran Pichika <pichika.uday.kiran@intel.com>
-
- 09 Jul, 2020 1 commit
-
-
Dave Airlie authored
This is an API and ABI break Reviewed-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 05 Jul, 2020 1 commit
-
-
Alan Coopersmith authored
Most (but not all) of these were found by using codespell --builtin clear,rare,usage,informal,code,names but not everything reported by that was fixed. Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- 27 Jun, 2020 1 commit
-
-
Since the introduction of "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize" the fb_id isn't initialited at drmmode_xf86crtc_resize. Rotate operation of XRandR uses rotate_bo. So in this case the fb_id associated to the front_bo is not initialized at drmmode_set_mode_major. So fd_id remains 0. As every call to drmmode_xf86crtc_resize allocates a new front_bo we should destroy unconditionally the old_front_bo if operation success. So we free the allocated GBM handles. This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution after 3 series xrandr rotations from normal to left and vice versa reported at https://github.com/raspberrypi/firmware/issues/1345 Signed-off-by:
Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by:
Keith Packard <keithp@keithp.com> Closes: xorg/xserver#1024 Fixes: 87745321 "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize"
-
- 23 Jun, 2020 1 commit
-
-
Aaron Ma authored
EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display. Check the "Display Range Limits Descriptor" for GTF support. If panel doesn't support GTF, then add gtf modes. Otherwise X will only show the modes in "Detailed Timing Descriptor". V2: Coding style changes. V3: Coding style changes, remove unused variate. V4: remove unused variate. BugLink: drm/intel#313 Signed-off-by:
Aaron Ma <aaron.ma@canonical.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
- 13 Mar, 2020 2 commits
-
-
Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com> Signed-off-by:
Yuriy Vasilev <uuvasiliev@yandex.ru>
-
This allow x-server to run with -depth 16. Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com> Signed-off-by:
Yuriy Vasilev <uuvasiliev@yandex.ru>
-
- 11 Feb, 2020 1 commit
-
-
Resulted in a build failure with -Werror: ../hw/xfree86/drivers/modesetting/drmmode_display.c: In function ‘drmmode_crtc_set_mode’: ../hw/xfree86/drivers/modesetting/drmmode_display.c:759:15: error: unused variable ‘screen’ [-Werror=unused-variable] 759 | ScreenPtr screen = crtc->scrn->pScreen; | ^~~~~~ Fixes: c66c548e "modesetting: Call glamor_finish from drmmode_crtc_set_mode" Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
- 10 Feb, 2020 1 commit
-
-
Fixes: cb1b1e18 "modesetting: Indirect the glamor API through LoaderSymbol" Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
- 05 Feb, 2020 1 commit
-
-
Dave Airlie authored
I introduced this error with the MST hotplug code, but it can trigger on zaphod setups, and is perfectly fine. There is no support for MST/hotplug on zaphod setups currently, so we can just skip over the dynamic connector handling here. However we shouldn't skip over the lease handling so move it into the codepath. Fixes: 9257b125 ("modesetting: add dynamic connector hotplug support (MST) (v3)") Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 14 Jan, 2020 1 commit
-
-
For the miClearDrawable prototype. Apparently it doesn't get pulled in for some build configurations, breaking the build. Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
- 03 Jan, 2020 1 commit
-
-
Aaron Plattner authored
Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed. Thread 1 "Xorg" received signal SIGABRT, Aborted. 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff7892897 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6 #3 0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:121 #5 0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:136 #6 0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:166 #7 0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335 #8 0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744 #9 0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214 #10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34 This can happen, for example, if the server is configured with Xinerama and there is more than one X screen: Section "ServerLayout" Identifier "crash" Screen 0 "modesetting" Screen 1 "dummy" RightOf "modesetting" Option "Xinerama" EndSection Section "Device" Identifier "modesetting" Driver "modesetting" EndSection Section "Screen" Identifier "modesetting" Device "modesetting" EndSection Section "Device" Identifier "dummy" Driver "dummy" EndSection Section "Screen" Identifier "dummy" Device "dummy" EndSection The problem does not reproduce if there is only one X screen because of this code in xf86RandR12Init: #ifdef PANORAMIX /* XXX disable RandR when using Xinerama */ if (!noPanoramiXExtension) { if (xf86NumScreens == 1) noPanoramiXExtension = TRUE; else return TRUE; } #endif Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu driver does: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388 Signed-off-by:
Aaron Plattner <aplattner@nvidia.com> Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com>
-
- 23 Dec, 2019 1 commit
-
-
Commit cb1b1e18 modified msSharePixmapBacking() to derive modesettingPtr from the 'screen' argument. Unfortunately, the name of the argument is misleading -- the screen is the slave screen. If the master is modesetting, and the slave is not modesetting, it will segfault. To fix the problem, this change derives modesettingPtr from ppix->drawable.pScreen. This method is already used when calling ms->glamor.shareable_fd_from_pixmap() later in the function. To avoid future issues, this change also renames the 'screen' argument to 'slave'. Signed-off-by:
Alex Goins <agoins@nvidia.com> Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com>
-
- 26 Nov, 2019 1 commit
-
-
Kenneth Graunke authored
New now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver name; if successful, we use that as the DRI driver name. Following the existing dri2.c logic, we also use the same name for the VDPAU driver, except for i965 (and now iris), where we switch to the "va_gl" fallback. This allows us to bypass the PCI ID lists in xserver and centralize the driver selection mechanism inside Mesa. The hope is that we no longer have to update these lists for any future hardware.
-
- 25 Nov, 2019 4 commits
-
-
Should be slightly more efficient. Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Fixes random garbage being visible intermittently. Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
This makes sure any pending drawing to a new scanout buffer will be visible from the start. This makes the finish call in drmmode_copy_fb superfluous, so remove it. Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
This will simplify backporting the following fix to the 1.20 branch. Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
- 21 Nov, 2019 1 commit
-
-
Adam Jackson authored
Now that we've fixed LoaderSymbolFromModule this should work properly. This reverts commit 5c7c6d5c . Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com>
-
- 15 Nov, 2019 1 commit
-
-
This reverts commit dd63f717. Caused a crash at least on some systems. Closes: xorg/xserver#934
-
- 13 Nov, 2019 2 commits
-
-
Prerequisite for building all of xserver with -z now. Gitlab: xorg/xserver#692
-
Prerequisite for building all of xserver with -z now. Gitlab: xorg/xserver#692
-
- 11 Nov, 2019 2 commits
-
-
ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX private. Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an rrScrPrivPtr DDX private. Given that we can derive all of the information we need from RandR, we can support these screens by avoiding the use of xf86Crtc. This change implements an RandR-based path for ms_present_get_crtc(), allowing drawables to successfully fall back to syncing to the primary output, even if the slave doesn't have an xf86CrtcConfigPtr DDX private. Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private, drawables will fall back to 1 FPS if they overlap an output on that slave. Signed-off-by:
Alex Goins <agoins@nvidia.com>
-
DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private. ms_covering_crtc() assumes that they do, which can result in a segfault. Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer before dereferencing it. This will still mean that ms_covering_crtc() can't fall back to the primary output when a drawable overlaps a slave output (going to the 1 FPS default instead), but it won't segfault. Signed-off-by:
Alex Goins <agoins@nvidia.com>
-