From patchwork Mon Jul 9 17:31:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10515339 X-Patchwork-Delegate: agross@codeaurora.org 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 0BFAB600CA for ; Mon, 9 Jul 2018 17:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E86B528DC4 for ; Mon, 9 Jul 2018 17:32:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCA7D28DD2; Mon, 9 Jul 2018 17:32:57 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E49F28DC4 for ; Mon, 9 Jul 2018 17:32:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933788AbeGIRcz (ORCPT ); Mon, 9 Jul 2018 13:32:55 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:44699 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933617AbeGIRcy (ORCPT ); Mon, 9 Jul 2018 13:32:54 -0400 Received: by mail-yb0-f194.google.com with SMTP id a2-v6so7494693ybe.11 for ; Mon, 09 Jul 2018 10:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6C6SPCXeXS+tv9urLckLPVj2lJneL47ybmIOu+Rw878=; b=gYMObSyJ2VBrFRyEo401WhDn7XiW2S184jRAh7tuocsH2IPAMLS1LpikcwGq37OexA hhlgR0wuLAHLhV1ECFgJbB088/XXVHi80t74t++oStqNRVuAMgmKn3pX32qd5TVcW1rc VoHPwMpipfHHdzbKg1yDbc105nd8ZLbnn90rE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6C6SPCXeXS+tv9urLckLPVj2lJneL47ybmIOu+Rw878=; b=E4czT+HGBGGutw/jZRFVssLly2/hZDgavaABEIexFglKGXTzLcLHvtJVNZqF+M3ClT wzNKwzp3DgNvFgro989DWKHX5WeBLhr8rKeAlV7+46uT5zOkF2572Eqy5qD3FV1b6U+n 01vWglP0j8x3YQXUG5byZC6jWFG+qrG7RHNN2yfAj8lgT3r4V/GP2Y1zzdVXLArUDisM FZxsuMC7Hl5xQXK+sUVTRtWZ+7kFWR4beSBofBltYu84vuWY0dpGvEWtuC6HZ14H+YVg 7bAVTzmnaYpEB0UaxWfOLTHl7QfQznUbKCFhQxxf2AUpz4/l0Wx1OClVObunfmNF7X6e zFTw== X-Gm-Message-State: APt69E2rAGjtZONN7+Ps39Kh1s4+Wj27KtOQGcdCHcMbD45t1ef4J/Yq Fh5ZANPFpHpch4YuIFDSMP4Vcw== X-Google-Smtp-Source: AAOMgpcNWpv/aVxaBBHteW6E0eRIzswNl297sQFV4qWMqq5LVJr6xlYJ3HSp0LaK/Avzm5YXniCMcQ== X-Received: by 2002:a25:8581:: with SMTP id x1-v6mr11352449ybk.233.1531157573869; Mon, 09 Jul 2018 10:32:53 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id s206-v6sm5885495ywc.55.2018.07.09.10.32.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:32:53 -0700 (PDT) From: Sean Paul To: abhinavk@codeaurora.org, architt@codeaurora.org, chandanu@codeaurora.org, jsanka@codeaurora.org, jcrouse@codeaurora.org, ryadav@codeaurora.org, seanpaul@chromium.org, skolluku@codeaurora.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, airlied@linux.ie, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, nganji@codeaurora.org, hoegsberg@chromium.org, dovizu@chromium.org, robh+dt@kernel.org Cc: Gustavo Padovan , Maarten Lankhorst Subject: [PATCH 04/21] drm: add msm compressed format modifiers Date: Mon, 9 Jul 2018 13:31:40 -0400 Message-Id: <20180709173200.238457-5-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180709173200.238457-1-seanpaul@chromium.org> References: <20180709173200.238457-1-seanpaul@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeykumar Sankaran 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. Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul --- include/uapi/drm/drm_fourcc.h | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index e04613d30a13..9a97405a3d2a 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -298,6 +298,38 @@ extern "C" { */ #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) +/* + * Qualcomm Compressed Format + * + * Refers to a compressed variant of the base format that is compressed. + * Implementation may be platform and base-format specific. + */ +#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1) + +/* + * QTI DX Format + * + * Refers to a DX variant of the base format. + * Implementation may be platform and base-format specific. + */ +#define DRM_FORMAT_MOD_QCOM_DX fourcc_mod_code(QCOM, 0x2) + +/* + * QTI Tight Format + * + * Refers to a tightly packed variant of the base format. + * Implementation may be platform and base-format specific. + */ +#define DRM_FORMAT_MOD_QCOM_TIGHT fourcc_mod_code(QCOM, 0x4) + +/* + * QTI Tile Format + * + * Refers to a tile variant of the base format. + * Implementation may be platform and base-format specific. + */ +#define DRM_FORMAT_MOD_QCOM_TILE fourcc_mod_code(QCOM, 0x8) + /* Vivante framebuffer modifiers */ /* @@ -405,6 +437,19 @@ extern "C" { */ #define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 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) + #if defined(__cplusplus) } #endif