Skip to content
Snippets Groups Projects

samsung-klte: fix swapped red and blue

Merged Imported Administrator requested to merge samsung-klte-framebuffer-fix into master
All threads resolved!

This MR fixes the problem described in issue #211 (closed) for samsung-klte,
similarly to what I've done with oneplus-bacon in MR !287 (merged).

The patch has been tested by @minlexx on real hardware.

Edited by Administrator

Merge request reports

Approval is optional

Merged by AdministratorAdministrator 6 years ago (Mar 29, 2019 7:23am UTC)

Merge details

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator mentioned in issue #211 (closed) · Imported

    mentioned in issue #211 (closed)

    By Federico Amedeo Izzo on 2019-03-25T21:34:35

  • Author Owner

    Does not work, first you see a red pmOS logo with yellow text, and weston does not start.

    image

    logs:

    Mar 10 11:03:07 klte daemon.info init: starting pid 13241, tty '/dev/tty1': '/bin/login -f user'
    Mar 10 11:03:07 klte authpriv.debug login[13241]: pam_unix(login:account): account user has password changed in future
    Mar 10 11:03:07 klte authpriv.info login[13241]: pam_unix(login:session): session opened for user user by (uid=0)
    Mar 10 11:03:07 klte user.notice user:weston: Date: 2019-03-10 GMT
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.862] weston 5.0.0
    Mar 10 11:03:07 klte user.notice user:weston:                https://wayland.freedesktop.org
    Mar 10 11:03:07 klte user.notice user:weston:                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
    Mar 10 11:03:07 klte user.notice user:weston:                Build: unknown (not built from git or tarball)
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.862] Command line: /usr/bin/weston -c /etc/xdg/weston/weston.ini.default
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.862] OS: Linux, 3.4.113, #3-postmarketOS SMP PREEMPT Tue Mar 26 08:06:38 UTC 2019, armv7l
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.862] Using config file '/etc/xdg/weston/weston.ini.default'
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.863] Output repaint window is 7 ms maximum.
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.863] Loading module '/usr/lib/libweston-5/fbdev-backend.so'
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.863] initializing fbdev backend
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.864] Opening fbdev frame buffer.
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.864] Calculating pixman format from:
    Mar 10 11:03:07 klte user.notice user:weston:                 - type: 0 (aux: 0)
    Mar 10 11:03:07 klte user.notice user:weston:                 - visual: 2
    Mar 10 11:03:07 klte user.notice user:weston:                 - bpp: 32 (grayscale: 0)
    Mar 10 11:03:07 klte user.notice user:weston:                 - red: offset: 8, length: 8, MSB: 0
    Mar 10 11:03:07 klte user.notice user:weston:                 - green: offset: 16, length: 8, MSB: 0
    Mar 10 11:03:07 klte user.notice user:weston:                 - blue: offset: 24, length: 8, MSB: 0
    Mar 10 11:03:07 klte user.notice user:weston:                 - transp: offset: 0, length: 8, MSB: 0
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.865] Frame buffer uses an unsupported format.
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.865] Failed to get frame buffer info: Invalid argument
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.865] Creating frame buffer head failed.
    Mar 10 11:03:07 klte user.notice user:weston: [11:03:07.865] fatal: failed to create compositor backend

    By Alexey Min on 2019-03-26T09:23:26

  • Author Owner

    Ok, apparently this pixel format does not work :(

    You can see by the log that the current format is ARGB,
    and you get the red logo, which probably means that R is where A should be.

    You can try removing the patch 0002-change-framebuffer-to-ARGB.patch
    from APKBUILD and test again.
    This should leave the format to RGBA which may work.

    I'm sorry to be this vague but the test outcome means the idea
    I made myself on how the pixel format works is wrong.

    By Federico Amedeo Izzo on 2019-03-26T14:43:39

  • Author Owner

    Removing patch 0002-change-framebuffer-to-ARGB.patch helps, weston starts and works correctly, colors in plasma-mobile look fine:

    image image

    By Alexey Min on 2019-03-27T11:32:56

  • Author Owner

    Nice!, this means that samsung-klte uses RGBA just like oneplus-bacon.

    So the only modification needed is to invert the pixel format byte order with the
    patch 0001-fix-video-argb-setting.patch .

    I will update the merge request soon, thanks for testing!

    By Federico Amedeo Izzo on 2019-03-27T13:04:59

    • Author Owner
      Resolved by Administrator

      Unrelated: @minlexx I can see some burn-in from the boot screen on your photos,
      did you left the phone on the boot screen for a long time?

      By Federico Amedeo Izzo on 2019-03-27T13:15:44

      Edited by Ghost User
  • Administrator added 1 commit · Imported

    added 1 commit

    • 30621b26 - samsung-klte: removed patch to set pixel format to ARGB

    Compare with previous version

    By Federico Amedeo Izzo on 2019-03-27T13:11:02

  • Administrator unmarked as a Work In Progress · Imported

    unmarked as a Work In Progress

    By Federico Amedeo Izzo on 2019-03-27T13:25:45

  • Administrator changed the description · Imported

    changed the description

    By Federico Amedeo Izzo on 2019-03-27T13:25:45

  • Author Owner

    Ok, I updated the MR removing the ARGB patch, so finally it can be merged.

    By Federico Amedeo Izzo on 2019-03-27T13:27:35

  • Administrator added 7 commits · Imported

    added 7 commits

    Compare with previous version

    By Oliver Smith on 2019-03-29T07:20:16

  • Administrator approved this merge request · Imported

    approved this merge request

    By Oliver Smith on 2019-03-29T07:20:29

  • Administrator resolved all discussions · Imported

    resolved all discussions

    By Oliver Smith on 2019-03-29T07:20:57

  • Administrator enabled an automatic merge when the pipeline for 0811662c succeeds · Imported

    enabled an automatic merge when the pipeline for 0811662c succeeds

    By Oliver Smith on 2019-03-29T07:21:06

  • Author Owner

    Excellent, thank you @Nimayer and @minlexx! :tada:

    By Oliver Smith on 2019-03-29T07:21:31

  • Administrator merged · Imported

    merged

    By Oliver Smith on 2019-03-29T07:23:28

  • Administrator mentioned in commit 1ee8db41 · Imported

    mentioned in commit 1ee8db41

    By Federico Amedeo Izzo on 2019-03-29T07:23:28

  • Administrator mentioned in merge request !321 (merged) · Imported

    mentioned in merge request !321 (merged)

    By Alexey Min on 2019-04-18T21:27:02

Please register or sign in to reply
Loading