From patchwork Thu Jan 12 00:51:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 9511687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 04B5360710 for ; Thu, 12 Jan 2017 00:53:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBFD128641 for ; Thu, 12 Jan 2017 00:53:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0B862868C; Thu, 12 Jan 2017 00:53:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A5AB928641 for ; Thu, 12 Jan 2017 00:53:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 171EB6EAD3; Thu, 12 Jan 2017 00:53:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.bwidawsk.net (zangief.bwidawsk.net [107.170.211.233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C56B6EAD2; Thu, 12 Jan 2017 00:53:18 +0000 (UTC) Received: by mail.bwidawsk.net (Postfix, from userid 5001) id D3C9C122A4E; Wed, 11 Jan 2017 16:53:17 -0800 (PST) Received: from adkins.localdomain (c-73-37-61-163.hsd1.or.comcast.net [73.37.61.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.bwidawsk.net (Postfix) with ESMTPSA id E722112287B; Wed, 11 Jan 2017 16:53:03 -0800 (PST) From: Ben Widawsky To: Intel GFX , DRI Development Date: Wed, 11 Jan 2017 16:51:18 -0800 Message-Id: <20170112005118.19146-4-ben@bwidawsk.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170112005118.19146-1-ben@bwidawsk.net> References: <20170112005118.19146-1-ben@bwidawsk.net> MIME-Version: 1.0 Cc: Ben Widawsky Subject: [Intel-gfx] [PATCH 3/3] drm/i915: Add support for GET_PLANE2 CCS modifiers 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Kristian Høgsberg Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_display.c | 10 ++++++++-- drivers/gpu/drm/i915/intel_sprite.c | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 26f3a911b999..cf1b19447af1 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -97,6 +97,8 @@ static const uint32_t skl_primary_formats[] = { }; static const uint64_t skl_format_modifiers[] = { + I915_FORMAT_MOD_Yf_TILED_CCS, + I915_FORMAT_MOD_Y_TILED_CCS, I915_FORMAT_MOD_Y_TILED, I915_FORMAT_MOD_X_TILED, DRM_FORMAT_MOD_INVALID @@ -15225,15 +15227,19 @@ static bool skl_mod_supported(uint32_t format, uint64_t modifier) switch (format) { case DRM_FORMAT_C8: case DRM_FORMAT_RGB565: + return modifier == I915_FORMAT_MOD_Y_TILED || + modifier == I915_FORMAT_MOD_X_TILED; case DRM_FORMAT_XRGB8888: case DRM_FORMAT_XBGR8888: case DRM_FORMAT_ARGB8888: case DRM_FORMAT_ABGR8888: - return modifier == I915_FORMAT_MOD_Y_TILED || + return modifier == I915_FORMAT_MOD_Yf_TILED_CCS || + modifier == I915_FORMAT_MOD_Y_TILED_CCS || + modifier == I915_FORMAT_MOD_Y_TILED || modifier == I915_FORMAT_MOD_X_TILED; case DRM_FORMAT_XRGB2101010: case DRM_FORMAT_XBGR2101010: - return modifier == I915_FORMAT_MOD_X_TILED; + return modifier == I915_FORMAT_MOD_X_TILED; case DRM_FORMAT_YUYV: case DRM_FORMAT_YVYU: case DRM_FORMAT_UYVY: diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 152ec8196d41..eed7195212b7 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -1045,6 +1045,8 @@ static uint32_t skl_plane_formats[] = { }; static const uint64_t skl_plane_format_modifiers[] = { + I915_FORMAT_MOD_Yf_TILED_CCS, + I915_FORMAT_MOD_Y_TILED_CCS, I915_FORMAT_MOD_Y_TILED, I915_FORMAT_MOD_X_TILED, DRM_FORMAT_MOD_INVALID