ravynsoft / ravynos

A BSD-based OS project that aims to provide source and binary compatibility with macOS® and a similar user experience.
https://www.ravynos.com
Other
5.68k stars 192 forks source link

i915kms.ko iGVT-g error with CRTC pipe mismatch #361

Open markshank opened 2 years ago

markshank commented 2 years ago

When iGVT-g is enabled, there are errors on the serial console about a CRTC pipe state mismatch. This may be related to the artifacts on the ravynOS login screen.

When I started digging into the origin of the errors, I discovered that vmwgfx may be silently suffering from the same malady. So I will be using this issue to document my research into the source of this mismatch. As it may assist with vmwgfx troubleshooting.

Here is an excerpt from the serial console with the errors:

drmn0: [drm] ERROR [CRTC:51:pipe A] mismatch in infoframes.enable 0xfffffe00639720f8V
drmn0: [drm] ERROR mismatch in avi infoframe
drmn0: [drm] ERROR expected:
drmn0: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
drmn0: colorspace: RGB
drmn0: scan mode: No Data
drmn0: colorimetry: No Data
drmn0: picture aspect: No Data
drmn0: active aspect: 14:9 Top
drmn0: itc: No Data
drmn0: extended colorimetry: xvYCC 601
drmn0: quantization range: Default
drmn0: nups: Unknown Non-uniform Scaling
drmn0: video code: 0
drmn0: ycc quantization range: Limited
drmn0: hdmi content type: Graphics
drmn0: pixel repeat: 0
drmn0: bar top 0, bottom 0, left 0, right 0
drmn0: [drm] ERROR found:
pipe state doesn't match!

All these messages come from one or two places in the i915 code. I need to go back find the exact place in the code where they are generated and document that here.

markshank commented 2 years ago

./drivers/gpu/drm/i915/display/intel_display.c:

static void __printf(4, 5)
pipe_config_mismatch(bool fastset, const struct intel_crtc *crtc,
             const char *name, const char *format, ...)
{
...
        drm_err(&i915->drm, "[CRTC:%d:%s] mismatch in %s %pV\n",
            crtc->base.base.id, crtc->base.name, name, &vaf);
static void
pipe_config_infoframe_mismatch(struct drm_i915_private *dev_priv,
                   bool fastset, const char *name,
                   const union hdmi_infoframe *a,
                   const union hdmi_infoframe *b)
{
...
        drm_err(&dev_priv->drm, "mismatch in %s infoframe\n", name);
        drm_err(&dev_priv->drm, "expected:\n");
        hdmi_infoframe_log(KERN_ERR, dev_priv->drm.dev, a);
        drm_err(&dev_priv->drm, "found:\n");
        hdmi_infoframe_log(KERN_ERR, dev_priv->drm.dev, b);
markshank commented 2 years ago

Once upon a time, this same error was reported in Linux

[drm] ERROR (...) pipe state doesn't match! WARNING: CPU: (...) drivers/gpu/drm/i915/display/intel_display.c (...) intel_atomic_commit_tail #176

mszoek commented 2 years ago

Interesting that it was reported in Linux as well. I looked at the patch there. Unfortunately, we do not have bpf/helpers.c anywhere so it either is a different issue or needs a different fix.

markshank commented 2 years ago

After further consideration, I believe my errors were coincidental to the Linux reporter's main issue. He was using the GPU for "HW accelerated video encoding/decoding using FFMpeg". It's possible that the inconsistent display pipe was a nonissue.

markshank commented 2 years ago

Ubuntu 22.04 reference implementation

I had been using the Ubuntu 22.04 live ISO as my reference implementation and it occurred to me that it probably uses Xorg for graphics. So I installed it onto the virtual disk and tried to boot it up with Wayland. It came up as Xorg with no option for Wayland. I changed /etc/gdm3/custom.conf to force Wayland and it still would only do Xorg most of the time. Occasionally it will boot up with Wayland and here is a screenshot from one of those times.

image