Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Andrew Randrianasulu <randrik_a@yahoo.com>
To: linux-mips@linux-mips.org
Subject: [PATCH] 0002-sgi-o2-gbe-mte-init.diff
Date: Thu, 30 Apr 2009 12:55:20 -0700 (PDT)	[thread overview]
Message-ID: <309181.52579.qm@web59814.mail.ac4.yahoo.com> (raw)


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



      

             reply	other threads:[~2009-04-30 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30 19:55 Andrew Randrianasulu [this message]
2009-04-30 20:21 ` [PATCH] 0002-sgi-o2-gbe-mte-init.diff David Daney
2009-04-30 20:43   ` Andrew Randrianasulu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=309181.52579.qm@web59814.mail.ac4.yahoo.com \
    --to=randrik_a@yahoo.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox