From patchwork Tue Mar 1 12:09:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 8464701 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4EDC9C0553 for ; Tue, 1 Mar 2016 12:10:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84F772024F for ; Tue, 1 Mar 2016 12:10:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B974620251 for ; Tue, 1 Mar 2016 12:10:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFCD56E5D3; Tue, 1 Mar 2016 12:10:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 420F56E42D for ; Tue, 1 Mar 2016 12:10:01 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 01 Mar 2016 04:09:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,523,1449561600"; d="scan'208";a="914346622" Received: from sthoene-mobl.ger.corp.intel.com (HELO ivy.ger.corp.intel.com) ([10.252.33.122]) by fmsmga001.fm.intel.com with ESMTP; 01 Mar 2016 04:09:43 -0800 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Tue, 1 Mar 2016 12:09:29 +0000 Message-Id: <1456834171-16304-2-git-send-email-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456834171-16304-1-git-send-email-lionel.g.landwerlin@intel.com> References: <1456834171-16304-1-git-send-email-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 1/3] igt_kms: Set atomic capability bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Matt Roper Tell the kernel that we understand atomic and want to have access to atomic-only properties. If the kernel doesn't support atomic for i915 yet (and i915.nuclear_pageflip=1 isn't passed on the kernel command line) this will silently fail, but won't cause any problems. We wrap this in an #ifdef to allow compilation on pre-atomic libdrm versions as well. Signed-off-by: Matt Roper --- lib/igt_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 90c8da7..7521e42 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1038,6 +1038,9 @@ void igt_display_init(igt_display_t *display, int drm_fd) display->n_pipes = resources->count_crtcs; drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1); +#ifdef DRM_CLIENT_CAP_ATOMIC + drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1); +#endif plane_resources = drmModeGetPlaneResources(display->drm_fd); igt_assert(plane_resources);