Am 10.03.2014 um 11:33 schrieb Michael Mrozek:
Am Mon, 10 Mar 2014 07:53:27 +0200 hat Tomi Valkeinen tomi.valkeinen@ti.com geschrieben:
Hi,
as we now have the display working fine, we should try to see if it is usable without any issues for us.... As you know, the display is - like most displays theses days - in portrait mode (1080x1920), but we want to use it in landscape mode (1920x1080).
My first thought here is: you've got the wrong display =). Rotation never comes free.
True - but the issue is: Getting the display you need is impossible these days.
My ideal display would be 1280x720 with 20ms refresh rate or better (needed for gaming).
We nearly had one (with 25ms refresh rate), but that never went into production.
The only other 1280x720px displays we can get are 35ms...
So that basically was our only option :/
Nikolaus: Do you know if some inbetween-chip exists for MIPI devices, that can do scaling and rotating at hardware basis?
So basically:
Linux OS with any resolution -> Scaler chip to 1920x1080 -> Display
Ideally, this should be implemented as low-level as possible and be done by some scaler / rotation hardware, so that the main Linux OS sees this as a 1920x1080 display. It would also be great if Linux would offer various resolutions (like 1280x720) and our low-level implementation would scale this automatically as well.
Of course, using the CPU for stuff like that is not really useful. Android phones use OpenGL ES, but we don't want that, as all programs (directly writing to the framebuffer, X11, SDL, etc.) should work out of the box.
Tomi, that's something you might know better than any of us: Is something like that possible with the OMAP5 hardware?
A rotation and scalation using some hardware, which could be implemented low-level (in the display-driver, I guess).
We'd need to make sure the rotation works properly with VSync as well, otherwise we'd have ugly artifacts when games use scrolling.
I'm not that deep into proper implementation of stuff like this, but hopefully, Tomi and notaz have an idea here how to achieve that.
With the restrictions you described above, I think the only option is to use OMAP5's TILER block to handle the rotation. omapdrm supports TILER, but omapfb does not.
Okay. Since TILER seems to be a kernel command line / userspace option, I'll use that. Do you know if TILER is fast enough on the OMAP5 for rotating such resolutions without issues like VSync problems, etc?
I think it is hardware:
10.2.4.7 DISPC Rotation and Mirroring The DISPC provides flexible mechanisms for efficient implementation of rotation using the DISPC, its DMA engine, and the rotation engine of the TILER. The rotation is handled only through the TILER, which supplies the encoded pixels to the DISPC.
So the speed is the same if you use it or don't.
VSYNC isn't influenced. Except one thing: the display scans high speed top-down and low speed left-right (or right-left).
But with VSYNC you probably mean syncing to the full frame - to avoid flicker in games. This is and remains 60 fps.
Scaling in generic manner is not possible. The DSS hardware can scale video overlays, but the userspace needs to specifically use that functionality. The GFX overlay, which is normally used for the user interface, cannot be scaled.
Hmmmm... does that mean that all games have to run at 1920x1080 then when using drm? So if I start a normal Linux game that uses SDL and switch to fullscreen, will it not be possible to scale it to use the full screen?
I think Tomi refers to the 10.2.4.10.4 DISPC Scaler Unit
Figure 10-52. DISPC Video Upsampling is illustrating that.
It needs a quite complex setup (setting coefficients and filters). And I am not sure how to interpret all the data in this TRM section.
Well 1280x720 --> 1920x1080 would be Factor 1.5.
Should be upsampling by factor 2 and downsampling by factor 3. If that can be configured, it will run 100% in hardware.
But I have no idea how to program/configure the DSS/DISPC for that.
Here the fps also isn't influenced and is 60 fps.
BR, Nikolaus