X-Git-Url: https://git.ti.com/gitweb?p=android%2Fexternal-libkmsxx.git;a=blobdiff_plain;f=py%2Fdb.py;h=c51ca700f9c02a063532e886b2e7c81c9e45d772;hp=ce1a54e1529b415417e43fc320a70c4e1067be8c;hb=fa91e51e4a485ab813032ffcbc7d8cb8c96314d5;hpb=290e32736bc92569ad5b4626654505c459591326;ds=inline diff --git a/py/db.py b/py/db.py index ce1a54e..c51ca70 100755 --- a/py/db.py +++ b/py/db.py @@ -24,16 +24,16 @@ class FlipHandler(pykms.PageFlipHandlerBase): self.front_buf = self.front_buf ^ 1 current_xpos = self.bar_xpos; - old_xpos = (current_xpos + (fb.width() - bar_width - bar_speed)) % (fb.width() - bar_width); - new_xpos = (current_xpos + bar_speed) % (fb.width() - bar_width); + old_xpos = (current_xpos + (fb.width - bar_width - bar_speed)) % (fb.width - bar_width); + new_xpos = (current_xpos + bar_speed) % (fb.width - bar_width); self.bar_xpos = new_xpos pykms.draw_color_bar(fb, old_xpos, new_xpos, bar_width) - if card.has_atomic(): + if card.has_atomic: ctx = pykms.AtomicReq(card) - ctx.add(crtc, "FB_ID", fb.id()) + ctx.add(crtc, "FB_ID", fb.id) ctx.commit(self) else: crtc.page_flip(fb, self) @@ -61,7 +61,7 @@ def readkey(conn, mask): exit(0) sel = selectors.DefaultSelector() -sel.register(card.fd(), selectors.EVENT_READ, readdrm) +sel.register(card.fd, selectors.EVENT_READ, readdrm) sel.register(sys.stdin, selectors.EVENT_READ, readkey) while True: