a story of 33m pixels, 2 crtcs and no tears! · a story of 33m pixels, 2 crtcs and no tears! manasi...

13
1 Enabling 8K displays A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019 Montreal, Canada

Upload: others

Post on 14-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

1

Enabling 8K displaysA story of 33M pixels, 2 CRTCs and no Tears!

MANASI NAVARELinux Graphics Kernel DeveloperOpen Source Graphics Center, IntelXDC 2019 Montreal, Canada

Page 2: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

8K BW vs. DP BW

2

4320

7680

33 M Pixels/ Frame

8K@60: 1980 M Pixels / Second

BW Gbps

VESA DP

RBR/HBR for DP 1.1, 10.8 Gbps

10.8

2008

HBR2 for DP 1.2, 21.6 Gbps

21.6

2009

HBR3 DP 1.3/1.4, 32.4 Gbps

32.4

2016

Total Display BW : 48 G Bits/sec

Page 3: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Can we stream 8K using single DP connector yet?

3

>=48 Gbits/sec 32.4 Gbits/sec

Required Display BW for 8K@60Available BW of DP @ HBR3

xOutput 8K using 2

DP connectors

Dell Ultrasharp 8K Monitor

DP2DP1

Intel Icelake /Gen 11

Page 4: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Need for 2 CRTCs/Pipes on Intel HW

4

� Display BW should fit within Maximum Pipe Pixel Rate

� Max Pipe Pixel Rate = 2 * CDCLOCK• Max CDCLOCK on ICL = 652MHz• With 99% clock usability, max Pixel clock =

(2 * 990 * 652)/ 1000 = 1290 MHz

� For 8K@60, Pixel Clock = 2200 MHz

* Split 8K@60 across 2 CRTCs/ 2Pipes

Page 5: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Enable 8K in Dual Pipe Dual Port Configuration

7680 pixels

Right Display

Pipe/Port

Left Display Pipe/Port

3840 pixels3840 pixels

Final 8K Display

8K Tiled Display

Parsed from Monitor’s DisplayID EDID data

Tile 23840 x 4320DP link BW ~ 24Gb/s

Tile 13840 x 4320DP link BW ~ 24Gb/s

DP 1 @ 32.4 Gbps DP 2 @ 32.4 Gbps

Page 6: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Challenges with 2 CRTCs 2 PORTS

6

Pipe 1

Mem

ory

Inte

rfac

e

Pipe 1

Transcoder 1

Transcoder 2

DP Port 1

DP Port 2

DP1

DP2

8K Frame Buffer scanout Tile 1

Tile 2

Vblank1

Vblank2

Modeset on Pipe 1

Modeset on Pipe 2

Screen Tearing

Page 7: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Solution: Transcoder Port Sync▵PORT SYNC mode forces two or more transcoders

involved in tiled modeset to be in sync▵Only enabled in the slaves, HW lock-steps slave timings

with the master

Frame 1

Frame 1Vblank

.. . ..Sync

Frame 0Frame -1

Frame 0

Master

Slave

Tearing

PORT_SYNC_ENABLE

Page 8: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

PIPE B/ CRTC 1

PIPE A/ CRTC 0

Last tile = masterMaster crtc_stateSlave_bitmask = BIT(PipeA)

First tile = slaveSlave crtc_statemaster_trans = PipeB

Slave Transcoder A

Enable Port Sync ModeSet Master select

Port A

Master Transcoder B Port B

Atomic Check Atomic Commit

8K Frame

Output next frame

Page 9: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Atomic KMS changes

Userspace Kernel

Dell 8K Monitor

Hot Plug DetectDRM_IOCTL_MODE_GET_CONNECTOR

Tile Info in Display ID/ Set Connector TILE Prop

Create FB,Setup CRTCs, Set CRTC offsets = Tile offsets

DRM_IOCTL_MODE_ATOMICIntel_atomic_check Pipe A (Slave)Master = B, slave_mask = 0

Intel_atomic_check Pipe B (Master)Master NULL, slave_mask = BIT(PipeA)

Get slave_crtc_state

Slave CRTC enable, enable Port_sync, select master, enable slave TRANS

Slave Link train, DP_TP_CTL = Idle

Modeset in Master CRTCs commit()

Master CRTC enable

Master Link train, DP_TP_CTL = Idle

Set Slave DP_TP_CTL = Normal

Set Master DP_TP_CTL = Normal

Plane updates, Pipe register updates, Page flips for Master + Slave

Atomic CommitAtomic Check

Get Connector Tile Prop

Page 10: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Synchronized page flips validation/CI▵ IGT test kms_dp_tiled_display.c and TILE property parser to

decode the tile information added to igt/lib/igt_kms.c▵Validate by capturing page flip event timestamps on each CRTC

and ensuring they are within 10us (credits: Madhumitha, Simon Ser)

Screen Tearing, Delayed page flips on second tile Synchronized Flips, within 1us

Page 11: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

8K Results with PORT SYNC▵ Support for transcoder port sync and dual pipe dual port 8K tiled

display to land in 5.4.0 Linux Kernel

8K Output with PORT SYNC

TEARING

Page 12: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Questions?

[email protected]: mdnavare@ intel-gfx, dri-devel on freenode

Thanks to the entire Intel-gfx and dri-devel community!!

Page 13: A story of 33M pixels, 2 CRTCs and no Tears! · A story of 33M pixels, 2 CRTCs and no Tears! MANASI NAVARE Linux Graphics Kernel Developer Open Source Graphics Center, Intel XDC 2019

Acknowledgements▵ Big thanks to Matt Roper, Jani Nikula, Ville Syrjala, Maarten

Lankhorst, Daniel Vetter for their kernel code feedback and reviews

▵Thanks to our intern Madhumitha Tolakanahalli for implementing the IGT and Simon Ser and Petri Latvala for IGT reviews

▵Thanks to the entire Intel-gfx and dri-devel community