Kernel Recipes 2013 - Overview display in the Linux kernel

  • 1,199 views
Uploaded on

The Linux kernel has adapted in recent years to cope with the arrival of the embedded platforms using more and more advanced graphics capabilities. This presentation will explore the past challenges, …

The Linux kernel has adapted in recent years to cope with the arrival of the embedded platforms using more and more advanced graphics capabilities. This presentation will explore the past challenges, but also the present and future, focusing on the current situation, the problems we face and the solutions that are currently proposed and considered.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,199
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
41
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Display and Kernel Review and Future Kernel Recipes 2013 Paris Laurent Pinchart laurent.pinchart@ideasonboard.com
  • 2. Problem Definition
  • 3. display /
  • 4. / graphics /
  • 5. / video
  • 6. Problem - Purpose display / graphics / video
  • 7. format
  • 8. memory / deep pipeline
  • 9. device / CPU
  • 10. Problem - Source format memory / deep pipeline device / CPU
  • 11. rotation /
  • 12. / scaling /
  • 13. / composing
  • 14. Problem - Processing rotation scaling composing
  • 15. X11 /
  • 16. / Wayland /
  • 17. / MIR /
  • 18. / SDL /
  • 19. / DirectFB /
  • 20. / Raw API
  • 21. Problem - Stack X11 Wayland SDL DirectFB Raw API
  • 22. DRM /
  • 23. / FBDEV /
  • 24. / V4L2
  • 25. Problem - API DRM FBDEV V4L2
  • 26. Display – Scanout Frame Buffer
  • 27. Display – Composition CRTC Plane(s) Composition
  • 28. Origins
  • 29. Origins – FBDEV FBD EV,Linux 1.3.94 1996 2012 4C C Form ats 2000 Blanking
  • 30. Origins – V4L2 V4L,Linux 2.2.0 1999 2002 2006 V4L2,Linux 2.4.0 V4L deprecated 2008 V4L2 subdev 2011 M edia controller videobuf2 2012 D M ABU F
  • 31. Origins – DRM/KMS 2000 D R M ,Linux 2.2.18 2009 KM S,TTM 2008 G EM Planes,D M ABU F 2011 2012 D um b Buffers
  • 32. Features
  • 33. Memory Management DRM FB V4L2 Dynamic Allocation Yes No Yes Multiple Buffers Yes panning Yes Import dmabuf No userptr Export dmabuf mmap mmap mmap
  • 34. Mode Setting DRM FB V4L2 Formats 4CC RGB 4CC 4CC Enumeration Planes No Yes Negotiation No No Yes Atomicity Yes No No
  • 35. Transformations DRM FB V4L2 Overlays Yes No Yes Rotation Yes No Yes Scaling Yes No Yes Cropping/Panning Yes Yes Yes
  • 36. Documentation api core drivers drm fb v4l2
  • 37. DRM API Documentation The DRM core exports several interfaces to applications, generally intended to be used through corresponding libdrm wrapper functions. In addition, drivers export device-specific interfaces for use by userspace drivers & device-aware applications through ioctls and sysfs files. External interfaces include: memory mapping, context management, DMA operations, AGP management, vblank control, fence management, memory management, and output management. Cover generic ioctls and sysfs layout here. We only need high- level info, since man pages should cover the rest. “ „
  • 38. Documentation api core drivers drm fb v4l2
  • 39. Code Size api core drivers drm fb v4l2
  • 40. Cumulative Changes - API 0 1000 2000 3000 4000 5000 6000 drm fb v4l2 drm fb v4l2
  • 41. Cumulative Changes - Core 0 5000 10000 15000 20000 25000 30000 35000 40000 45000 50000 drm fb v4l2 drm fb v4l2
  • 42. Cumulative Changes - Drivers 0 200000 400000 600000 800000 1000000 1200000 1400000 1600000 1800000 drm fb v4l2 drm fb v4l2
  • 43. Mailing List Traffic 0 200 400 600 800 1000 1200 1400 1600 1800 drm fb v4l2 drm+bug
  • 44. Device Model – FBDEV Frame Buffer (memory) Display Device
  • 45. Device Model – DRM/KMS Frame Buffer (memory) CRTC Encoder Connector Planes (memory) Encoder Connector Connector
  • 46. Device Model – V4L2 Buffers (memory) Display Device Connector
  • 47. Device Model – V4L2/MC V4L2 subdev 0 1 2 V4L2 subdev 0 1 V4L2 queue 0
  • 48. Device Model – V4L2/MC
  • 49. Use Cases
  • 50. Use Cases - FBDEV
  • 51. Use Cases - FBDEV (that's it...)
  • 52. Use Cases - V4L2 Video
  • 53. Use Cases – DRM/KMS Everything else
  • 54. FB vs. DRM - sloccount fbdev 0 500 1000 1500 2000 2500 2370
  • 55. FB vs. DRM - sloccount fbdev drm 0 500 1000 1500 2000 2500 2370 1659
  • 56. DRM/KMS API drm kms exynos i810 i915 mga nouveau r128 radeon savage sis via
  • 57. KMS - Device Model Frame Buffer (memory) CRTC Encoder Connector Plane (memory) SoCMemory Off-Chip Encoder Connector
  • 58. KMS – Frame Buffer CRTC Frame Buffer GEM Object(s) Memory ● width ● height ● format ● pitches ● offsets Properties
  • 59. DRM/KMS – GEM Object CRTC Frame Buffer GEM Object ● width ● height ● bpp ● pitch ● size Properties Memory
  • 60. DRM – Handles Process A Local Handle GEM Object Process B Send FD SCM_RIGHTS Global FD 1 2 Global FD 4 Local Handle 3
  • 61. Active Area KMS – Modes (1/2) sync back porch front porch active area
  • 62. Active Area KMS – Modes (2/2) sync back porch front porch active area hdisplay hsync_start htotal hsync_end
  • 63. KMS – Mode Setting crtc fb Active Area x y mode.hdisplay mode.vdisplay *connectors num_connectors mode struct drm_mode_set { struct drm_framebuffer *fb; struct drm_crtc *crtc; struct drm_display_mode *mode; uint32_t x; uint32_t y; struct drm_connector **connectors; size_t num_connectors; };
  • 64. Source: http://www.flickr.com/photos/buckaroobay/3721809183/
  • 65. WIP – Display Framework Common Display Framework http://lwn.net/Articles/512363/
  • 66. Entity Entity Link Port CDF - Entity Model
  • 67. CDF - Device Tree hdmi_encoder { ports { #address-cells = <1>; #size-cells = <0>; port@0 { hdmi_input: endpoint@0 { remote = <&display_output>; }; }; port@1 { endpoint@0 { ... }; endpoint@1 { ... }; }; }; };
  • 68. Display Controller Video Entity Pipeline Controller controlcontrol Entity Entity CDF - Configuration Model
  • 69. Display Controller Video Entity streaming control streaming control Entity Entity CDF - Streaming Control
  • 70. CDF - Integration Display Controller Driver Control Bus API FBDEV DRM SPI/I2C Mem Map Panel Driver DT pdata DSI
  • 71. • dri-devel@listsfreedesktop.org • linux-fbdev@vger.kernel.org • linux-media@vger.kernel.org • laurent.pinchart@ideasonboard.com Contact
  • 72. ? !
  • 73. merci.