<div>hi,all</div>
<div>&nbsp;</div>
<div>has anyone written gfxdriver for graphic controller mb86296??&nbsp; I have a problem when I&#39;m writing the gfxdriver that refered to gfxdriver for sm501.&nbsp;I want to enable the gfxdriver drawing line and filling rectangle and so on .After finishing the gfxdriver, I run a&nbsp;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&nbsp;be a line in&nbsp;the center of the screen. here is some part of my gfxdriver code about line and rectangle:</div>

<div>&nbsp;</div>
<div>//draw line with with given coordinate point and color</div>
<div>void&nbsp;de_line(int x1,int y1,int x2,int y2,int c)<br>{<br>&nbsp;&nbsp;<br>&nbsp;MB86290WriteFifo(4, (GDC_TYPE_SETCOLORREGISTER &lt;&lt; 24) | (GDC_CMD_BODY_FORE_COLOR &lt;&lt; 16), c,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (GDC_TYPE_SETMODEREGISTER &lt;&lt; 24) | (GDC_CMD_MDR1 &lt;&lt; 16), (2 &lt;&lt; 7));<br>
&nbsp;<br>&nbsp;long cmd2 = (GDC_TYPE_DRAWLINE2I &lt;&lt; 24) | 1;</div>
<div>
<p>&nbsp;&nbsp;&nbsp; MB86290WriteFifo(6, GDC_TYPE_DRAWLINE2I &lt;&lt; 24, x1 &lt;&lt; 16, y1 &lt;&lt; 16,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd2, x2 &lt;&lt; 16, y2 &lt;&lt; 16);<br>&nbsp;&nbsp;<br>}</p>
<p>// fill rectangle with given coordinate point and color</p>
<p>void&nbsp;de_fillrect(int x1,int y1,int x2,int y2,int c)<br>{<br>int&nbsp;DeltaX;<br>int&nbsp;DeltaY;</p>
<p>&nbsp;// Determine delta X<br>&nbsp;if (x2 &lt; x1) {<br>&nbsp;&nbsp;DeltaX = x1 - x2 + 1;<br>&nbsp;&nbsp;x1 = x2;<br>&nbsp;}<br>&nbsp;else {<br>&nbsp;&nbsp;DeltaX = x2 - x1 + 1;<br>&nbsp;}</p>
<p>&nbsp;// Determine delta Y<br>&nbsp;if (y2 &lt;y1) {<br>&nbsp;&nbsp;DeltaY = y1 - y2 + 1;<br>&nbsp;&nbsp;y1 = y2;<br>&nbsp;}<br>&nbsp;else {<br>&nbsp;&nbsp;DeltaY = y2 - y1 + 1;<br>&nbsp;}</p>
<p>&nbsp;MB86290WriteFifo(2,(GDC_TYPE_SETCOLORREGISTER &lt;&lt; 24) | (GDC_CMD_BODY_FORE_COLOR &lt;&lt; 16),c);<br>&nbsp;MB86290WriteFifo(3,(GDC_TYPE_DRAWRECTP &lt;&lt; 24) | (GDC_CMD_BLT_FILL &lt;&lt; 16),(y1 &lt;&lt; 16)|x1,(DeltaY&lt;&lt;16)|DeltaX);<br>
<br>}</p>
<p>Thanks,</p>
<p>Xiaoshuang Liu<br></p><br>&nbsp;</div>