<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nx-libs/nx-X11/programs/Xserver/fb/fbblt.c, branch pr/extend_manpage</title>
<subtitle>NXv3 (redistributed) 
</subtitle>
<id>https://openid.arctica-project.org/nx-libs/atom?h=pr%2Fextend_manpage</id>
<link rel='self' href='https://openid.arctica-project.org/nx-libs/atom?h=pr%2Fextend_manpage'/>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/'/>
<updated>2018-12-19T11:19:17+00:00</updated>
<entry>
<title>fb: fix fast-path blt detection</title>
<updated>2018-12-19T11:19:17+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2018-12-18T20:39:04+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=034228d75ba1be6b035bdd387c183f14379abdc4'/>
<id>urn:sha1:034228d75ba1be6b035bdd387c183f14379abdc4</id>
<content type='text'>
Backport of this commit:

  commit a2880699e8f1f576e1a48ebf25e8982463323f84
  Author: Keith Packard &lt;keithp@keithp.com&gt;
  Date:   Tue Mar 25 08:21:16 2014 -0700

    fb: fix fast-path blt detection

    The width parameter is used to disable the blit fast-path (memcpy) when
        source and destination rows overlap in memory. This check was added in [0].

    Unfortunately, the calculation to determine if source and destination
    lines overlapped was incorrect:
      (1) it converts width from pixels to bytes, but width is actually in
          bits, not pixels.
      (2) it adds this byte offset to dst/srcLine, which implicitly converts
          the offset from bytes to sizeof(FbBits).

    Fix both of these by converting addresses to byte pointers and width
    to bytes and doing comparisons on the resulting byte address.

    For example:
    A 32-bpp 1366 pixel-wide row will have
      width = 1366 * 32 = 43712 bits
      bpp = 32
      (bpp &gt;&gt; 3) = 4
      width * (bpp &gt;&gt; 3) = 174848 FbBits
      (FbBits *)width =&gt; 699392 bytes

    So, "careful" was true if the destination line was within 699392 bytes,
    instead of just within its 1366 * 4 = 5464 byte row.

    This bug causes us to take the slow path for large non-overlapping rows
    that are "close" in memory.  As a data point, XGetImage(1366x768) on my
    ARM chromebook was taking ~140 ms, but with this fixed, it now takes
    about 60 ms.
      XGetImage() -&gt; exaGetImage() -&gt; fbGetImage -&gt; fbBlt()

    [0] commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce
    Author: Adam Jackson &lt;ajax@redhat.com&gt;
    Date:   Thu Apr 21 16:37:11 2011 -0400

        fb: Fix memcpy abuse

        The memcpy fast path implicitly assumes that the copy walks
        left-to-right.  That's not something memcpy guarantees, and newer glibc
        on some processors will indeed break that assumption.  Since we walk a
        line at a time, check the source and destination against the width of
        the blit to determine whether we can be sloppy enough to allow memcpy.
        (Having done this, we can remove the check for !reverse as well.)

    v3: Convert to byte units

    This first checks to make sure the blt is byte aligned, converts all
    of the data to byte units and then compares for byte address range
    overlap between source and dest.

    Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
    Reviewed-by: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
</content>
</entry>
<entry>
<title>fb: Fix memcpy abuse</title>
<updated>2018-12-19T11:19:17+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2018-12-18T20:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=020ef045e0df09bc2f664d8d6e4b6600da53b41a'/>
<id>urn:sha1:020ef045e0df09bc2f664d8d6e4b6600da53b41a</id>
<content type='text'>
Fixes ArcticaProject/nx-libs#750

Backport of this commit:

commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce
Author: Adam Jackson &lt;ajax@redhat.com&gt;
Date:   Thu Apr 21 16:37:11 2011 -0400

    fb: Fix memcpy abuse

    The memcpy fast path implicitly assumes that the copy walks
    left-to-right.  That's not something memcpy guarantees, and newer glibc
    on some processors will indeed break that assumption.  Since we walk a
    line at a time, check the source and destination against the width of
    the blit to determine whether we can be sloppy enough to allow memcpy.
    (Having done this, we can remove the check for !reverse as well.)

    On an Intel Core i7-2630QM with an NVIDIA GeForce GTX 460M running in
    NoAccel, the broken code and various fixes for -copywinwin{10,100,500}
    gives (edited to fit in 80 columns):

    1: Disable the fastpath entirely
    2: Replace memcpy with memmove
    3: This fix
    4: The code before this fix

      1            2                 3                 4           Operation
      ------   ---------------   ---------------   ---------------   ------------
      258000   269000 (  1.04)   544000 (  2.11)   552000 (  2.14)   Copy 10x10
       21300    23000 (  1.08)    43700 (  2.05)    47100 (  2.21)   Copy 100x100
         960      962 (  1.00)     1990 (  2.09)     1990 (  2.07)   Copy 500x500

    So it's a modest performance hit, but correctness demands it, and it's
    probably worth keeping the 2x speedup from having the fast path in the
    first place.

    Signed-off-by: Adam Jackson &lt;ajax@redhat.com&gt;
    Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>Lift fb to xorg-xserver-7.1/1.1 state</title>
<updated>2018-02-05T12:57:14+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2017-11-05T20:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=f7207bcdc1b1f5d4b52cd3dccdde3762245ee42b'/>
<id>urn:sha1:f7207bcdc1b1f5d4b52cd3dccdde3762245ee42b</id>
<content type='text'>
Fixes ArcticaProject/nx-libs#640
</content>
</entry>
<entry>
<title>VCS info lines: Remove ancient X.org / XFree86 VCS info line from code files.</title>
<updated>2016-07-05T23:09:15+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2016-07-05T14:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=6144b615dd7ae2acd786aaa08f66c9743870b709'/>
<id>urn:sha1:6144b615dd7ae2acd786aaa08f66c9743870b709</id>
<content type='text'>
 This has already been started while replacing copyright info in file
 headers and has now been completed with this commit.
</content>
</entry>
<entry>
<title>Imported nx-X11-3.1.0-1.tar.gz</title>
<updated>2011-10-10T15:43:39+00:00</updated>
<author>
<name>Reinhard Tartler</name>
<email>siretart@tauware.de</email>
</author>
<published>2011-10-10T15:43:39+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=f4092abdf94af6a99aff944d6264bc1284e8bdd4'/>
<id>urn:sha1:f4092abdf94af6a99aff944d6264bc1284e8bdd4</id>
<content type='text'>
Summary: Imported nx-X11-3.1.0-1.tar.gz
Keywords:

Imported nx-X11-3.1.0-1.tar.gz
into Git repository
</content>
</entry>
</feed>
