Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101486

EGLFS (interlaced) modeline cannot be selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15
    • Fix Version/s: None
    • Component/s: QPA: EGLFS
    • Labels:
      None
    • Platform/s:
      Linux/Other display system

      Description

      I am trying to setup an modeline for an BlackMagick ATEM, which has an 1080@50i input requirement. Under Xorg, using xrandr this is not a problem, I can set it up, everything works flawlessly even up to a way that I can export the modeline required to get it to work.

      Using the tool https://github.com/alanbork/kmsmodeline I was also able to validate that the modeline in fact works. In order to select this modeline I am using an a configuration file. 

      {{

      { "device": "/dev/dri/card0", "outputs": [

      { "name": "DVI1", "mode": "74.25 1920 2448 2492 2640 1080 1084 1094 1125 +hsync +vsync interlace" }

      ]
      }}

      {{{
      qt.qpa.eglfs.kms: "DVI1" mode count: 16 crtc index: 0 crtc id: 50
      qt.qpa.eglfs.kms: mode 0 1920 x 1080 @ 60 hz
      qt.qpa.eglfs.kms: mode 1 1920 x 1080 @ 60 hz
      qt.qpa.eglfs.kms: mode 2 1920 x 1080 @ 60 hz
      qt.qpa.eglfs.kms: mode 3 1920 x 1080 @ 60 hz
      qt.qpa.eglfs.kms: mode 4 1920 x 1080 @ 50 hz
      qt.qpa.eglfs.kms: mode 5 1920 x 1080 @ 50 hz
      qt.qpa.eglfs.kms: mode 6 1920 x 1080 @ 30 hz
      qt.qpa.eglfs.kms: mode 7 1920 x 1080 @ 30 hz
      qt.qpa.eglfs.kms: mode 8 1920 x 1080 @ 25 hz
      qt.qpa.eglfs.kms: mode 9 1920 x 1080 @ 24 hz
      qt.qpa.eglfs.kms: mode 10 1920 x 1080 @ 24 hz
      qt.qpa.eglfs.kms: mode 11 1280 x 720 @ 60 hz
      qt.qpa.eglfs.kms: mode 12 1280 x 720 @ 60 hz
      qt.qpa.eglfs.kms: mode 13 1280 x 720 @ 50 hz
      qt.qpa.eglfs.kms: mode 14 1440 x 576 @ 50 hz
      qt.qpa.eglfs.kms: mode 15 1440 x 480 @ 60 hz
      qt.qpa.eglfs.kms: Selected mode 16 : 1920 x 1080 @ 0 hz for output "DVI1"
      }}

      I took the liberty to investigate qkmsdevice.cpp, specifically parseModeline.

      {{
      static bool parseModeline(const QByteArray &text, drmModeModeInfoPtr mode)
      {
      char hsync[16];
      char vsync[16];
      float fclock;

      mode->type = DRM_MODE_TYPE_USERDEF;
      mode->hskew = 0;
      mode->vscan = 0;
      mode->vrefresh = 0;
      mode->flags = 0;

      if (sscanf(text.constData(), "%f %hd %hd %hd %hd %hd %hd %hd %hd %15s %15s",
      &fclock,
      &mode->hdisplay,
      &mode->hsync_start,
      &mode->hsync_end,
      &mode->htotal,
      &mode->vdisplay,
      &mode->vsync_start,
      &mode->vsync_end,
      &mode->vtotal, hsync, vsync) != 11)
      return false;

      mode->clock = fclock * 1000;

      if (strcmp(hsync, "+hsync") == 0)
      mode->flags |= DRM_MODE_FLAG_PHSYNC;
      else if (strcmp(hsync, "-hsync") == 0)
      mode->flags |= DRM_MODE_FLAG_NHSYNC;
      else
      return false;

      if (strcmp(vsync, "+vsync") == 0)
      mode->flags |= DRM_MODE_FLAG_PVSYNC;
      else if (strcmp(vsync, "-vsync") == 0)
      mode->flags |= DRM_MODE_FLAG_NVSYNC;
      else
      return false;

      return true;
      }
      }}

      As can be read from the code above it misses the interlace and dblclk flags. I'll do an attempt to make a patch.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            skinkie Stefan de Konink
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes