From patchwork Thu Aug 9 01:27:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 10611 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BCEA423E41 for ; Thu, 9 Aug 2012 01:27:53 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5D838A18139 for ; Thu, 9 Aug 2012 01:27:53 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1496006ggn.11 for ; Wed, 08 Aug 2012 18:27:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=vnAiDfw829ZQeZ1jOv54fYgbFjL5TKDVMBeArv6yCM0=; b=DzNP3c6NMMv3cGvt122DuqUp0mnTU46d1ewrdNJ0wpD75pbuV8lqYcavOB0wNGgTEA DudiSg5Bc4s3OVRl2SIoqIjKYblj01JUXaG9HD02gmuaXPICQCCYeOmmtTEse8Qk/kwo dPdcC+5XvsLNpI5EG7ACKmL7BbtcIbGz/1VgRnAOIoAMHIkrNId4n04+sIRKu451L6O9 bVTwDRG03jxXUq79V5BQ9JfG+otIeGnOjXjAPjtotmUII8TAlHYYT5ymKphG9YctCUnZ g6JwpJCZjrZr52Hnnd1b5JcDx2F3XUswaG631sYH3kFYspGFKcZrBtaExF+pU7xvwPpe S8Vg== Received: by 10.50.186.131 with SMTP id fk3mr731772igc.31.1344475672514; Wed, 08 Aug 2012 18:27:52 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp635825igc; Wed, 8 Aug 2012 18:27:52 -0700 (PDT) Received: by 10.60.171.138 with SMTP id au10mr33206365oec.39.1344475671967; Wed, 08 Aug 2012 18:27:51 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id d7si27810178oea.22.2012.08.08.18.27.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 18:27:51 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by obbwd20 with SMTP id wd20so2515909obb.37 for ; Wed, 08 Aug 2012 18:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=vnAiDfw829ZQeZ1jOv54fYgbFjL5TKDVMBeArv6yCM0=; b=p0b0CuVghANo9RNyvO8yRrrCoA6uxHIbgQWP2h4u4r/5EuVSx0vcDTGsHnG7enyAdB sVuB96oBiUI8/o11vDROG/PZJqruH0MZc/nevTtPSLeuLXDI5Qjzbiq6+vGhqk38ofhm d+75+QcJVutxTdVHXEu8vznhzc+bqhppxmXUdpREoVC2SfosxpfRTWhFCG9MBrkXg8bA a0isCAfgIwIMtXMEQYi76igtYwLVLM8nsi1OE45DrBdEHM+jrrewcjFQ4nQqaaHqo2kq tXgx6bHukCFogAbgWmhJ/i9g9uQU26wvbeJ2lyH/e+3HH9s5aPtU1KO1mRZJ3uNLBfvf ekAg== Received: by 10.60.25.226 with SMTP id f2mr33052493oeg.13.1344475671397; Wed, 08 Aug 2012 18:27:51 -0700 (PDT) Received: from localhost (ppp-70-129-143-140.dsl.rcsntx.swbell.net. [70.129.143.140]) by mx.google.com with ESMTPS id d4sm4182114obx.3.2012.08.08.18.27.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 18:27:50 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: wayland-devel@lists.freedesktop.org Cc: patches@linaro.org, Rob Clark Subject: [PATCH weston] compositor-drm: handle vblanks on secondary crtc Date: Wed, 8 Aug 2012 20:27:37 -0500 Message-Id: <1344475657-1148-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkj6M8+xwPfmbwJVBrj9/JQB3R9U4n1jXrXAMWam3LQAz5qGh9sAiZ2QCEi55DkOy49PAzE From: Rob Clark Signed-off-by: Rob Clark --- src/compositor-drm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 8ea4965..80dccfc 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -100,6 +100,7 @@ struct drm_output { struct weston_output base; uint32_t crtc_id; + int pipe; uint32_t connector_id; drmModeCrtcPtr original_crtc; @@ -374,6 +375,9 @@ drm_output_repaint(struct weston_output *output_base, weston_log("setplane failed: %d: %s\n", ret, strerror(errno)); + if (output->pipe > 0) + vbl.request.type |= DRM_VBLANK_SECONDARY; + /* * Queue a vblank signal so we know when the surface * becomes active on the display or has been replaced. @@ -1285,6 +1289,7 @@ create_output_for_connector(struct drm_compositor *ec, wl_list_init(&output->base.mode_list); output->crtc_id = resources->crtcs[i]; + output->pipe = i; ec->crtc_allocator |= (1 << output->crtc_id); output->connector_id = connector->connector_id; ec->connector_allocator |= (1 << output->connector_id);