Monday, September 16, 2013

Testing real screen resolution on RK Linux

Problem:


You think you have a 1080p screen resolution but when you draw a non-aliased one pixel width line and move the window around, it doesn't look one solid line anymore.

You're not on 1080p, but likely on a scaled 720p (even if Linux reports 1080p).


Test:


On a console type:

cat /sys/devices/platform/rk-fb/graphics/fb0/disp_info

for a working 1080p setup, the result should be something like:

win0:enabled
xvir:960
xact:1920
yact:1080
xdsp:1920
ydsp:1080
x_st:192
y_st:41
x_scale:1.0
y_scale:1.0
format:RGB565
win1:disabled
xvir:0
xdsp:320
ydsp:240
x_st:10
y_st:10
format:ARGB888

That is xact and yact (the virtual resolution seen by Linux) must be the same as xdsp and ydsp (the real resolution been sent to the screen), or else you have a scaled output (x_scale and y_scale not 1.0).

Solution:


If this is the case and you find that xdsp=1280 and ydsp=720, whereas you expected a 1080p display, the solution is in this commit:
https://github.com/Galland/3188-SRC-AP6210/commit/130c1ad6bb47f3b2401b6156f205dcb5882255c7


BTW, notice the 16 bits color: RGB565
I couldn't tell the difference with normal desktop usage, but it means half the memory operations (32 bits ARGB888 <-> 16 bits RGB565).

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.