From 2ecf1e1d84bcec2fa77318a7e9a3ddf506a921f6 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 25 May 2016 14:51:05 +0300 Subject: gamma.py: show a test pattern --- py/gamma.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'py') diff --git a/py/gamma.py b/py/gamma.py index 69722ce..c8da18f 100644 --- a/py/gamma.py +++ b/py/gamma.py @@ -12,6 +12,12 @@ card = pykms.Card() conn = card.get_first_connected_connector() mode = conn.get_default_mode() crtc = conn.get_current_crtc() +mode = conn.get_default_mode() + +fb = pykms.DumbFramebuffer(card, mode.hdisplay, mode.vdisplay, "XR24"); +pykms.draw_test_pattern(fb); + +crtc.set_mode(conn, fb, mode) arr = bytearray(256*2*4) view = memoryview(arr).cast("H") -- cgit v1.2.3