<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nx-libs/nx-X11/programs/Xserver/fb, branch pr/various9</title>
<subtitle>NXv3 (redistributed) 
</subtitle>
<id>https://cgit.arctica-project.org/nx-libs/atom?h=pr%2Fvarious9</id>
<link rel='self' href='https://cgit.arctica-project.org/nx-libs/atom?h=pr%2Fvarious9'/>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/'/>
<updated>2019-06-22T09:30:47+00:00</updated>
<entry>
<title>fb: fix memory leak in fbOverlayFinishScreenInit</title>
<updated>2019-06-22T09:30:47+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2019-06-19T22:42:01+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=9f9b790f855f4a969b4ae6730e9cad8a9e743a3a'/>
<id>urn:sha1:9f9b790f855f4a969b4ae6730e9cad8a9e743a3a</id>
<content type='text'>
  commit 2aa935bc5cc1e2d5365a97b8c5bb3d33eb5fc758
  Author: Tiago Vignatti &lt;tiago.vignatti@nokia.com&gt;
  Date:   Fri Mar 25 22:10:55 2011 +0200

    fb: fix memory leak in fbOverlayFinishScreenInit

    Signed-off-by: Tiago Vignatti &lt;tiago.vignatti@nokia.com&gt;
    Reviewed-by: Nicolas Peninguy &lt;nico@lostgeeks.org&gt;
    Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
</entry>
<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://cgit.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://cgit.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://cgit.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>Clearing comments from $XFree86$ (et al.) header lines.</title>
<updated>2017-04-19T11:08:45+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2017-04-19T11:08:26+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=4ad88de861f6a513d4d6ae4b4609f7ced1001a6b'/>
<id>urn:sha1:4ad88de861f6a513d4d6ae4b4609f7ced1001a6b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Save pixmap allocation hints into the PixmapRec.</title>
<updated>2017-04-10T14:22:28+00:00</updated>
<author>
<name>Aaron Plattner</name>
<email>aplattner@nvidia.com</email>
</author>
<published>2017-02-22T13:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=aa50b35a5054d59d7d1d430435665b0a38866b74'/>
<id>urn:sha1:aa50b35a5054d59d7d1d430435665b0a38866b74</id>
<content type='text'>
 Backported from X.org:

 commit f797c96845a3fab37cda6839ebecf9ac5401fd6e
 Author: Aaron Plattner &lt;aplattner@nvidia.com&gt;
 Date:   Thu Nov 15 12:12:02 2007 -0800

    Save pixmap allocation hints into the PixmapRec.

 Backported-to-NX-by: Mike Gabriel &lt;mike.gabriel@das-netzwerkteam.de&gt;
</content>
</entry>
<entry>
<title>Add CreatePixmap allocation hints.</title>
<updated>2017-04-10T14:22:28+00:00</updated>
<author>
<name>Aaron Plattner</name>
<email>aplattner@nvidia.com</email>
</author>
<published>2017-02-22T12:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=3ef6d51202a5c4f8ad23d17abf0ee9957129e88c'/>
<id>urn:sha1:3ef6d51202a5c4f8ad23d17abf0ee9957129e88c</id>
<content type='text'>
 Backported from X.org:

 commit f2e310132fbe1520c1b5f3da4faa2d2d47835e72
 Author: Aaron Plattner &lt;aplattner@nvidia.com&gt;
 Date:   Wed Oct 31 14:15:35 2007 -0700

    Add CreatePixmap allocation hints.

    These hints allow an acceleration architecture to optimize allocation of certain
    types of pixmaps, such as pixmaps that will serve as backing pixmaps for
    redirected windows.

 Backported-to-NX-by: Mike Gabriel &lt;mike.gabriel@das-netzwerkteam.de&gt;
</content>
</entry>
<entry>
<title>xserver: remove index from CloseScreen (API/ABI breakage)</title>
<updated>2017-04-10T12:56:29+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@gmail.com</email>
</author>
<published>2017-03-10T23:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=93ea74e53e13890ea2f85ea57e9455d0eb2525f4'/>
<id>urn:sha1:93ea74e53e13890ea2f85ea57e9455d0eb2525f4</id>
<content type='text'>
 Extracted from X.org bulk commit:

 commit 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5
 Author: Dave Airlie &lt;airlied@redhat.com&gt;
 Date:   Tue Jun 5 13:22:18 2012 +0100

    api: rework the X server driver API to avoid global arrays.

    This is a squash merge containing all the API changes, as
    well as the video ABI bump.

    Its been squashed to make bisection easier.

    Full patch log below:

    [...]

    commit 06729dbbc804a20242e6499f446acb5d94023c3c
    Author: Dave Airlie &lt;airlied@gmail.com&gt;
    Date:   Tue Apr 10 14:04:59 2012 +0100

        xserver: remove index from CloseScreen (API/ABI breakage)

        This drops the index from the CloseScreen callback,
        its always been useless really, since the pScreen contains it.

        Reviewed-by: Alan Coopersmith &lt;alan.coopersmith@oracle.com&gt;
        Acked-by: Aaron Plattner &lt;aplattner@nvidia.com&gt;
        Reviewed-by: Adam Jackson &lt;ajax@redhat.com&gt;
        Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>fb: fix compiler warning</title>
<updated>2017-03-10T18:44:22+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2017-03-03T22:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=c1ed005694f590497f207f94085da593574c63e5'/>
<id>urn:sha1:c1ed005694f590497f207f94085da593574c63e5</id>
<content type='text'>
fbtrap.c: In function ‘fbRasterizeTrapezoid’:
fbtrap.c:113:12: warning: variable ‘x_off_fixed’ set but not used [-Wunused-but-set-variable]
     xFixed x_off_fixed;
</content>
</entry>
<entry>
<title>replace (DE)ALLOCATE_LOCAL by malloc/free</title>
<updated>2017-03-03T17:58:43+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2017-03-02T14:38:08+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=09ef99919c010801bd4220d482a867035b6f4f25'/>
<id>urn:sha1:09ef99919c010801bd4220d482a867035b6f4f25</id>
<content type='text'>
This is basically a backport of the following commits + replacing
xalloc/xfree by malloc/free. Fixes ArcticaProject/nx-libs#358.

   commit 2761c103311a1160bc483fd0367d654733df8598
   Author: Daniel Stone &lt;daniel@fooishbar.org&gt;
   Date:   Mon Nov 5 14:03:26 2007 +0000

       OS: Remove usage of alloca

       Replace with heap allocations.

   commit 5e363500c86042c394595e1a6633581eb8fcd1bb
   Author: Daniel Stone &lt;daniel@fooishbar.org&gt;
   Date:   Mon Nov 5 14:38:28 2007 +0000

       OS: Remove ALLOCATE_LOCAL from os.h

       Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and
       remove the include of Xalloca.h as well.
</content>
</entry>
</feed>
