linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: 刘小双 <liuxs226@gmail.com>
To: directfb-dev@directfb.org, linuxppc <linuxppc-embedded@ozlabs.org>
Subject: has anyone written gfxdriver for graphic controller mb86296??
Date: Fri, 4 Apr 2008 09:55:41 +0800	[thread overview]
Message-ID: <e81b2fb40804031855i6a9db808y365066c858079113@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

hi,all

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:

//draw line with with given coordinate point and color
void de_line(int x1,int y1,int x2,int y2,int c)
{

 MB86290WriteFifo(4, (GDC_TYPE_SETCOLORREGISTER << 24) |
(GDC_CMD_BODY_FORE_COLOR << 16), c,
                         (GDC_TYPE_SETMODEREGISTER << 24) | (GDC_CMD_MDR1 <<
16), (2 << 7));

 long cmd2 = (GDC_TYPE_DRAWLINE2I << 24) | 1;

    MB86290WriteFifo(6, GDC_TYPE_DRAWLINE2I << 24, x1 << 16, y1 << 16,
                         cmd2, x2 << 16, y2 << 16);

}

// fill rectangle with given coordinate point and color

void de_fillrect(int x1,int y1,int x2,int y2,int c)
{
int DeltaX;
int DeltaY;

 // Determine delta X
 if (x2 < x1) {
  DeltaX = x1 - x2 + 1;
  x1 = x2;
 }
 else {
  DeltaX = x2 - x1 + 1;
 }

 // Determine delta Y
 if (y2 <y1) {
  DeltaY = y1 - y2 + 1;
  y1 = y2;
 }
 else {
  DeltaY = y2 - y1 + 1;
 }

 MB86290WriteFifo(2,(GDC_TYPE_SETCOLORREGISTER << 24) |
(GDC_CMD_BODY_FORE_COLOR << 16),c);
 MB86290WriteFifo(3,(GDC_TYPE_DRAWRECTP << 24) | (GDC_CMD_BLT_FILL <<
16),(y1 << 16)|x1,(DeltaY<<16)|DeltaX);

}

Thanks,

Xiaoshuang Liu

[-- Attachment #2: Type: text/html, Size: 2433 bytes --]

                 reply	other threads:[~2008-04-04  1:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=e81b2fb40804031855i6a9db808y365066c858079113@mail.gmail.com \
    --to=liuxs226@gmail.com \
    --cc=directfb-dev@directfb.org \
    --cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).