RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1226723 - Remove rhel7-specific hack
Summary: Remove rhel7-specific hack
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xorg-x11-drv-qxl
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 6.8
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-31 22:34 UTC by Marc-Andre Lureau
Modified: 2016-05-10 19:49 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 19:49:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Package patch (3.89 KB, patch)
2015-10-20 09:18 UTC, Frediano Ziglio
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0761 0 normal SHIPPED_LIVE X.Org X11 server and drivers bug fix and enhancement update 2016-05-10 22:33:00 UTC

Description Marc-Andre Lureau 2015-05-31 22:34:21 UTC
RHEL6 qxl driver ships with a rhel7-specific hack, to workaround video detection code when using gnome-shell. Unfortunately, this also makes video detection sometime harder on rhel6 too. It should be removed from rhel6.

Comment 3 Frediano Ziglio 2015-10-14 12:23:20 UTC
Marc, which hack are you referring to?

Comment 4 Marc-Andre Lureau 2015-10-14 12:59:30 UTC
0001-worst-hack-of-all-time-to-qxl-driver.patch
#define HACK_THE_PLANET 1

Comment 5 Frediano Ziglio 2015-10-14 14:54:15 UTC
Original issue (the reason for the patch) is https://bugzilla.redhat.com/show_bug.cgi?id=1020393. Looking at the video seems related to some bug in stream implementation. The patch mainly try to avoid spice-server to detect the streaming (look at the video). I think removing this patch at this stage could cause regressions.
Better things would be to remove the stream bug that cause that strange effects.

Comment 6 Marc-Andre Lureau 2015-10-14 16:59:46 UTC
(In reply to Frediano Ziglio from comment #5)
> Original issue (the reason for the patch) is
> https://bugzilla.redhat.com/show_bug.cgi?id=1020393. Looking at the video
> seems related to some bug in stream implementation. The patch mainly try to
> avoid spice-server to detect the streaming (look at the video). I think
> removing this patch at this stage could cause regressions.
> Better things would be to remove the stream bug that cause that strange
> effects.

Last time I checked, it caused more harm than good on rhel6 guest, basically breaking any chance of video detection :) 

The best way I could think of to solve this for rhel7 guest is to use the mesa shm patch I proposed:
http://lists.freedesktop.org/archives/mesa-dev/2015-June/086459.html.

The other less efficient and unlikely to happen, is to have x11 bigreq support for PutImage.

Comment 7 Frediano Ziglio 2015-10-15 15:29:47 UTC
I really don't understand all the background of this problem.
Looking at the video at https://bugzilla.redhat.com/show_bug.cgi?id=1020393 is not just performance is that streaming is not working correctly and the patch is a workaround to disable streaming detection.
Or perhaps I don't understand the relationship between the glitches and the performances.

Comment 8 Marc-Andre Lureau 2015-10-17 08:05:24 UTC
(In reply to Frediano Ziglio from comment #7)
> I really don't understand all the background of this problem.
> Looking at the video at https://bugzilla.redhat.com/show_bug.cgi?id=1020393
> is not just performance is that streaming is not working correctly and the
> patch is a workaround to disable streaming detection.
> Or perhaps I don't understand the relationship between the glitches and the
> performances.

You have to remember that rhel6 and rhel7 are quite different at rendering. in gnome3, mutter/clutter is responsible for compositing and so llvmpipe for sending drawing commands to the driver, mostly large images.

Video detection is not in sync with the rest of drawing, so you get glitches if done wrong. Dave hack is breaking video detection altogether, to avoid the glitches. But this of course lower performance (more weird drawings) and prevent video streams

Today, clutter is better at updating only the modified regions, and spice server video detection also got improved.

Even if removing Dave hack, the update regions are still quite big (a whole app window for ex), so a large update is done with many PutImage of various size, confusing video detection, typically with various video strips as seen in bug 1020393. Instead the region update should be done in a single request. Then video detection works properly. Having BIGREQ implementation for PutImage is one way. The better way is to use XShm to also avoid extra copy, and this is what I've done http://lists.freedesktop.org/archives/mesa-dev/2015-June/086459.html.

iirc, in short:
1. the hack is terrible breaking many chances of correct video streaming even with rhel6, and should no longer be so bad with rhel7 due to clutter and server improvements
2. video glitches are still possible due to PutImage being splitted in various updates, but the xshm mesa patches allow for a single update of regions & save memcpy (which is really nice for video or animations)

removing 1 & adding 2 is what should be done

Comment 9 Frediano Ziglio 2015-10-20 09:18:39 UTC
Created attachment 1084662 [details]
Package patch

Comment 10 Frediano Ziglio 2015-10-21 15:13:35 UTC
For developers are mostly done (see previous patch)

Comment 15 errata-xmlrpc 2016-05-10 19:49:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0761.html


Note You need to log in before you can comment on or make changes to this bug.