<div>hi,all</div>
<div> </div>
<div>has anyone written gfxdriver for graphic controller mb86296?? I have a problem when I'm writing the gfxdriver that refered to gfxdriver for sm501. I want to enable the gfxdriver drawing line and filling rectangle and so on .After finishing the gfxdriver, I run a test program to see if the gfxdriver could draw a line in the center of the screen and fill a black rectangle as background, I find there is nothing in display screen where there should be a line in the center of the screen. here is some part of my gfxdriver code about line and rectangle:</div>
<div> </div>
<div>//draw line with with given coordinate point and color</div>
<div>void de_line(int x1,int y1,int x2,int y2,int c)<br>{<br> <br> MB86290WriteFifo(4, (GDC_TYPE_SETCOLORREGISTER << 24) | (GDC_CMD_BODY_FORE_COLOR << 16), c,<br> (GDC_TYPE_SETMODEREGISTER << 24) | (GDC_CMD_MDR1 << 16), (2 << 7));<br>
<br> long cmd2 = (GDC_TYPE_DRAWLINE2I << 24) | 1;</div>
<div>
<p> MB86290WriteFifo(6, GDC_TYPE_DRAWLINE2I << 24, x1 << 16, y1 << 16,<br> cmd2, x2 << 16, y2 << 16);<br> <br>}</p>
<p>// fill rectangle with given coordinate point and color</p>
<p>void de_fillrect(int x1,int y1,int x2,int y2,int c)<br>{<br>int DeltaX;<br>int DeltaY;</p>
<p> // Determine delta X<br> if (x2 < x1) {<br> DeltaX = x1 - x2 + 1;<br> x1 = x2;<br> }<br> else {<br> DeltaX = x2 - x1 + 1;<br> }</p>
<p> // Determine delta Y<br> if (y2 <y1) {<br> DeltaY = y1 - y2 + 1;<br> y1 = y2;<br> }<br> else {<br> DeltaY = y2 - y1 + 1;<br> }</p>
<p> MB86290WriteFifo(2,(GDC_TYPE_SETCOLORREGISTER << 24) | (GDC_CMD_BODY_FORE_COLOR << 16),c);<br> MB86290WriteFifo(3,(GDC_TYPE_DRAWRECTP << 24) | (GDC_CMD_BLT_FILL << 16),(y1 << 16)|x1,(DeltaY<<16)|DeltaX);<br>
<br>}</p>
<p>Thanks,</p>
<p>Xiaoshuang Liu<br></p><br> </div>