How to Change resolution of drawing device?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to Change resolution of drawing device?

跳至解决方案
2,123 次查看
rakeshmanad
Contributor I

I'm using IMX6Q board(android R13.3) with ICS 4.0.4 .

In which API resolution of drawing device is set ?

While drawing something on screen which API is responsible for managing resolution and location of different surfaces ? For example assume a app needs both a 2D and a 3D surface.which API is responsible to set location of these surfaces on screen and resolution of these two surfaces ?


And also xres and yres values ,which are used in framebuffer.cpp .Where their values get assigned ?


I know that android HAL layer(gralloc.cpp,framebuffer.cpp) call IOCTLs to get frame buffer data from display driver(Framebuffer driver).But I'm not finding in which API  framebuffer data will be collected?(I mean where the members of structure fb_var_screeninfo i.e xres,yres etc will get assigned with some values)

标签 (2)
0 项奖励
回复
1 解答
1,492 次查看
jeffreychen
Contributor I

I happen to have the same problem as you (My board is MX6Q SABRESD, and use the LVDS interface for LCD), after reviewing the code, I find there is a variable in ldb.c like:

static struct fb_videomode ldb_modedb[] = {

{

  "LDB-XGA", 60, 800, 480, 15385,//"LDB-XGA", 60, 1024, 768, 15385,

  220, 40,

  21, 7,

  60, 10,

  0,

  FB_VMODE_NONINTERLACED,

  FB_MODE_IS_DETAILED,},

{

  "LDB-1080P60", 60, 1920, 1080, 7692,

  100, 40,

  30, 3,

  10, 2,

  0,

  FB_VMODE_NONINTERLACED,

  FB_MODE_IS_DETAILED,},

};

It takes effect by following steps:

mxcfb_init()->mxcfb_dispdrv_init()->ldb_disp_init():

/* must use spec video mode defined by driver */

ret = fb_find_mode(&setting->fbi->var, setting->fbi, setting->dft_mode_str,

    ldb_modedb, ldb_modedb_sz, NULL, setting->default_bpp);

if (ret != 1)

  fb_videomode_to_var(&setting->fbi->var, &ldb_modedb[0]);

Hope this information is helpful for you.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,493 次查看
jeffreychen
Contributor I

I happen to have the same problem as you (My board is MX6Q SABRESD, and use the LVDS interface for LCD), after reviewing the code, I find there is a variable in ldb.c like:

static struct fb_videomode ldb_modedb[] = {

{

  "LDB-XGA", 60, 800, 480, 15385,//"LDB-XGA", 60, 1024, 768, 15385,

  220, 40,

  21, 7,

  60, 10,

  0,

  FB_VMODE_NONINTERLACED,

  FB_MODE_IS_DETAILED,},

{

  "LDB-1080P60", 60, 1920, 1080, 7692,

  100, 40,

  30, 3,

  10, 2,

  0,

  FB_VMODE_NONINTERLACED,

  FB_MODE_IS_DETAILED,},

};

It takes effect by following steps:

mxcfb_init()->mxcfb_dispdrv_init()->ldb_disp_init():

/* must use spec video mode defined by driver */

ret = fb_find_mode(&setting->fbi->var, setting->fbi, setting->dft_mode_str,

    ldb_modedb, ldb_modedb_sz, NULL, setting->default_bpp);

if (ret != 1)

  fb_videomode_to_var(&setting->fbi->var, &ldb_modedb[0]);

Hope this information is helpful for you.

0 项奖励
回复
1,492 次查看
jimmychan
NXP TechSupport
NXP TechSupport

We have documents for i.MX6Q API is about 2D and VPU. Please download the document bundle.

Hope this can help you.