Bug 91499 - [i915 sna] small Pixmaps rendered incorrectly
Summary: [i915 sna] small Pixmaps rendered incorrectly
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-29 03:52 UTC by Omar Sandoval
Modified: 2015-07-29 08:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Reproducer program (1.10 KB, text/plain)
2015-07-29 03:52 UTC, Omar Sandoval
no flags Details
Appearance of the reproducer in UXA mode (365 bytes, image/png)
2015-07-29 03:52 UTC, Omar Sandoval
no flags Details
Appearance of the reproducer in SNA mode (371 bytes, image/png)
2015-07-29 03:53 UTC, Omar Sandoval
no flags Details
Another UXA example (792 bytes, text/plain)
2015-07-29 03:54 UTC, Omar Sandoval
no flags Details
Another SNA example (880 bytes, image/png)
2015-07-29 03:55 UTC, Omar Sandoval
no flags Details
Another UXA example (792 bytes, image/png)
2015-07-29 03:55 UTC, Omar Sandoval
no flags Details

Description Omar Sandoval 2015-07-29 03:52:09 UTC
Created attachment 117434 [details]
Reproducer program

Hi,

I'm running into a weird rendering issue on my Lenovo ThinkPad X1 Carbon 3rd gen. Small (8x8) Pixmaps created with XCreateBitmapFromData() or XReadBitmapFile() are corrupted in SNA mode, but not in UXA mode and not on my older X1 Carbon 1st gen.

uname -m: x86_64
xf86-video-intel version: checked with 2.99.917 and latest git master (4f0a58c9db)
xserver version: 1.17.2
kernel version: 4.1.2-2-ARCH
Linux distro: Arch
Machine: Lenovo ThinkPad X1 Carbon 3rd gen

I'm attaching a few screenshots and a simple reproducer.
Comment 1 Omar Sandoval 2015-07-29 03:52:56 UTC
Created attachment 117435 [details]
Appearance of the reproducer in UXA mode
Comment 2 Omar Sandoval 2015-07-29 03:53:33 UTC
Created attachment 117436 [details]
Appearance of the reproducer in SNA mode
Comment 3 Omar Sandoval 2015-07-29 03:54:30 UTC
Created attachment 117437 [details]
Another UXA example

Here's a screenshot of the original application I ran into this with as it should look.
Comment 4 Omar Sandoval 2015-07-29 03:55:12 UTC
Created attachment 117438 [details]
Another SNA example

Here's the corresponding application in SNA.
Comment 5 Omar Sandoval 2015-07-29 03:55:57 UTC
Created attachment 117439 [details]
Another UXA example

Oops, that's a PNG, not plaintext.
Comment 6 Chris Wilson 2015-07-29 08:46:53 UTC
Thanks for the bug report and test case!

commit 4246c63347290390a2104739c719f5ff6a05a0e2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 29 09:42:26 2015 +0100

    sna: Fix off by one in constructing XCopyPlane on bdw
    
    Broadwell expanded all the relocations and we needed to adjust our
    command construction to match. I missed offsetting the XY_SRC_COPY_IMM
    used for XCopyPlane resulting in garbage for small copies on Broadwell.
    
    Reported-by: Omar Sandoval
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91499
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.