Merge lp://qastaging/~glmark2-dev/glmark2/canvas-drm-rebranch into lp://qastaging/glmark2/2011.11
Status: | Merged |
---|---|
Merged at revision: | 257 |
Proposed branch: | lp://qastaging/~glmark2-dev/glmark2/canvas-drm-rebranch |
Merge into: | lp://qastaging/glmark2/2011.11 |
Diff against target: |
907 lines (+798/-12) 6 files modified
INSTALL (+1/-1) src/canvas-drm.cpp (+587/-0) src/canvas-drm.h (+132/-0) src/main.cpp (+6/-2) src/wscript_build (+43/-0) wscript (+29/-9) |
To merge this branch: | bzr merge lp://qastaging/~glmark2-dev/glmark2/canvas-drm-rebranch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis | Approve | ||
Jesse Barker | Needs Resubmitting | ||
Review via email:
|
Description of the change
CanvasDRM: Add a new canvas type that renders directly to DRM-managed buffers rather than going through X11. The canvas uses GBM for surface management, DRM (KMS) for mode control and page flip, and EGL for rendering context and config management. Client API support is predicated upon the EGL, but both OpenGL and OpenGL ES 2.0 are supported.
This work was originally done on lp:~glmark2-dev/glmark2/canvas-drm, however, based upon review comments there, it was decided it would be cleaner (with respect to other development branches that have been merged in the interim) to rebranch and reintegrate the work. So, I rebranched from current trunk and then did a 'bzr merge --interactive' from canvas-drm into this branch and de-selected the changes relating to egl-state.{h,cpp}. I think we lose a bit of the revision history, but actually gain a bit of clarity.
Rendering works fine on the platforms I have tested. The only problems I see are during shutdown:
1. Pressing Ctrl+C occasionally doesn't seem to reset the crtc correctly, so I end up with a blank screen. It also always causes an error message to be displayed (Error in select: -1).
2. Pressing Enter (and therefore flushing stdin), causes a segfault. This happens because we are leaving DRMState::do_flip() with both surface buffers locked. Next time we call gbm_surface_ lock_front_ buffer( surface_ ) we get back a NULL value which we currently don't handle properly (i.e. we just use it). We get into the same situation if select fails etc
(1) is not critical, so I am ok with shipping this as part of an experimental drm backend release (perhaps we could add a warning about the experimental status when startinp up?).
On the other hand, I think (2) should be fixed before this release, if possible, as it's relatively easy for a user to cause a segfault. For example, a user that wants to quit will probably try pressing ESC (which won't work), then some keys then Enter.