Common Display Framework Tomorrow's Linux Kernel Display - - PowerPoint PPT Presentation

common display framework
SMART_READER_LITE
LIVE PREVIEW

Common Display Framework Tomorrow's Linux Kernel Display - - PowerPoint PPT Presentation

Common Display Framework Tomorrow's Linux Kernel Display Architecture Embedded Linux Conference Europe 2013 Edinburgh Laurent Pinchart laurent.pinchart@ideasonboard.com a long long time ago source:


slide-1
SLIDE 1

Common Display Framework

Tomorrow's Linux Kernel Display Architecture Embedded Linux Conference Europe 2013 Edinburgh Laurent Pinchart laurent.pinchart@ideasonboard.com
slide-2
SLIDE 2

a long long time ago

slide-3
SLIDE 3 source: http://commons.wikimedia.org/wiki/File:Danaides_Waterhouse_1903.jpg
slide-4
SLIDE 4

display

(skip?)

slide-5
SLIDE 5

Display – Scanout

Frame Buffer
slide-6
SLIDE 6

Display – Composition

CRTC Plane(s) Composition
slide-7
SLIDE 7

KMS

slide-8
SLIDE 8

KMS – Device Model

Frame Buffer (memory) CRTC Encoder Connector Planes (memory) Encoder Connector Connector
slide-9
SLIDE 9

KMS – Device Model

Frame Buffer (memory) CRTC Encoder Connector Plane (memory) SoC Memory Off-Chip Encoder Connector
slide-10
SLIDE 10

KMS – Frame Buffer

CRTC Frame Buffer GEM Object(s) Memory
  • width
  • height
  • format
  • pitches
  • offsets
Properties
slide-11
SLIDE 11

DRM/KMS – GEM Object

CRTC Frame Buffer GEM Object
  • width
  • height
  • bpp
  • pitch
  • size
Properties Memory
slide-12
SLIDE 12

DRM – Handles

Process A Local Handle GEM Object Process B Send FD SCM_RIGHTS Global FD 1 2 Global FD 4 Local Handle 3
slide-13
SLIDE 13 Active Area

KMS – Modes (1/2)

sync back porch front porch active area
slide-14
SLIDE 14 Active Area

KMS – Modes (2/2)

sync back porch front porch active area hdisplay hsync_start htotal hsync_end
slide-15
SLIDE 15

KMS – Mode Setting

crtc fb Active Area x y mode.hdisplay m
  • d
e . v d i s p l a y *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; };

KMS – Mode Setting

slide-16
SLIDE 16

media controller

(skip?)

slide-17
SLIDE 17

Media Controller – Model

slide-18
SLIDE 18 Media entity struct media_entity { u32 id; const char *name; u32 type; u32 revision; unsigned long flags; u32 group_id; ... };

Media Controller – Entity

slide-19
SLIDE 19

Media Controller – Pads

Media entity 1 2 struct media_entity { ... u16 num_pads; struct media_pad *pads; ... }; struct media_pad { u16 index; unsigned long flags; };
slide-20
SLIDE 20

Media Controller – Links

struct media_entity { ... u16 num_links; struct media_link *links; ... }; struct media_entity_link { struct media_pad *source; struct media_pad *sink; unsigned long flags; }; Media entity 1 2 Media entity
slide-21
SLIDE 21

problems

slide-22
SLIDE 22

(round 1)

slide-23
SLIDE 23 /* * Skeleton device tree; the bare minimum needed to boot; * just include and add a compatible value. The bootloader * will typically populate the memory node. */ / { #address-cells = <1>; #size-cells = <1>; chosen { }; aliases { }; memory { device_type = "memory"; reg = <0 0>; }; };

Problems – DT Bindings

slide-24
SLIDE 24

Problems – Panel Drivers

source: http://en.wikipedia.org/wiki/File:Casio_LCD_screen_for_digital_camera.jpg
slide-25
SLIDE 25

Problems – Sharing

KMS FBDEV

slide-26
SLIDE 26

Problems – MIPI DPI/DSI

source: http://en.wikipedia.org/wiki/File:RaspberryPi_Display_Serial_Interface.jpg
slide-27
SLIDE 27

(round 2)

slide-28
SLIDE 28

Problems – Other Chips

bridges encoders transmitters ...

slide-29
SLIDE 29 /* * Skeleton device tree; the bare minimum needed to boot; * just include and add a compatible value. The bootloader * will typically populate the memory node. */ / { #address-cells = <1>; #size-cells = <1>; chosen { }; aliases { }; memory { device_type = "memory"; reg = <0 0>; }; };

Problems – DT Bindings

slide-30
SLIDE 30 / \----> soc | | | \----> i2c2: i2c@e6530000 | | | | | \----> adv7511: hdmi@42 | | | \----> du: display@feb00000 | \----> con-hdmi | \----> panel-dpi

Problems – Async Probing

slide-31
SLIDE 31

(secret round)

slide-32
SLIDE 32

Problems – Sharing

KMS FBDEV V4L

slide-33
SLIDE 33

Problems – Sharing

KMS FBDEV V4L

slide-34
SLIDE 34

Problems – Bonus Issues

Multiple control busses

slide-35
SLIDE 35

Use Cases

slide-36
SLIDE 36

(they're real)

slide-37
SLIDE 37

Renesas – DU

slide-38
SLIDE 38

Renesas – VSP1

slide-39
SLIDE 39

Xilinx – FPGA

Sensor Proc HDMI Decoder Scaler DMA Scaler Composer ADV7511 ADV7511
slide-40
SLIDE 40

Xilinx – FPGA

Sensor Proc HDMI Decoder Scaler DMA Scaler Composer ADV7511
slide-41
SLIDE 41

CDF

slide-42
SLIDE 42

[RFC 0/5] Generic panel framework

slide-43
SLIDE 43

CDF – Integration

Display Controller Driver Control Bus API FBDEV DRM SPI/I2C Mem Map Panel Driver DT pdata DSI
slide-44
SLIDE 44

[RFC v2 0/5] Common Display Framework

slide-45
SLIDE 45

CDF – Configuration Model

source: http://en.wikipedia.org/wiki/File:Russian-Matroshka2.jpg
slide-46
SLIDE 46

CDF – Configuration Model

DPI/LVDS DISPC Panel LVDS/DSI Panel Module Panel Controller Transmitter
slide-47
SLIDE 47

Positive Feedback

  • [RFC PATCH 0/4] exynos-drm-hdmi driver to
CDF complaint display driver
  • [RFC 0/6] Common Display Framework-T
  • [RFC PATCH 0/4] Common Display Framework-
TF
  • [RFC 0/4] Use the Common Display Framework
in tegra-drm
  • [RFC 00/10] Versatile Express CLCD DVI output
support
slide-48
SLIDE 48

[RFC v3 00/19] Common Display Framework

slide-49
SLIDE 49 Entity Entity Link Port

CDF – Entity Model

slide-50
SLIDE 50 struct display_entity { struct list_head list; struct device *dev; struct module *owner; struct kref ref; void(*release)(struct display_entity *ent); char name[32]; struct media_entity entity; const struct display_entity_ops *ops; enum display_entity_state state; struct display_entity_match *match; struct display_entity_notifier *notifier; };

CDF – Entity

slide-51
SLIDE 51

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 { ... }; }; }; };
slide-52
SLIDE 52

Positive Feedback

  • [RFC PATCH 0/4] CDFv3: MIPI DSI bus
implementation
slide-53
SLIDE 53

[PATCH v2 0/2] drm: Add drm_bridge and PTN3460 bridge driver

slide-54
SLIDE 54

[RFR 0/2] DRM display panel support

slide-55
SLIDE 55

[RFC v4] TBD

slide-56
SLIDE 56 Display Controller Video Entity Pipeline Controller control control Entity Entity

CDF – Configuration Model

slide-57
SLIDE 57 Display Controller Video Entity streaming control streaming control Entity Entity

CDF – Streaming Control

slide-58
SLIDE 58 struct display_entity_control_ops { int (*get_size)(struct display_entity *ent, unsigned int *width, unsigned int *height); int (*set_state)(struct display_entity *ent, enum display_entity_state state); int (*update)(struct display_entity *ent); /* Port operations */ int (*get_modes)(struct display_entity *entity, unsigned int port, const struct videomode **modes); int (*get_params)(struct display_entity *entity, unsigned int port, struct display_entity_interface_params *params); };

CDF – Control Operations

slide-59
SLIDE 59 struct display_entity_video_ops { int (*set_stream)(struct display_entity *ent, unsigned int port, enum display_entity_stream_state state); };

CDF – Video Operations

slide-60
SLIDE 60

Pushback

slide-61
SLIDE 61
slide-62
SLIDE 62
slide-63
SLIDE 63
slide-64
SLIDE 64
slide-65
SLIDE 65
slide-66
SLIDE 66
slide-67
SLIDE 67
  • dri-devel@listsfreedesktop.org
  • linux-media@vger.kernel.org
  • laurent.pinchart@ideasonboard.com

Contact

slide-68
SLIDE 68

? !

slide-69
SLIDE 69

Thenk ye.