From patchwork Fri Jun 29 20:16:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanmay Shah X-Patchwork-Id: 10498721 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 CF515602D6 for ; Sun, 1 Jul 2018 14:52:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE3F7288A9 for ; Sun, 1 Jul 2018 14:52:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B10CB2894E; Sun, 1 Jul 2018 14:52:09 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 6ECAE288A9 for ; Sun, 1 Jul 2018 14:52:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E52776E26B; Sun, 1 Jul 2018 14:51:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id A6C076F19A for ; Fri, 29 Jun 2018 20:16:35 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 890C660AFF; Fri, 29 Jun 2018 20:16:35 +0000 (UTC) Received: from linuxdisplay-lab-04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tanmay@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0AC9D6034E; Fri, 29 Jun 2018 20:16:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0AC9D6034E From: Tanmay Shah To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm v1 2/2] drm/fourcc: add msm compressed format modifiers Date: Fri, 29 Jun 2018 13:16:21 -0700 Message-Id: <1530303381-1138-2-git-send-email-tanmay@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530303381-1138-1-git-send-email-tanmay@codeaurora.org> References: <1530303381-1138-1-git-send-email-tanmay@codeaurora.org> X-Mailman-Approved-At: Sun, 01 Jul 2018 14:51:35 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tanmay Shah , ryadav@codeaurora.org, chandanu@codeaurora.org, manojavm@codeaurora.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Qualcomm Snapdragon chipsets uses compressed format to optimize BW across multiple IP's. This change adds needed modifier support in drm for a simple 4x4 tile based compressed variants of base formats. derived from kernel patch: https://patchwork.kernel.org/patch/10449533/ Signed-off-by: Tanmay Shah --- include/drm/drm_fourcc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index e04613d..85c6fe1 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -298,6 +298,19 @@ extern "C" { */ #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) +/* + * MSM compressed format + * + * Refers to the compressed variant of a base format. + * Implementation may be platform and base-format specific. + * + * Each macrotile consists of m x n (mostly 4 x 4) tiles. + * Pixel data pitch/stride is aligned with macrotile width. + * Pixel data height is aligned with macrotile height. + * Entire pixel data buffer is aligned with 4k(bytes). + */ +#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1) + /* Vivante framebuffer modifiers */ /*