[haiku-commits] r33865 - in haiku/trunk/src/add-ons: accelerants/matrox accelerants/matrox/engine kernel/drivers/graphics/matrox

  • From: rudolf.cornelissen@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 2 Nov 2009 20:27:16 +0100 (CET)

Author: rudolfc
Date: 2009-11-02 20:27:15 +0100 (Mon, 02 Nov 2009)
New Revision: 33865
Changeset: http://dev.haiku-os.org/changeset/33865/haiku

Modified:
   haiku/trunk/src/add-ons/accelerants/matrox/Overlay.c
   haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_bes.c
   haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_general.c
   haiku/trunk/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html
Log:
matrox G450/G550 (apparantly) can do HDTV overlay (720p, 1080p). Bumped version 
to 0.33.

Modified: haiku/trunk/src/add-ons/accelerants/matrox/Overlay.c
===================================================================
--- haiku/trunk/src/add-ons/accelerants/matrox/Overlay.c        2009-11-02 
19:23:18 UTC (rev 33864)
+++ haiku/trunk/src/add-ons/accelerants/matrox/Overlay.c        2009-11-02 
19:27:15 UTC (rev 33865)
@@ -1,4 +1,4 @@
-/* Written by Rudolf Cornelissen 05-2002/4-2006 */
+/* Written by Rudolf Cornelissen 05-2002/11-2009 */
 
 /* Note on 'missing features' in BeOS 5.0.3 and DANO:
  * BeOS needs to define more colorspaces! It would be nice if BeOS would 
support the FourCC 'definitions'
@@ -175,24 +175,44 @@
                }
 
                /* check if the requested buffer width is supported */
-               if (si->overlay.myBuffer[offset].width > 1024)
-               {
-                       LOG(4,("Overlay: Sorry, requested buffer width not 
supported, aborted\n"));
+               if (si->ps.card_type < G450) {
+                       if (si->overlay.myBuffer[offset].width > 1024) {
+                               LOG(4,("Overlay: Sorry, requested buffer width 
not supported, aborted\n"));
 
-                       /* release the shared benaphore */
-                       RELEASE_BEN(si->overlay.lock)
+                               /* release the shared benaphore */
+                               RELEASE_BEN(si->overlay.lock)
 
-                       return NULL;
-               }
-               /* check if the requested buffer height is supported */
-               if (height > 1024)
-               {
-                       LOG(4,("Overlay: Sorry, requested buffer height not 
supported, aborted\n"));
+                               return NULL;
+                       }
 
-                       /* release the shared benaphore */
-                       RELEASE_BEN(si->overlay.lock)
+                       /* check if the requested buffer height is supported */
+                       if (height > 1024) {
+                               LOG(4,("Overlay: Sorry, requested buffer height 
not supported, aborted\n"));
 
-                       return NULL;
+                               /* release the shared benaphore */
+                               RELEASE_BEN(si->overlay.lock)
+
+                               return NULL;
+                       }
+               } else {
+                       if (si->overlay.myBuffer[offset].width > 1920) {
+                               LOG(4,("Overlay: Sorry, requested buffer width 
not supported, aborted\n"));
+
+                               /* release the shared benaphore */
+                               RELEASE_BEN(si->overlay.lock)
+
+                               return NULL;
+                       }
+
+                       /* check if the requested buffer height is supported */
+                       if (height > 1080) {
+                               LOG(4,("Overlay: Sorry, requested buffer height 
not supported, aborted\n"));
+
+                               /* release the shared benaphore */
+                               RELEASE_BEN(si->overlay.lock)
+
+                               return NULL;
+                       }
                }
 
                /* store slopspace (in pixels) for each bitmap for use by 
'overlay unit' (BES) */

Modified: haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_bes.c
===================================================================
--- haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_bes.c 2009-11-02 
19:23:18 UTC (rev 33864)
+++ haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_bes.c 2009-11-02 
19:27:15 UTC (rev 33865)
@@ -1,5 +1,5 @@
 /* G200-G550 Back End Scaler functions */
-/* Written by Rudolf Cornelissen 05/2002-12/2005 */
+/* Written by Rudolf Cornelissen 05/2002-11/2009 */
 
 #define MODULE_BIT 0x00000200
 
@@ -207,7 +207,7 @@
        /* take zoom into account */
        moi->hsrcstv += ((uint32)si->overlay.my_ov.h_start) << 16;
        /* AND below required by hardware */
-       moi->hsrcstv &= 0x03fffffc;
+       moi->hsrcstv &= 0x07fffffc;
        LOG(4,("Overlay: first hor. (sub)pixel of input bitmap contributing 
%f\n", moi->hsrcstv / (float)65536));
 
        /* Setup horizontal source end: last (sub)pixel contributing to output 
picture */
@@ -247,7 +247,7 @@
                moi->hsrcendv = (((uint32)((si->overlay.my_ov.h_start + 
si->overlay.my_ov.width) - 1)) << 16);
        }
        /* AND below required by hardware */
-       moi->hsrcendv &= 0x03fffffc;
+       moi->hsrcendv &= 0x07fffffc;
        LOG(4,("Overlay: last horizontal (sub)pixel of input bitmap 
contributing %f\n", moi->hsrcendv / (float)65536));
 
 
@@ -581,13 +581,13 @@
         * this is the last pixel that will be used for calculating 
interpolated pixels */
        hsrclstv = ((ob->width - 1) - si->overlay.myBufInfo[offset].slopspace) 
<< 16; 
        /* AND below required by hardware */
-       hsrclstv &= 0x03ff0000;
+       hsrclstv &= 0x07ff0000;
 
        /* setup field 1 (is our complete frame) vertical source last position.
         * this is the last pixel that will be used for calculating 
interpolated pixels */
        v1srclstv = (ob->height - 1);
        /* AND below required by hardware */
-       v1srclstv &= 0x000003ff;
+       v1srclstv &= 0x000007ff;
 
 
        /*****************************
@@ -670,13 +670,10 @@
                LOG(6,("Overlay: using horizontal dropping or replication on 
scaling\n"));
        }
        /* enable vertical filtering on scaling if asked for: if we are 
*upscaling* only */
-       if ((ow->flags & B_OVERLAY_VERTICAL_FILTERING) && (viscalv < (0x01 << 
16)))
-       {
+       if ((ow->flags & B_OVERLAY_VERTICAL_FILTERING) && (viscalv < (0x01 << 
16)) && (ob->width <= 1024))      {
                ctlv |= 1 << 11;
                LOG(6,("Overlay: using vertical interpolation on scaling\n"));
-       }
-       else
-       {
+       } else {
                ctlv |= 0 << 11;
                LOG(6,("Overlay: using vertical dropping or replication on 
scaling\n"));
        }

Modified: haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_general.c
===================================================================
--- haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_general.c     
2009-11-02 19:23:18 UTC (rev 33864)
+++ haiku/trunk/src/add-ons/accelerants/matrox/engine/mga_general.c     
2009-11-02 19:27:15 UTC (rev 33865)
@@ -54,7 +54,7 @@
        status_t status;
        uint8 card_class;
 
-       LOG(1,("POWERUP: Haiku Matrox Accelerant 0.32 running.\n"));
+       LOG(1,("POWERUP: Haiku Matrox Accelerant 0.33 running.\n"));
 
        /* log VBLANK INT usability status */
        if (si->ps.int_assigned)

Modified: haiku/trunk/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html  
2009-11-02 19:23:18 UTC (rev 33864)
+++ haiku/trunk/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html  
2009-11-02 19:27:15 UTC (rev 33865)
@@ -4,7 +4,7 @@
 </head>
 <body>
 <p><h2>Changes done for each driverversion:</h2></p>
-<p><h1>head (svn 0.32, Rudolf)</h1></p>
+<p><h1>head (svn 0.33, Rudolf)</h1></p>
 <ul>
 <li><strong>G100-G200:</strong>
 <ul>
@@ -20,6 +20,10 @@
 <ul>
 <li>Coldstarting now works on more cards: fixed RAM reset trouble so RAM 
access now works (no more ghosting on the screen).
 </ul>
+<li><strong>G450-G550:</strong>
+<ul>
+<li>Hardware overlay now also works for HDTV video (720p, 1080p).
+</ul>
 <li><strong>General:</strong>
 <ul>
 <li>Hook GET_ACCELERANT_DEVICE_INFO now returns more detailed info about the 
card in use;


Other related posts:

  • » [haiku-commits] r33865 - in haiku/trunk/src/add-ons: accelerants/matrox accelerants/matrox/engine kernel/drivers/graphics/matrox - rudolf . cornelissen