From: Anatolij Gustschin <agust@denx.de>
To: ??? <liuxs226@gmail.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: system call ioctl() problem
Date: Wed, 26 Mar 2008 13:04:41 +0100 [thread overview]
Message-ID: <47EA3BD9.2090308@denx.de> (raw)
In-Reply-To: <e81b2fb40803260313i14fe5a6dmc21513180466c454@mail.gmail.com>
Hello,
??? wrote:
> hi,all
> Here is a question I didn't make out, i wonder if anybody can figure
> it out. My platform is mpc8540 with graphics chip Fujitsu MB86296, my
> kernel version is 2.6.12.6 <http://2.6.12.6>. I'm about to write a
> gfxdriver so DirectFB can call this gfxdriver to make MB86296 do some
> drawing things. I wrote a program to test if the MB86296 drawing
> registers can be read and written. here is some part of the pragram:
[snip]
> ioctl(3, 0x20004d2f, 0x7fe47914) = -1 EINVAL (Invalid argument)
> write(1, "ioctlReadRes[0]=484,ioctlReadRes"...,
> 45ioctlReadRes[0]=484,ioctlReadRes[1]=30026f58
> ) = 45
> munmap(0x32028000, 4096) = 0
> exit_group(45) = ?
>
>
> from above, I think the problem is in ioctl call, which shows "EINVAL
> (Invalid argument)", so I added printk() to xx_ioctl() in fb driver, and
> it showed xx_ioctl() was not called .Then I checked xx_ioctl() was
> right. where is my problem? how to call ioctl() right??
probably, your problem is missing mb86290-driver specific ioctl
hook in the "mb86290fb_ops" structure definition in
drivers/video/mb86290/mb86290fb.c.
Ensure that this structure definition contains something like this:
.fb_ioctl = mb86290fb_ioctl,
Without this assignment only generic framebuffer ioctl will be called,
maybe therefore you can not see driver specific ioctl call. Generic
ioctl "doesn't understand" FBIO_MB86290_READ_DRAW_REG argument and
simply returns -EINVAL.
Best regards,
Anatolij
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
prev parent reply other threads:[~2008-03-26 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-26 10:13 system call ioctl() problem 刘小双
2008-03-26 12:04 ` Anatolij Gustschin [this message]
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=47EA3BD9.2090308@denx.de \
--to=agust@denx.de \
--cc=linuxppc-embedded@ozlabs.org \
--cc=liuxs226@gmail.com \
/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).