Home Artists Posts Import Register

Content

I've spent the last two nights looking into what causes the remainder HDMI output issues we are having (wrong screen rotation), and the issue was quite easily found, but not so easily fixed...

As you all know, the built-in display of the GPD Win / Pocket is a portrait-style screen that's been mounted 270° rotated into the chassis.

This causes a rather odd phenomenon where the display framebuffer's real resolution is portrait-styled as well (720x1280 instead of 1280x720).

This in itself wouldn't be a problem as Android's userspace takes care of properly rotating its content to accommodate for this (although that also took a few patches of its own before it started to work right).

The real problem stems from Android's external monitor mirror code, which operates outside of this whole construct and blindly centers and copies the main monitor's display framebuffer into the external monitor's framebuffer.

This causes the 90° rotated display we are currently seeing on external monitors, and the only way to fix this issue on that layer is to rotate the framebuffer per-pixel...

I've coded 3 different implementations of this code so far, and sadly, all of them (although they work) are way too slow to be of proper use...

The fastest implementation I could come up with for this renders at about 12FPS, and they all run entirely on the CPU, aka. are extreme resource hogs, causing not only battery drain but also slowdowns in the system.

Sadly, our cherrytrail chipset doesn't support hardware rotations other than 180°, thus there is no easy way to hardware-accelerate this operation.

If anyone knows their way around the i915 Linux driver or Android's drm_gralloc / drm_hwcomposer code, feel free to get in touch with me.

I'll gladly share the bits and pieces I've managed to work out so far.

Files

Comments

Anonymous

I know on Linux I can disable internal at the kernel command line with "video=DSI-1:d". Does the same work for Android? Don't have my unit with me to test at the moment. Even if that is one workaround I think your rotation code would still be taking affect.

blackseraph

Disabling the internal monitor and going full-external works, as it eliminates the orientation differences entirely, and yes, this is one of two fallback solutions I had in mind. However I'd really prefer to be able to just mirror the monitor as is... I have one more idea I'm currently looking into, however it requires a full rebuild of the ROM which ices me for the next 3-4 hours... which in turn means its currently compiling, and I'll get back to this issue tomorrow morning.

Anonymous

Cheers. Thanks for all the work you've put towards this. $10 is heading your way in the morning :)

Anonymous

Hi... Thanks for the work on Android for GPD-Win... This was the Android device I always wanted and was more than a little irritated to find it was going to actually be Windows based! Having found out about this little project I can now finally own the Android device I've always wanted! :) - Regarding the framebuffer issue... does this also affect casting?