Android framebuffer zoom

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Android framebuffer zoom

2,182 Views
micha_zawadzki
Contributor I

Hi All,

I am new here. I wanted to implement android framebuffer zooming. Android is rendering it's contents into fb0. AFAIK IPU is passing fb0 to the display panel (LVDS). I know also that it is capable of scaling.

So I wanted to setup IPU so that it selects part of the fb0 scales it to the full HD resolution and passed onto LVDS. The IPU API is a bit complicated (driver API) and the example included operates on file image data not on a living framebuffer, so it didn't help me.

Is it possible to do the realtime framebuffer scaling and how?

Cheers,

MZ

Labels (3)
Tags (3)
0 Kudos
10 Replies

1,206 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

In Freescale Android BSP, it can support overscan function "https://community.freescale.com/docs/DOC-94994", in dual display case, for example, the fb0 is LVDS and the fb2 is HDMI, with overscan enabled, the GPU will resize the fb0 to part of fb2.

So for your case, you can set fb2 as your real LVDS display, and set fb0 to other display (no real display device needed for fb0), and after enabled dual display mode, you can reference the over scan feature for the resize, but you just resize part of fb0 to full fb2.

1,206 Views
micha_zawadzki
Contributor I

We currently have ICS onboard, so this JB patch didn't work, even when I tried to patch it manually - too much difference.

But event if it worked I do not understand how overscanning (making android plane smaller in size) would help me to achieve zooming functionality (unzooming maybe yes). Could you clarify your train of thought?

King regards.

0 Kudos

1,206 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

For ICS BSP, the overscan feature was supported default, no patch was needed. I think you need study that feature and think how to use it for your case. I can't tell you the code position, but I think the resize function can be used for your case.

0 Kudos

1,206 Views
micha_zawadzki
Contributor I

Overscan is used to add margins for android GUI to allow correct displaying on tv that has overscan enabled. So actually the android screen will get smaller to compensate overscan. I don't know really how it would help to zoom it.

0 Kudos

1,206 Views
micha_zawadzki
Contributor I

Maybe it should be done using hwcomposer?

Anyone?

0 Kudos

1,206 Views
micha_zawadzki
Contributor I

My vision of this android GUI composition is like this:

SurfaceFlinger operates on layers ---> hwcomposer uses vivante implementation ---> hwcomposer_viv composes layers into one image which is written to the framebuffer ---> IPU displays image frome framebuffer on the screen

And now when I alter the contents of hwc_layer_t.displayFrame.top (bottom, left, right) structure of each layer that hwcomposer is using in hwc_set() function I can see that each layer is zooming.

But each layer is zooming separately so the effect is weird and this is not what I want. I want to zoom the whole picture that is composed from all the layers.

Is there a way to use hwcomposer for zooming or it must be done in some lower layer? Kernel: mxcfb.c, mxc_ipuv3_fb.c???

0 Kudos

1,206 Views
daiane_angolini
NXP Employee
NXP Employee

Zoom is something that you want to be able to enable/disable? Or it´s for the complete system forever?

0 Kudos

1,206 Views
micha_zawadzki
Contributor I

From my engineering point of view, if this modification introduces some significant computing power consumption it should have on/off switch. But I don't think it will be needed.

If it simplifies the design, then we can assume that this functionality should be available all the time. Moreover we can consider zooming with ratio 1:1 as zooming disabled (blit copy). Also, we can disable/block it in the highest software layers later.

0 Kudos

1,206 Views
micha_zawadzki
Contributor I

Another question would be: if we can do zooming with or without android cursor zooming?

0 Kudos

1,206 Views
micha_zawadzki
Contributor I

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.0.4

TARGET_PRODUCT=sabresd_6dq

TARGET_BUILD_VARIANT=eng

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

0 Kudos