fb_backend: use new udev function to detect framebuffer devices, if one is not set
ClosedPublic

Authored by nerdopolist on Dec 29 2017, 5:33 PM.

Diff Detail

Repository
R108 KWin
Branch
arcpatch-D9556_2
Lint
No Linters Available
Unit
No Unit Test Coverage
nerdopolist created this revision.Dec 29 2017, 5:33 PM
Restricted Application added a subscriber: kwin. · View Herald TranscriptDec 29 2017, 5:33 PM
anthonyfieroni added inline comments.
plugins/platforms/fbdev/fb_backend.cpp
89

strdup allocates memory and you should call free to prevent memory leaks. To use QString is easier.

graesslin requested changes to this revision.Dec 30 2017, 9:54 AM
graesslin added a subscriber: graesslin.

Please use QString or QByteArray

plugins/platforms/fbdev/fb_backend.cpp
91–92

Coding style nitpick: please use {}

This revision now requires changes to proceed.Dec 30 2017, 9:54 AM

Update for changes

nerdopolist marked 2 inline comments as done.Dec 30 2017, 8:16 PM

as another note, I am going to have to dig deeper into the fact that seat0 is the only one with TTYs. (not doing VirtualTerminal::self()->init(); on non-seat0) , there is no way for it to determine that it is active, and that is one of the reasons why the framebuffer does not draw on seat1)

anthonyfieroni added inline comments.Dec 30 2017, 8:58 PM
plugins/platforms/fbdev/fb_backend.cpp
89

You use udev only here, so you can write it like that

framebufferDevice = Udev().primaryFramebuffer()->devNode()

i.e. make Udev local to this scope. I see potentially primaryFramebuffer can return nullptr which will cause a crash without exclusive check.

graesslin accepted this revision.Dec 31 2017, 9:38 AM
This revision is now accepted and ready to land.Dec 31 2017, 9:38 AM
rkflx added a subscriber: rkflx.EditedMar 21 2018, 11:50 AM

@nerdopolist Please rebase on D9554 (!) after you updated D9554 itself (and update authorship information on Phab as usual ;):

git checkout 50b948134c81
arc patch D9556
git rebase arcpatch-D9554 # might be arcpatch-D9554_1 or similar for you
# Check if it still compiles
arc diff
nerdopolist marked an inline comment as done.EditedMar 27 2018, 2:24 AM

I am not sure what to do from here?

nerdopolis@nerdopolis:~/kwin2upstream$ arc diff
Usage Exception: There are several revisions which match the working copy:
 
      - D9554: udev: Add the ability to query the current framebuffer.
     - D9556: fb_backend: use new udev function to detect framebuffer devices, if one is not set

 
Use '--update' to choose one, or '--create' to create a new revision.
rkflx added a comment.Mar 27 2018, 7:54 AM

I am not sure what to do from here?

Try this:

git branch --set-upstream-to=arcpatch-D9554
arc diff
This revision was automatically updated to reflect the committed changes.