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

kms: hardcoded cursor size leading to artifacts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0 Beta
    • 5.3.2
    • QPA: KMS
    • None

    Description

      In the constructor QKmsCursor::QKmsCursor() there is a call to gbm_bo_create with a hardcoded width/height of 64x64.

      We have a unit with a hardware cursor of 128x128. On this unit showing a Qt cursor leads to artifacts similar to: https://www.libreoffice.org/bugzilla/attachment.cgi?id=100690

      I don't know much about drm etc. but I have just followed the following change from an xorg driver:
      http://cgit.freedesktop.org/xorg/driver/xf86-video-modesetting/commit/?id=677935b2d20f54f21c645b5eb386b6c9485fee5f
      and came up with a patch to Qt (see attachment) which seems to solve the problem for us. For example with this patch at the above-mentioned unit the cursor size is automatically recognized as 128x128 and I see no artifacts, just the cursor (e.g. an arrow).

      In this patch I do the following:

      • if environment variables
        QT_CURSOR_WIDTH
        QT_CURSOR_HEIGHT
        are set, then these values are used for cursor size (so if something goes
        wrong with drmGetCap you can always set size manually);
      • if they are not set, then I call the drmGetCap() call to get settings and
        use these;
        (it's probably not needed: but as an extra protection: if I get from drmGetCap a value smaller than 32 then I use 32 instead
      • if QT_CURSOR_WIDTH/HEIGHT is not set, and drmGetCap() fails then default
        value of 64 (as hardcoded in current qt sources) is used

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            wiecko Marek Wieckowski
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes