From patchwork Fri Mar 28 12:31:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 3903031 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9033CBF540 for ; Fri, 28 Mar 2014 12:31:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CAB92202B8 for ; Fri, 28 Mar 2014 12:31:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C7593202FE for ; Fri, 28 Mar 2014 12:31:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C0776E9D6; Fri, 28 Mar 2014 05:31:12 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 9194A6E9D6; Fri, 28 Mar 2014 05:31:10 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 28 Mar 2014 05:26:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,750,1389772800"; d="scan'208";a="509636257" Received: from unknown (HELO strange.amr.corp.intel.com) ([10.255.12.18]) by orsmga002.jf.intel.com with ESMTP; 28 Mar 2014 05:31:07 -0700 From: Damien Lespiau To: dri-devel@lists.freedesktop.org Date: Fri, 28 Mar 2014 12:31:05 +0000 Message-Id: <1396009865-20424-1-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 Cc: Alex Deucher , intel-gfx@lists.freedesktop.org, Sagar Kamble Subject: [Intel-gfx] [PATCH] drm: Specify a bit more the DRM_CAP_CURSOR_{WIDTH, HEIGHT} caps X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.6 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 Earlier this week, there was a bit of confusion about those new capabilities, to the point I think it's better to document the intention and API contract. The comment documents the current situation: - the radeon driver returns the only valid size for the hw - i915 returns the maximun cursor size - other drivers fall back to returning 64x64 The common contract is to return a valid cursor size. Cc: Sagar Kamble Cc: Chris Wilson Cc: Alex Deucher Cc: Imre Deak Signed-off-by: Damien Lespiau Reviewed-by: Chris Wilson Reviewed-by: Alex Deucher --- include/uapi/drm/drm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index b06c8ed..ec6b259 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -619,6 +619,15 @@ struct drm_gem_open { #define DRM_PRIME_CAP_EXPORT 0x2 #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 +/* + * The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight + * combination for the hardware cursor. The intention is that a hardware + * agnostic userspace can query a cursor plane size to use. + * + * Note that the cross-driver contract is to merely return a valid size; + * drivers are free to attach another meaning on top, eg. i915 returns the + * maximum plane size. + */ #define DRM_CAP_CURSOR_WIDTH 0x8 #define DRM_CAP_CURSOR_HEIGHT 0x9