Skip to content

Commit

Permalink
Use DrmDriver as base class instead of DisplayPort
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Ruiz committed Nov 15, 2021
1 parent 98f0071 commit 7c8989b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pynq_composable/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import json
import os
from pynq import Overlay
from pynq.lib.video import *
from pynq.lib.video import DrmDriver, VideoMode, PIXEL_RGB
from pynq.lib.video.clocks import *
from pynq.ps import CPU_ARCH, ZU_ARCH
from time import sleep
Expand Down Expand Up @@ -38,8 +38,16 @@ class VSink(Enum):
DP = auto()


class _DisplayPort(pynq.lib.video.DisplayPort):
class _DisplayPort(DrmDriver):
"""Subclass of DisplayPort that works in a thread"""

def __init__(self):
"""Create a new driver instance bound to card0 which
should always be the hardened DisplayPort
"""

super().__init__('/dev/dri/card0')

def writeframe(self, frame):
"""Write a frame to the display.
Expand Down

0 comments on commit 7c8989b

Please sign in to comment.