AnsweredAssumed Answered

Restrict kernel display driver or Android OS to use only a part of display pixels / resolution

Question asked by DiegoFSL on Nov 8, 2013
Latest reply on Mar 30, 2017 by DiegoFSL

Hello everybody.


I've got an i.MX6SL EVK with a "MXIMX28LCD Seiko 4.3" WVGA" display running Android 4.3 beta BSP (jb4.3_1.0.0-beta). The system is working fine at native 800x480 display resolution.


My target now is to use a resolution of 240x240 on that display (so using just a subarea), so that we can design properly applications for a 240x240 display we will be using in the future, but is not ready yet at the moment.


I've tried both the "display driver way" and the "Android OS drawing way", but I haven't reached my target yet.



I've looked at the sources drivers/video/mxc/mxc_elcdif_fb.c and drivers/video/mxc/mxcfb_seiko_wvga.c in the kernel and I've found that the 800x480 is selected by the call:

fb_find_mode(&fbi->var, fbi, fb_mode, pdata->mode, pdata->num_modes, NULL, default_bpp);

at line 1438 of mxc_elcdif_fb.c:

linux-2.6-imx.git - Freescale i.MX Linux Tree

pdata->num_modes, NULL, default_bpp);

which I think is the one reported in:


But I'm not sure what's the best way to modify the source to have 240x240. I've tried following but I don't know if I can apply it for using just 240x240 of a 800x480 display.



In this case I've tried modifying method mapFrameBufferWithFbid of hardware/imx/mx6/libgralloc_wrapper/framebuffer.cpp but I got only a full white display by forcing:

info.xres = 240;

info.yres = 240;


I'd really appreciate any help to achieve this hack.