Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 14 Dec 2007 04:04 AM by  rbunce
LCD timeout
 7 Replies
Sort:
You are not authorized to post a reply.
Author Messages
rbunce
New Member
New Member
Posts:


--
27 Nov 2007 07:53 AM
    Thanks to the various contributors, I now have linux up and running on the i.MX31 Zoom Litekit.

    One small problem is that the LCD goes blank after a few minutes of operation. I assume it is a power save timeout but I can't track down where to change the timeout period, or disable it. I would appreciate any ideas about where to look.

    I am using 2.6.19 with the various patches listed in this discussion group, and apart from the timeout the LCD works well.

    Thanks in advance,
    Roy
    jonathankaufmann@gmail.com
    New Member
    New Member
    Posts:


    --
    29 Nov 2007 07:43 AM
    There is a function in mxcfb.c somewhere that has something to do with blanking. You can't comment out the whole thing b/c that function is also responsible for unblanking (i.e turning on) the screen initially. I just fixed this yesterday.

    Its the function that goes along w/ the .blank function in the driver structure. So somewhere there is something like...

    Quote:

    struct fb_ops mxc_fbstructure {
    .open = some_function
    .close = some_other_function
    .blank = the_blanking_function
    };


    Let me know if you need more info and when I get to work I can give actual function names and such.
    jonathankaufmann@gmail.com
    New Member
    New Member
    Posts:


    --
    29 Nov 2007 07:49 AM
    If you plug in a USB keyboard, the second you press a key the screen unblanks. Perhaps this is done in some user-land code, or maybe the keyboard driver sends the UNBLANK command.

    If you want to do it the right way so you can have control over when to turn on and off the screen, I suggest you trace down calls to the blanking function and find out how to turn it off and on in your own code.

    For my application, power is not a concern, and there is no real need to ever turn off the screen when the device is running, so I just commented out the BLANKING sections so that it effectively ignores the calls.
    rbunce
    New Member
    New Member
    Posts:


    --
    30 Nov 2007 05:11 AM
    Thanks for the advice. I've had a quick look at the code and it seems to be the cause of the problem.

    As is often the case I've been temporarily diverted to another project, but when I get back to the iMX31 I'm fairly certain that I can fix it now, by adding a periodic "wakeup" to the app.
    arjun.kv@7lf-tech.com
    New Member
    New Member
    Posts:


    --
    12 Dec 2007 05:43 AM
    I am getting the same problem, that LCD times out exactly around 12/13 mins. I tried to disable hsync and vsync powersaves and also power management suspend. Still the LCD times out.

    Even
    # setterm -blank 0
    did not work.

    By the way i did not find a structure like

    in
    Quote:

    struct fb_ops mxc_fbstructure {
    .open = some_function
    .close = some_other_function
    .blank = the_blanking_function
    };


    in the mxcfb file.

    Though there is a similar structure like below.


    static struct fb_ops mxcfb_ops = {
    .owner = THIS_MODULE,
    .fb_set_par = mxcfb_set_par,
    .fb_check_var = mxcfb_check_var,
    .fb_setcolreg = mxcfb_setcolreg,
    .fb_pan_display = mxcfb_pan_display,
    .fb_ioctl = mxcfb_ioctl,
    .fb_fillrect = cfb_fillrect,
    .fb_copyarea = cfb_copyarea,
    .fb_imageblit = cfb_imageblit,
    .fb_blank = mxcfb_blank,
    // .fb_cursor = soft_cursor,
    };



    Commented out the fb_blank part and as you mentioned i get a blank display.

    It would be nice if you could post more info on this.

    Thanks
    Arjun
    arjun.kv@7lf-tech.com
    New Member
    New Member
    Posts:


    --
    12 Dec 2007 07:08 AM
    Never mind.. Just commented out a part of the blanking function and now works fine.

    Arjun
    jonathankaufmann@gmail.com
    New Member
    New Member
    Posts:


    --
    13 Dec 2007 11:05 AM
    Ya, when I posted that, I was at home and just guessing at the structure name and members from what I had done previously that day. The
    Quote:

    .fb_blank = mxcfb_blank,

    line is the correct one, which leads you to the mxcfb_blank function. From there, commenting out the part dealing w/ blanking the screen is easy enough. If you comment out the whole function, then the screen will never "UNBLANK" or in other words, it will never turn on... which you saw.

    Does anyone know the "proper" way to prevent blanking of the screen? Arjun mentioned
    Quote:
    setterm -blank 0
    Is there some program or sample userspace code that will do this so we don't have to essentially remove the feature from the kernel?
    rbunce
    New Member
    New Member
    Posts:


    --
    14 Dec 2007 04:04 AM
    Just got back to this problem after the usual diversion to other more "important" matters.....

    Adding the code
    if (ioctl(fbfd, FBIOBLANK, FB_BLANK_UNBLANK))
    {
    printf("Error unblanking\n");
    }

    (or something similar) into the application wakes the display up again, but I'm still working on it so this may not be the full answer.

    Roy
    You are not authorized to post a reply.