linux-mips
[Top] [All Lists]

[PATCH] 0002-sgi-o2-gbe-mte-init.diff

To: linux-mips@linux-mips.org
Subject: [PATCH] 0002-sgi-o2-gbe-mte-init.diff
From: Andrew Randrianasulu <randrik_a@yahoo.com>
Date: Thu, 30 Apr 2009 12:55:20 -0700 (PDT)
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1241121321; bh=2Bt7nDxwhyubyqS/GFJwEREwzJ6M3fSjvMUOxBlBwec=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=L94yUyQTmUWkqyjHjcvGBylADVjDlk1tqXXjg2hQbSx+UOZXjlzW1QBSNXP72Nf2X0bfANOeqFnqSuO0yXVmO6GeQE1frvK8xf1Mye/pJhobaU41H9Z3Qkhez1ivk+KWbiLe6TcWqHiRvO/6Gqty1c0uQ+z+xQNd8q0pvbZReJ8=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=l5PMaO5Dp4L2YFF6HW0iecUN7c9I+51Uf3OvD1lbEUPC7VMcdy7JT5WuA1w+WWO91bqPd3eH4wDnwP5Hrmvei+D/t4r/Lhyz/wkFQCjy8YueWFq4/3vfc0WDX/wfvVlKKFKVK8MjNKju1OsuE5TaPRhcyRacJcyeGoTiD/AHJsM=;
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: randrik_a@yahoo.com
Sender: linux-mips-bounce@linux-mips.org
Very simple test patch, broke nothing for me.

diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index ed732a8..1d3b599 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -31,6 +31,7 @@
 #include <asm/tlbflush.h>
 
 #include <video/gbe.h>
+#include <video/crmfbreg.h>
 
 static struct sgi_gbe *gbe;
 
@@ -651,6 +652,7 @@ static void gbe_set_timing_info(struct gbe_timing_info 
*timing)
 static int gbefb_set_par(struct fb_info *info)
 {
        int i;
+       unsigned int mte_current_mode; /* temporary  */
        unsigned int val;
        int wholeTilesX, partTilesX, maxPixelsPerTileX;
        int height_pix;
@@ -695,6 +697,16 @@ static int gbefb_set_par(struct fb_info *info)
        /* Initialize interrupts */
        gbe->sgi_gbe_vt.vt_intr01 = 0xffffffff;
        gbe->sgi_gbe_vt.vt_intr23 = 0xffffffff;
+       
+       /* Initialize MTE */
+       mte_current_mode = MTE_MODE_DST_ECC | 
+                           (MTE_TLB_A << MTE_DST_TLB_SHIFT) |
+                           (MTE_TLB_A << MTE_SRC_TLB_SHIFT) |
+                           (MTE_DEPTH_8 << MTE_DEPTH_SHIFT) |
+                           MTE_MODE_COPY; 
+       gbe->sgi_crm_mte.crm_mte_mode =  mte_current_mode;
+       gbe->sgi_crm_mte.crm_mte_dst_y_step = 1;
+       gbe->sgi_crm_mte.crm_mte_src_y_step = 1;
 
        /* HACK:
           The GBE hardware uses a tiled memory to screen mapping. Tiles are



      


<Prev in Thread] Current Thread [Next in Thread>