[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-openchrome: Changes to 'debian-unstable'



 ChangeLog            | 6891 +++++++++++++++++++++++++++++++++++----------------
 NEWS                 |   22 
 configure.ac         |   83 
 debian/changelog     |    5 
 debian/gbp.conf      |    4 
 src/Makefile.am      |   21 
 src/drm_fourcc.h     |  130 
 src/via_ch7xxx.c     |    2 
 src/via_ch7xxx.h     |    4 
 src/via_display.c    |   61 
 src/via_dri.c        |    2 
 src/via_driver.c     |  214 +
 src/via_driver.h     |   29 
 src/via_drm.h        |    4 
 src/via_eng_regs.h   |    2 
 src/via_exa.c        |   77 
 src/via_exa_h2.c     |   25 
 src/via_exa_h6.c     |   42 
 src/via_i2c.c        |    4 
 src/via_id.c         |   24 
 src/via_kms.c        |  221 -
 src/via_kms.h        |   11 
 src/via_lvds.c       |   13 
 src/via_memmgr.c     |   48 
 src/via_memmgr.h     |    4 
 src/via_outputs.c    |   73 
 src/via_priv.h       |    2 
 src/via_ums.c        |   66 
 src/via_ums.h        |    5 
 src/via_vbe.c        |    2 
 src/via_vgahw.c      |    6 
 src/via_vgahw.h      |    1 
 src/via_vt162x.c     |   50 
 src/via_vt162x.h     |    5 
 src/via_xv.c         |   33 
 src/via_xv_overlay.c |   15 
 src/via_xvmc.c       |    4 
 src/xvmc/xf86dri.c   |   14 
 tools/registers.c    |   86 
 39 files changed, 5671 insertions(+), 2634 deletions(-)

New commits:
commit 6e014f79e84fe62e6803905999ef8f7491d2ef72
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Sep 25 16:38:01 2013 +0200

    bump changelogs

diff --git a/ChangeLog b/ChangeLog
index 3685bf0..8b67967 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,430 @@
+commit 0c17f81ad43d42958ab3871c9b5c5e9cea402256
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Wed May 22 18:58:48 2013 +0200
+
+    Bump version to 0.3.3
+
+commit db309e3cd87a1279e8b592a692390755c528de4f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Apr 13 20:57:07 2013 -0700
+
+    integer overflow in uniDRIGetClientDriverName() in libchromeXvMC* [CVE-2013-1994 2/2]
+    
+    clientDriverNameLength is a CARD32 and needs to be bounds checked before
+    adding one to it to come up with the total size to allocate, to avoid
+    integer overflow leading to underallocation and writing data from the
+    network past the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 68bf50ce4903ec93da59cea78e063ed7c3882d3e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Apr 13 20:49:43 2013 -0700
+
+    integer overflow in uniDRIOpenConnection() in libchromeXvMC* [CVE-2013-1994 1/2]
+    
+    busIdStringLength is a CARD32 and needs to be bounds checked before adding
+    one to it to come up with the total size to allocate, to avoid integer
+    overflow leading to underallocation and writing data from the network past
+    the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 50cef9490c6a128613c5b9f3f19ef2e803088983
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Tue May 21 21:24:41 2013 +0200
+
+    Probe TV encoder on all but the P4M900, unless we know the board has a TV encoder.
+    
+    Probing the TV encoder on the P4M900 chipset family when there is no such encoder is not safe. It is safe however on all other platforms.
+
+commit 79731f58281eb8782f8291a3d9375cb3f7691a13
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Wed May 22 10:47:25 2013 -0400
+
+    Our xorg driver has moved to using drm_fourcc.h but not all distros have a new enough libdrm so building can fail. We place a copy in our source tree to ensure building and this header doesn't change to often
+
+commit a013a7deabc63dd76d3ae635e05c9da4a5fc321b
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Mon May 20 18:13:24 2013 -0400
+
+    Patch from Krummenacher <max.krummenacher@toradex.com>
+    to fix via_lvds.c warning, char* compared to string literal
+    
+    gcc 4.7.2 issues a warning which make 'open suse build system' fail.
+    via_lvds.c: In function 'via_lvds_detect':
+    via_lvds.c:1305:26: warning: comparison with string literal results in unspecified behavior [-Waddress]
+
+commit cee0a1fab9cade87e6de16c67cd34c84cf697531
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun May 19 17:18:39 2013 -0400
+
+    Fix the problems with UMS multiple screen handling. KMS still has problems
+
+commit 42d7ac70e3e9735619690a86482954827936d169
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun May 19 15:13:28 2013 -0400
+
+    In our driver in order to support both KMS and UMS we can't call drmmode_set_mode_major directly but instead
+    call xf86CrtcSetMode or alike functions. All those xorg methods are wrappers around xf86CrtcSetModeTransform
+    which does the handling of restoring the mode in failure cases. If you look at drmmode_set_mode_major it also
+    does the the same error handling because the was copied from drivers that directly called it. Since this is
+    not the case for us we can make drmmode_set_mode_major much simpler and depend on xf86CrtcSetModeTransform to
+    handle failures for us.
+
+commit 541a3c1765e71af91e1319a3ab165ac37a0fd17d
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Wed Apr 24 19:38:02 2013 +0200
+
+    make iga[12]_crtc_mode_fixup more verbose when the mode is rejected.
+
+commit 3808a3b88e474f9549b06388c8bc323c4cb0b4b9
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Apr 21 10:19:24 2013 -0400
+
+    Integrate the different formats now supported by libdrm. This makes allocating buffers for KMS planes in the future much easier
+
+commit 186fe79c51e046b2732455eaa16500af32d7d077
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Apr 14 11:22:16 2013 -0400
+
+    drmmode_set_mode_major does this for us so no need to do it here
+
+commit 50b0f9186d33a2bd0be4bc55cd52e82e752e459f
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Apr 14 11:19:28 2013 -0400
+
+    Enable xorg driver to recieve hotplug events.
+
+commit 6812894a31146d08bd06db6f9085c2dbdc0be3db
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Apr 14 11:17:41 2013 -0400
+
+    via_xf86crtc_resize can handle both UMS and KMS modes so we can remove drmmode_xf86crtc_resize.
+
+commit 03c1b92d6b84af47fad90a2ade206a5c9a3b7e9a
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Wed Apr 3 23:25:38 2013 +0200
+
+    Biostar Viotech 3100+ (reported by J. Scott Heppler)
+
+commit 9bc4026a4069c1ab5b595315dac4a03d1b65129a
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Wed Mar 27 22:53:53 2013 +0100
+
+    bump version to 0.3.2
+
+commit 9355bc487e12aa7af2edd13dbfcaf9c8752ae954
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Wed Mar 20 20:26:19 2013 -0400
+
+    Rename GEM data structure in the fashion of other drm driver apis
+
+commit 17973712f083100cc041d50fca30e248846e5fd2
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Wed Mar 20 20:05:57 2013 -0400
+
+    miInitializeBackingStore no longer exist in xorg server 1.14. Removing causes no regression in earlier versions from my testing
+
+commit a925749eb21ba9e2e58845bc91554a09f20322ca
+Author: Pascal Ermster <bugs.freedesktop.org@hardfalcon.net>
+Date:   Mon Mar 4 19:53:51 2013 +0100
+
+    Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS
+
+commit 396a209cd1988ece56d556d756c062b0120991d1
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Feb 18 22:45:11 2013 +0100
+
+    Hardcode panel size for the XO
+
+commit c27f9fedd1ffb3462154dc309afdf10b5b6ff50d
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Tue Jan 29 22:43:05 2013 +0100
+
+    Add an explicit message for KMS support configure check
+
+commit bd13b49532479134eaecc47359e2056f0a48f680
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Jan 28 23:17:30 2013 +0100
+
+    Revert CLE266 to legacy modeswitch
+
+commit 379a119cc4d1bb31060a8a1656b208324d60df00
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Jan 21 20:37:32 2013 +0100
+
+    Fujitsu Futro A300 (reported by Alberto Asuero)
+
+commit 134cefa6eefb145deb37f1b428b854b96692c446
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Sun Jan 20 00:42:31 2013 +0100
+
+    When the card id is unknown, don't check CLE266 revision if the chipset is not CLE266
+
+commit 4d8e321dd715edcaf1e6df70ef29e52c552039a2
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sat Jan 12 20:00:50 2013 -0500
+
+    Allow via_output.c to build without C99 mode
+
+commit b466f471da4e274368adcd24b547cbe1a92ce1df
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sat Jan 12 16:19:25 2013 -0500
+
+    Support older X servers for RHEL5
+
+commit 53f034c70f6527eac87ea4a877b2170edaf12b13
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sat Jan 12 16:05:02 2013 -0500
+
+    Add Nec Powermate VL5 ViaCardId data to support this device
+
+commit 76515c8a369346d76864e55610a6a747d9b152d8
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sat Jan 12 16:02:12 2013 -0500
+
+    As the comment suggested in via_outputs.c probing the 3rd i2c bug locks up the P4M900. So we re-enable the via_card_id handling of what outputs to test for to get around this problem.
+
+commit 5a2d98863388413e6c6a2d971d1a68af5ca91173
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Thu Jan 3 22:02:25 2013 +0000
+
+    Fix a long standing issues of detecting the proper amount of VRAM on the P4M800 devices. We can tell it is a p4m800 versus a km400 by what pci bridge it has and reading the proper pic function
+
+commit 62a82ebfe8567e82af7ed900f7011fb683eced4f
+Author: Harry de Boer <harry@ijscoboer.nl>
+Date:   Mon Nov 26 22:36:23 2012 +0100
+
+    Return valid DisplayModePtr list for tv outputs. When creating a list of DisplayModePtr the ->next and ->prev pointers should point to the next/previous item in the list or only the first modeline will be recognised. This patch changes via_tv_get_modes to use the xf86ModesAdd and xf86DuplicateMode helpers to create correct modeline lists from a DisplayModeRec array.
+
+commit c290112cf808029dcf6e1e77b8b232dd7ab142b6
+Author: Harry de Boer <harry@ijscoboer.nl>
+Date:   Mon Nov 26 02:58:25 2012 +0100
+
+    Set possible_crtcs to allow tv outputs to be connected to crtcs.
+
+commit cebafd2ee9ba819518008561db34af0a2d1914c7
+Author: Harry de Boer <harry@ijscoboer.nl>
+Date:   Thu Nov 22 22:41:50 2012 +0100
+
+    VT1625 register count is 0x82
+
+commit 75f6cd75477110ef463f7d5b9f11a994b760e9d3
+Author: Harry de Boer <harry@ijscoboer.nl>
+Date:   Thu Nov 22 13:21:36 2012 +0100
+
+    Fix VT1625 output sensing. VT1625DACSenseI2C was using the same code as VT162xDACSenseI2C but the DAC sensing bit is in a different register for the VT1625. Also adds support for the VT1625S which has only four DACs.
+
+commit bae5f0923c8871feead875a67d3c55af9615f991
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Wed Jan 2 21:02:46 2013 +0100
+
+    typo
+
+commit 0db1c3c472c0c26ad3d3d951e5e3c05774b0f606
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Tue Dec 11 20:57:17 2012 +0100
+
+    Fix CN400 Xv on secondary
+
+commit fe5ef9748fe46c92db7a7ff91839b9dd582f6cea
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Mon Dec 3 18:56:30 2012 +0000
+
+    Doh, shouldn't code when sleepy. Free the TV i2c struct only we still have a pBIOSInfo struct left
+
+commit 84cf9bbfa3c8a192fe52ff2f378e421037e608bc
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Dec 3 00:14:38 2012 +0100
+
+    Fix registers description
+
+commit 1b65992b08fc05866a2b8703e2198b80a1707094
+Author: Bartosz Kosiorek <gang65@poczta.onet.pl>
+Date:   Mon Dec 3 00:13:54 2012 +0100
+
+    Fix Xv bandwidth check when no vertical refresh is available
+
+commit 91ad6eac6362b74c24c626832697f097a7698aa8
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Dec 2 15:42:17 2012 -0500
+
+    Fix a double free when exiting the xorg server
+
+commit f721d029cc5b5ed5a558473622552c7ce802fef9
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Nov 25 13:20:30 2012 -0500
+
+    Do not support earlier libdrm versions that lack KMS support.
+
+commit f95c041fe69abc33e46977a0ee022ca77d1a279e
+Author: Bartosz Kosiorek <gang65@poczta.onet.pl>
+Date:   Thu Nov 15 13:51:33 2012 +0000
+
+    Fixes to reenable EXA composite support. Currently EXA crashes
+    due to accessing assuming we are attached to a Drawable which
+    might not be the case. This patch now has us test for a Drawable
+    and if not attached to one we don't do anything. Also the repeat
+    support check was completely wrong. The code currently attempts
+    to use repeat as a type instead of using it to test if repeat is
+    supported or not. The fix is to test if repeat is enabled and if
+    enabled test for the repeat type. With these fixes in place EXA
+    composite support is enabled by default.
+    
+    Signed-off-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
+    Tested-by: Xavier Bachelot <xavier@bachelot.org>
+    Tested-by: James Simmons <jsimmons@infradead.org>
+
+commit e0c04ca1ff6e795f2144aeb0a8b5db305dbdc6f0
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Tue Nov 13 12:47:06 2012 +0000
+
+    Sometimes we fail to get a EDID from a VGA monitor but a real display is attached. In this case we look to see if a vblank is raised by the analog monitor and report it as detected
+
+commit 6f75bbc33684ab3c8e307df3cdac05edd429b0a9
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sat Nov 10 09:49:09 2012 -0500
+
+    XSERVER_LIBPCIACCESS is now decrepide but we need to handle older platforms (rhel5) so HAVE_PCIACCESS was created. This patch allows us to use libpciaccess 0.11 or better or work around the lack of libpciaccess.
+
+commit 14a0dede1f22b8f3ac295995d6093facc48fba58
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Fri Nov 9 18:39:53 2012 -0500
+
+    ViaDisplayInit called at startup broke VT switching. Instead I call ViaDisplayInit in VIARestore which allows CLE266 to work without legacy mode
+
+commit 803c882cf5fda7b677feb1962cffac9401b6688a
+Author: Bartosz Kosiorek <gang65@poczta.onet.pl>
+Date:   Thu Nov 1 22:02:08 2012 +0100
+
+    registers dumper improvements
+
+commit a9f13be7cfeefb4842f4ac378dc6f4eea3dd8ac2
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Thu Nov 1 21:20:07 2012 +0100
+
+    Fix indentation
+
+commit 7311799ea75e49001efdcca8d565aa76c7bf297c
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Thu Nov 1 21:16:17 2012 +0100
+
+    Change to new mailing list address
+
+commit e3685312c306c14d16dc399239a6bcd8ed0d7c86
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Oct 8 22:15:26 2012 +0200
+
+    Fix typo
+
+commit dbed0fcbfa44f6433a4d87177d12c3a9fe73a40e
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Mon Oct 15 17:25:40 2012 -0400
+
+    Setup the basic IGA registers. This is needed to allow CLE266 to work in Non Legacy Modesetting.
+
+commit 602bb46bdba8f2986f224df204f7cd9ad426e15a
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Mon Oct 15 16:52:54 2012 -0400
+
+    The default timeouts for values for I2C are way to small for the defaults xorg server sets. We set them to the VESA DDC specs values instead.
+
+commit 58176cc66bbf69bd235d6baaca31f9f3011d065a
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Wed Oct 3 22:38:18 2012 +0200
+
+    Biostar Viotech 3200+
+
+commit ad861dca0e505ed175aba0d3432c4993f322b8bf
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Fri Sep 14 14:47:08 2012 +0100
+
+    When setting a new video mode we were assuming the offset into the frame buffer was 0,0 which is not always the case
+
+commit db2b898d7280a451b1655a9e758f3fc9c9269b2c
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Sep 10 20:54:50 2012 +0200
+
+    Fix typo in registers description
+
+commit eee95bd967f452026bbd1379074c1ee0f83b2df3
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Tue Sep 4 22:43:37 2012 +0200
+
+    bump version to 0.3.1
+
+commit a8e7783856c1754e5c4a85045d7d536ceca40994
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Fri Aug 24 18:04:52 2012 +0200
+
+    Dell Optiplex FX130 (reported by Maciej Kazulak)
+
+commit 131175a7163a9189d70ed3118b45eaceb27898c0
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Sun Aug 5 11:10:27 2012 -0400
+
+    SCRN_INFO_PTR no longer works in new xorg servers when used from
+    inside the i2c layer. The work around is store the VGAHWPtr inside
+    the I2CBus DriverPrivate Union since the VGAHWPtr is what we really
+    want.
+
+commit 592fbd189bd0052b542eb6a351690042bcbee39e
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Jul 30 21:05:23 2012 +0200
+
+    Remove --(enable|disable)-dri configure option, it depends on whether the X server was built with or w/o DRI support.
+
+commit f5c1627ff0cbac097173e509f96f62b6021397ca
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Jul 30 21:03:42 2012 +0200
+
+    Lower libdrm requirement to 2.0
+
+commit b48ba7268e57bc65066d3a5b0d0e2d8f7a1c3999
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Mon Jul 23 23:35:31 2012 +0200
+
+    Simmtronics SIMM-PC VX900i (reported by Sagar Sawant)
+
+commit 1da9cf117cdc8ffb616da331a3e25f86ef40086a
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Fri Jul 20 23:50:46 2012 +0200
+
+    Tweak release date again
+
+commit fe33d114ec24465eeedcd35925586c65b8ef0af7
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Fri Jul 20 20:42:56 2012 +0200
+
+    Remove a couple unused variables
+
+commit ec885b6f4b8b19327c0e9834e4fb556eee691a3c
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Fri Jul 20 20:29:23 2012 +0200
+
+    Use bits description for Software Reset Control register
+
+commit 3b97a3f93388774f5dc38028e9939c04bd3b9f3d
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Fri Jul 20 12:17:01 2012 +0200
+
+    Install registers dumper tool in sbin rather than bin
+
+commit d2d898041e6c4bbc7c43d808d9a68b69afe2acc7
+Author: Xavier Bachelot <xavier@bachelot.org>
+Date:   Fri Jul 20 11:35:57 2012 +0200
+
+    Fix typo in bug tracker link
+
+commit 6a69631a66d1080a1305b15e25b1a581030acc28
+Author: James Simmons <jsimmons@infradead.org>
+Date:   Wed Jul 18 18:45:37 2012 -0400
+
+    Fixes for make distcheck to work
+
 commit 00e7b2f89669ce497c2284b80e7af562862b172f
 Author: Xavier Bachelot <xavier@bachelot.org>
 Date:   Wed Jul 18 00:22:30 2012 +0200
diff --git a/debian/changelog b/debian/changelog
index 0b3a142..74c1871 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-video-openchrome (1:0.3.1-1) UNRELEASED; urgency=low
+xserver-xorg-video-openchrome (1:0.3.3-1) UNRELEASED; urgency=low
 
   [ Maarten Lankhorst ]
   * Move to git.
@@ -10,6 +10,9 @@ xserver-xorg-video-openchrome (1:0.3.1-1) UNRELEASED; urgency=low
   * Remove 10-Deal-with-xserver-1.12.diff, not needed anymore.
   * control: Bump policy to 3.9.3, no changes.
 
+  [ Maarten Lankhorst ]
+  * New upstream release.
+
  -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Thu, 19 Jul 2012 10:41:21 +0200
 
 xserver-xorg-video-openchrome (1:0.2.906-1) unstable; urgency=low

commit 0c17f81ad43d42958ab3871c9b5c5e9cea402256
Author: Xavier Bachelot <xavier@bachelot.org>
Date:   Wed May 22 18:58:48 2013 +0200

    Bump version to 0.3.3

diff --git a/NEWS b/NEWS
index 917aea0..eb1b8f8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+openchrome 0.3.3 (23/05/2013)
+-----------------------------
+
+This is a bugfix release.
+- Fix integer overflow in libchromeXvMC (CVE-2013-1994).
+- Various bug fixes and improvements.
+
+
 openchrome 0.3.2 (27/03/2013)
 -----------------------------
 
diff --git a/configure.ac b/configure.ac
index 238e3af..b13cb2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.3.2],
+        [0.3.3],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 

commit db309e3cd87a1279e8b592a692390755c528de4f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 13 20:57:07 2013 -0700

    integer overflow in uniDRIGetClientDriverName() in libchromeXvMC* [CVE-2013-1994 2/2]
    
    clientDriverNameLength is a CARD32 and needs to be bounds checked before
    adding one to it to come up with the total size to allocate, to avoid
    integer overflow leading to underallocation and writing data from the
    network past the end of the allocated buffer.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/xvmc/xf86dri.c b/src/xvmc/xf86dri.c
index fba7583..c5702ec 100644
--- a/src/xvmc/xf86dri.c
+++ b/src/xvmc/xf86dri.c
@@ -314,8 +314,11 @@ uniDRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion,
     *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
 
     if (rep.length) {
-	if (!(*clientDriverName =
-		(char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) {
+	if (rep.clientDriverNameLength < INT_MAX)
+	    *clientDriverName = Xcalloc(rep.clientDriverNameLength + 1, 1);
+	else
+	    *clientDriverName = NULL;
+	if (*clientDriverName == NULL) {
 	    _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
 	    UnlockDisplay(dpy);
 	    SyncHandle();

commit 68bf50ce4903ec93da59cea78e063ed7c3882d3e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 13 20:49:43 2013 -0700

    integer overflow in uniDRIOpenConnection() in libchromeXvMC* [CVE-2013-1994 1/2]
    
    busIdStringLength is a CARD32 and needs to be bounds checked before adding
    one to it to come up with the total size to allocate, to avoid integer
    overflow leading to underallocation and writing data from the network past
    the end of the allocated buffer.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/xvmc/xf86dri.c b/src/xvmc/xf86dri.c
index 1feb232..fba7583 100644
--- a/src/xvmc/xf86dri.c
+++ b/src/xvmc/xf86dri.c
@@ -42,6 +42,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <X11/extensions/Xext.h>
 #include <X11/extensions/extutil.h>
 #include "xf86dristr.h"
+#include <limits.h>
 
 static XExtensionInfo _xf86dri_info_data;
 static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
@@ -203,7 +204,11 @@ uniDRIOpenConnection(dpy, screen, hSAREA, busIdString)
     }
 #endif
     if (rep.length) {
-	if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) {
+	if (rep.busIdStringLength < INT_MAX)
+	    *busIdString = Xcalloc(rep.busIdStringLength + 1, 1);
+	else
+	    *busIdString = NULL;
+	if (*busIdString == NULL) {
 	    _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
 	    UnlockDisplay(dpy);
 	    SyncHandle();

commit 50cef9490c6a128613c5b9f3f19ef2e803088983
Author: Xavier Bachelot <xavier@bachelot.org>
Date:   Tue May 21 21:24:41 2013 +0200

    Probe TV encoder on all but the P4M900, unless we know the board has a TV encoder.
    
    Probing the TV encoder on the P4M900 chipset family when there is no such encoder is not safe. It is safe however on all other platforms.

diff --git a/src/via_outputs.c b/src/via_outputs.c
index 7e0c5e4..1271fc8 100644
--- a/src/via_outputs.c
+++ b/src/via_outputs.c
@@ -885,7 +885,7 @@ ViaOutputsDetect(ScrnInfoPtr pScrn)
      * disables the panel on P4M900
      */
     /* TV encoder */
-    if (pVia->ActiveDevice & VIA_DEVICE_TV)
+    if ((pVia->Chipset != VIA_P4M900) || (pVia->ActiveDevice & VIA_DEVICE_TV))
         via_tv_init(pScrn);
 
     if (pVia->ActiveDevice & VIA_DEVICE_DFP) {

commit 79731f58281eb8782f8291a3d9375cb3f7691a13
Author: James Simmons <jsimmons@infradead.org>
Date:   Wed May 22 10:47:25 2013 -0400

    Our xorg driver has moved to using drm_fourcc.h but not all distros have a new enough libdrm so building can fail. We place a copy in our source tree to ensure building and this header doesn't change to often

diff --git a/src/Makefile.am b/src/Makefile.am
index 9bac9e9..7f67bed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -83,7 +83,8 @@ openchrome_drv_la_SOURCES += \
          via_kms.h \
          via_kms.c \
          via_xvmc.c \
-         via_xvmc.h
+         via_xvmc.h \
+         drm_fourcc.h
 else
 EXTRA_DIST += \
          via_dri.c \
@@ -93,7 +94,8 @@ EXTRA_DIST += \
          via_kms.h \
          via_kms.c \
          via_xvmc.c \
-         via_xvmc.h
+         via_xvmc.h \
+         drm_fourcc.h
 endif
 
 via_driver.lo: version.h
diff --git a/src/drm_fourcc.h b/src/drm_fourcc.h
new file mode 100644
index 0000000..85facb0
--- /dev/null
+++ b/src/drm_fourcc.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef DRM_FOURCC_H
+#define DRM_FOURCC_H
+
+#include <inttypes.h>
+
+#define fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
+			      ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
+
+#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
+
+/* color index */
+#define DRM_FORMAT_C8		fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
+
+/* 8 bpp RGB */
+#define DRM_FORMAT_RGB332	fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
+#define DRM_FORMAT_BGR233	fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */
+
+/* 16 bpp RGB */
+#define DRM_FORMAT_XRGB4444	fourcc_code('X', 'R', '1', '2') /* [15:0] x:R:G:B 4:4:4:4 little endian */
+#define DRM_FORMAT_XBGR4444	fourcc_code('X', 'B', '1', '2') /* [15:0] x:B:G:R 4:4:4:4 little endian */
+#define DRM_FORMAT_RGBX4444	fourcc_code('R', 'X', '1', '2') /* [15:0] R:G:B:x 4:4:4:4 little endian */
+#define DRM_FORMAT_BGRX4444	fourcc_code('B', 'X', '1', '2') /* [15:0] B:G:R:x 4:4:4:4 little endian */
+
+#define DRM_FORMAT_ARGB4444	fourcc_code('A', 'R', '1', '2') /* [15:0] A:R:G:B 4:4:4:4 little endian */
+#define DRM_FORMAT_ABGR4444	fourcc_code('A', 'B', '1', '2') /* [15:0] A:B:G:R 4:4:4:4 little endian */
+#define DRM_FORMAT_RGBA4444	fourcc_code('R', 'A', '1', '2') /* [15:0] R:G:B:A 4:4:4:4 little endian */
+#define DRM_FORMAT_BGRA4444	fourcc_code('B', 'A', '1', '2') /* [15:0] B:G:R:A 4:4:4:4 little endian */
+
+#define DRM_FORMAT_XRGB1555	fourcc_code('X', 'R', '1', '5') /* [15:0] x:R:G:B 1:5:5:5 little endian */
+#define DRM_FORMAT_XBGR1555	fourcc_code('X', 'B', '1', '5') /* [15:0] x:B:G:R 1:5:5:5 little endian */
+#define DRM_FORMAT_RGBX5551	fourcc_code('R', 'X', '1', '5') /* [15:0] R:G:B:x 5:5:5:1 little endian */
+#define DRM_FORMAT_BGRX5551	fourcc_code('B', 'X', '1', '5') /* [15:0] B:G:R:x 5:5:5:1 little endian */
+
+#define DRM_FORMAT_ARGB1555	fourcc_code('A', 'R', '1', '5') /* [15:0] A:R:G:B 1:5:5:5 little endian */
+#define DRM_FORMAT_ABGR1555	fourcc_code('A', 'B', '1', '5') /* [15:0] A:B:G:R 1:5:5:5 little endian */
+#define DRM_FORMAT_RGBA5551	fourcc_code('R', 'A', '1', '5') /* [15:0] R:G:B:A 5:5:5:1 little endian */
+#define DRM_FORMAT_BGRA5551	fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little endian */
+
+#define DRM_FORMAT_RGB565	fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */
+#define DRM_FORMAT_BGR565	fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */
+
+/* 24 bpp RGB */
+#define DRM_FORMAT_RGB888	fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */
+#define DRM_FORMAT_BGR888	fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */
+
+/* 32 bpp RGB */
+#define DRM_FORMAT_XRGB8888	fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */
+#define DRM_FORMAT_XBGR8888	fourcc_code('X', 'B', '2', '4') /* [31:0] x:B:G:R 8:8:8:8 little endian */
+#define DRM_FORMAT_RGBX8888	fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */
+#define DRM_FORMAT_BGRX8888	fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */
+
+#define DRM_FORMAT_ARGB8888	fourcc_code('A', 'R', '2', '4') /* [31:0] A:R:G:B 8:8:8:8 little endian */
+#define DRM_FORMAT_ABGR8888	fourcc_code('A', 'B', '2', '4') /* [31:0] A:B:G:R 8:8:8:8 little endian */
+#define DRM_FORMAT_RGBA8888	fourcc_code('R', 'A', '2', '4') /* [31:0] R:G:B:A 8:8:8:8 little endian */
+#define DRM_FORMAT_BGRA8888	fourcc_code('B', 'A', '2', '4') /* [31:0] B:G:R:A 8:8:8:8 little endian */
+
+#define DRM_FORMAT_XRGB2101010	fourcc_code('X', 'R', '3', '0') /* [31:0] x:R:G:B 2:10:10:10 little endian */
+#define DRM_FORMAT_XBGR2101010	fourcc_code('X', 'B', '3', '0') /* [31:0] x:B:G:R 2:10:10:10 little endian */
+#define DRM_FORMAT_RGBX1010102	fourcc_code('R', 'X', '3', '0') /* [31:0] R:G:B:x 10:10:10:2 little endian */
+#define DRM_FORMAT_BGRX1010102	fourcc_code('B', 'X', '3', '0') /* [31:0] B:G:R:x 10:10:10:2 little endian */
+
+#define DRM_FORMAT_ARGB2101010	fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */
+#define DRM_FORMAT_ABGR2101010	fourcc_code('A', 'B', '3', '0') /* [31:0] A:B:G:R 2:10:10:10 little endian */
+#define DRM_FORMAT_RGBA1010102	fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */
+#define DRM_FORMAT_BGRA1010102	fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */
+
+/* packed YCbCr */
+#define DRM_FORMAT_YUYV		fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */
+#define DRM_FORMAT_YVYU		fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */
+#define DRM_FORMAT_UYVY		fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */
+#define DRM_FORMAT_VYUY		fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
+
+#define DRM_FORMAT_AYUV		fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
+
+/*
+ * 2 plane YCbCr
+ * index 0 = Y plane, [7:0] Y
+ * index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian
+ * or
+ * index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian
+ */
+#define DRM_FORMAT_NV12		fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV21		fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */
+#define DRM_FORMAT_NV16		fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV61		fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
+
+/*
+ * 3 plane YCbCr
+ * index 0: Y plane, [7:0] Y
+ * index 1: Cb plane, [7:0] Cb
+ * index 2: Cr plane, [7:0] Cr
+ * or
+ * index 1: Cr plane, [7:0] Cr
+ * index 2: Cb plane, [7:0] Cb
+ */
+#define DRM_FORMAT_YUV410	fourcc_code('Y', 'U', 'V', '9') /* 4x4 subsampled Cb (1) and Cr (2) planes */
+#define DRM_FORMAT_YVU410	fourcc_code('Y', 'V', 'U', '9') /* 4x4 subsampled Cr (1) and Cb (2) planes */
+#define DRM_FORMAT_YUV411	fourcc_code('Y', 'U', '1', '1') /* 4x1 subsampled Cb (1) and Cr (2) planes */
+#define DRM_FORMAT_YVU411	fourcc_code('Y', 'V', '1', '1') /* 4x1 subsampled Cr (1) and Cb (2) planes */
+#define DRM_FORMAT_YUV420	fourcc_code('Y', 'U', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */
+#define DRM_FORMAT_YVU420	fourcc_code('Y', 'V', '1', '2') /* 2x2 subsampled Cr (1) and Cb (2) planes */
+#define DRM_FORMAT_YUV422	fourcc_code('Y', 'U', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes */
+#define DRM_FORMAT_YVU422	fourcc_code('Y', 'V', '1', '6') /* 2x1 subsampled Cr (1) and Cb (2) planes */
+#define DRM_FORMAT_YUV444	fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
+#define DRM_FORMAT_YVU444	fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
+
+#endif /* DRM_FOURCC_H */

commit a013a7deabc63dd76d3ae635e05c9da4a5fc321b
Author: James Simmons <jsimmons@infradead.org>
Date:   Mon May 20 18:13:24 2013 -0400

    Patch from Krummenacher <max.krummenacher@toradex.com>
    to fix via_lvds.c warning, char* compared to string literal
    
    gcc 4.7.2 issues a warning which make 'open suse build system' fail.
    via_lvds.c: In function 'via_lvds_detect':
    via_lvds.c:1305:26: warning: comparison with string literal results in unspecified behavior [-Waddress]

diff --git a/src/via_driver.c b/src/via_driver.c
index 1d3b78e..139a0c3 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -874,18 +874,25 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
         ret = xf86CrtcSetMode(crtc, &crtc->mode, crtc->rotation,
 	                          crtc->x, crtc->y);
         if (!ret) {
+            xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                "SetMode !ret so we reset front_bo\n");
             drmmode->front_bo = old_front;
             drmmode->fb_id = old_fb_id;
             break;
 #ifdef HAVE_DRI
         } else {
+            xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                "SetMode ret so we cleanup old front_bo\n");
             if (pVia->KMS && old_fb_id)
                 drmModeRmFB(drmmode->fd, old_fb_id);
 #endif
         }
     }
 
+
     if (ret) {
+        xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                   "More cleanup old front_bo\n");
         drm_bo_unmap(scrn, old_front);
         drm_bo_free(scrn, old_front);
         return ret;
diff --git a/src/via_lvds.c b/src/via_lvds.c
index e4e5cdf..0dcc64a 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -1295,6 +1295,7 @@ ViaPanelLookUpModeIndex(int width, int height)
 static xf86OutputStatus
 via_lvds_detect(xf86OutputPtr output)
 {
+    static const char xoId[] = "OLPC XO 1.5";
     xf86OutputStatus status = XF86OutputStatusDisconnected;
     ViaPanelInfoPtr panel = output->driver_private;
     ScrnInfoPtr pScrn = output->scrn;
@@ -1302,7 +1303,7 @@ via_lvds_detect(xf86OutputPtr output)
     vgaHWPtr hwp = VGAHWPTR(pScrn);
 
     /* Hardcode panel size for the XO */
-    if (pVia->Id->String == "OLPC XO 1.5") {
+    if(strcmp(pVia->Id->String, xoId) == 0) {
         panel->NativeWidth = 1200;
         panel->NativeHeight = 900;
         status = XF86OutputStatusConnected;

commit cee0a1fab9cade87e6de16c67cd34c84cf697531
Author: James Simmons <jsimmons@infradead.org>
Date:   Sun May 19 17:18:39 2013 -0400

    Fix the problems with UMS multiple screen handling. KMS still has problems

diff --git a/src/via_display.c b/src/via_display.c
index 82cd8b2..d9b6db5 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -470,8 +470,11 @@ ViaFirstCRTCSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
 }
 
 void
-ViaFirstCRTCSetStartingAddress(ScrnInfoPtr pScrn, int x, int y)
+ViaFirstCRTCSetStartingAddress(xf86CrtcPtr crtc, int x, int y)
 {
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+    drmmode_ptr drmmode = drmmode_crtc->drmmode;
+    ScrnInfoPtr pScrn = crtc->scrn;
     VIAPtr pVia = VIAPTR(pScrn);
     vgaHWPtr hwp = VGAHWPTR(pScrn);
     CARD32 Base;
@@ -479,7 +482,7 @@ ViaFirstCRTCSetStartingAddress(ScrnInfoPtr pScrn, int x, int y)
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaFirstCRTCSetStartingAddress\n"));
 
     Base = (y * pScrn->displayWidth + x) * (pScrn->bitsPerPixel / 8);
-    Base = (Base + pVia->drmmode.front_bo->offset) >> 1;
+    Base = (Base + drmmode->front_bo->offset) >> 1;
 
     hwp->writeCrtc(hwp, 0x0C, (Base & 0xFF00) >> 8);
     hwp->writeCrtc(hwp, 0x0D, Base & 0xFF);
@@ -491,14 +494,16 @@ ViaFirstCRTCSetStartingAddress(ScrnInfoPtr pScrn, int x, int y)
 }
 
 void
-ViaSecondCRTCSetStartingAddress(ScrnInfoPtr pScrn, int x, int y)
+ViaSecondCRTCSetStartingAddress(xf86CrtcPtr crtc, int x, int y)
 {
-    VIAPtr pVia = VIAPTR(pScrn);
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+    drmmode_ptr drmmode = drmmode_crtc->drmmode;
+    ScrnInfoPtr pScrn = crtc->scrn;
     vgaHWPtr hwp = VGAHWPTR(pScrn);
     CARD32 Base, tmp;
 
     Base = (y * pScrn->displayWidth + x) * (pScrn->bitsPerPixel / 8);
-    Base = (Base + pVia->drmmode.front_bo->offset) >> 3;
+    Base = (Base + drmmode->front_bo->offset) >> 3;
 
     tmp = hwp->readCrtc(hwp, 0x62) & 0x01;
     tmp |= (Base & 0x7F) << 1;
@@ -954,7 +959,7 @@ iga1_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
     if (pVia->pVbe) {
         ViaVbeAdjustFrame(pScrn, x, y);
     } else {
-        ViaFirstCRTCSetStartingAddress(pScrn, x, y);
+        ViaFirstCRTCSetStartingAddress(crtc, x, y);
     }
     VIAVidAdjustFrame(pScrn, x, y);
 }
@@ -1365,7 +1370,7 @@ iga2_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
     if (pVia->pVbe) {
         ViaVbeAdjustFrame(pScrn, x, y);
     } else {
-        ViaSecondCRTCSetStartingAddress(pScrn, x, y);
+        ViaSecondCRTCSetStartingAddress(crtc, x, y);
     }
     VIAVidAdjustFrame(pScrn, x, y);
 }
diff --git a/src/via_driver.c b/src/via_driver.c
index 52a5bea..1d3b78e 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -805,54 +805,44 @@ static Bool
 via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 {
     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-    drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[0]->driver_private;
+    struct buffer_object *old_front = NULL, *new_front = NULL;
     int old_width, old_height, old_dwidth, format;
-    drmmode_ptr drmmode = drmmode_crtc->drmmode;
-    int cpp = (scrn->bitsPerPixel + 7) >> 3;
-    struct buffer_object *old_front = NULL;
+    int cpp = (scrn->bitsPerPixel + 7) >> 3, i;
     ScreenPtr screen = scrn->pScreen;
     VIAPtr pVia = VIAPTR(scrn);
     void *new_pixels = NULL;
     uint32_t old_fb_id;
+    Bool ret = FALSE;
     PixmapPtr ppix;
 
     if (scrn->virtualX == width && scrn->virtualY == height)
         return TRUE;
 
-    old_width = scrn->virtualX;
-    old_height = scrn->virtualY;
-    old_dwidth = scrn->displayWidth;
-    old_fb_id = drmmode->fb_id;
-    old_front = drmmode->front_bo;
-
     format = map_legacy_formats(scrn->bitsPerPixel, scrn->depth);
-    drmmode->front_bo = drm_bo_alloc_surface(scrn, width, height, format,
+    new_front = drm_bo_alloc_surface(scrn, width, height, format,
                                             16, TTM_PL_FLAG_VRAM);
-    if (!drmmode->front_bo)
+    if (!new_front)
         goto fail;
 
     xf86DrvMsg(scrn->scrnIndex, X_INFO,
                 "Allocate new frame buffer %dx%d stride %d\n",
-                width, height, drmmode->front_bo->pitch);
+                width, height, new_front->pitch);
 
-    new_pixels = drm_bo_map(scrn, drmmode->front_bo);
+    new_pixels = drm_bo_map(scrn, new_front);
     if (!new_pixels)
         goto fail;
 
     if (pVia->shadowFB) {
-        new_pixels = malloc(height * drmmode->front_bo->pitch);
+        new_pixels = malloc(height * new_front->pitch);
         if (!new_pixels)
             goto fail;
         free(pVia->ShadowPtr);
         pVia->ShadowPtr = new_pixels;
     }
-    scrn->virtualX = width;
-    scrn->virtualY = height;
-    scrn->displayWidth = drmmode->front_bo->pitch / cpp;
 
     ppix = screen->GetScreenPixmap(screen);
     if (!screen->ModifyPixmapHeader(ppix, width, height, -1, -1,
-                                    drmmode->front_bo->pitch,
+                                    new_front->pitch,


Reply to: