From patchwork Fri Jul 20 20:42:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538289 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 9C6C56029B for ; Fri, 20 Jul 2018 20:43:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AF0228E91 for ; Fri, 20 Jul 2018 20:43:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E33628E92; Fri, 20 Jul 2018 20:43:41 +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 1FBF228ECC for ; Fri, 20 Jul 2018 20:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728374AbeGTVdf (ORCPT ); Fri, 20 Jul 2018 17:33:35 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:33004 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbeGTVdf (ORCPT ); Fri, 20 Jul 2018 17:33:35 -0400 Received: by mail-yw0-f195.google.com with SMTP id c135-v6so4818828ywa.0 for ; Fri, 20 Jul 2018 13:43:39 -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=Ri+olAK6CTBNtad7fxsq37l8ZTzhn1LKtE/2ZrZFf0o=; b=GbQFMCTodMCb7bKy0n0EPgWZoQZHISflT1jZurgI1nrkrKbp+SKb5BRUwHi86w9Bkq J0ufBv5LBGkoNgJJdkshlPcok7Xjizj2YT8xZFffyprGkJ9N9ZYGkMRywzx/XnEouOr8 X83nQ9Pn8uug67+vqCFgB2iHdp+Vatd7bKMQ4= 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=Ri+olAK6CTBNtad7fxsq37l8ZTzhn1LKtE/2ZrZFf0o=; b=aihhnzA/FdBlrirfO2d1AhQ5+TLS08Glen+DWLaEAJSLBzlkPaJHMYblR0IKCYMfch AbtovfrscER4QC3Mvw2IqfNrXErXt/x/fjbHrdkGp6fsGdro9fF52G4wxijIYT6BaVnG kCqLyBiaqK6/TtVsTDK3LG7V5d3awOicjn3Bd47OFEDGIaWVKrEWD7nEusoGfGFlz7Pz S+YsRPiR60j1MWRxpCeT2V/VM1tBw2Y21idA0NMTbkbfaPRKWrzPJSXw2fuU9oIKvFry B9eA0mOzZTs6uZ2JzVTZLPsjUY+WAOtQVKAQ54S1vs0UJHb3bczP0C1sKPOB08wQw5Qr zxAw== X-Gm-Message-State: AOUpUlFEybL1vWjiTNUFslgNaB8uG7LQLs+kdMUgdRYbxTZ2s+VofnBw kO0cYLuydKhINXIkARRtuUa+uw== X-Google-Smtp-Source: AAOMgpdVE4ebJUFtbE7aNLZG08JFbTY5p0ku0ROCmV6AiCsFcQw2gp1TY6J2+KjoXw5CVR1ExlSowQ== X-Received: by 2002:a81:20c2:: with SMTP id g185-v6mr1798889ywg.303.1532119418836; Fri, 20 Jul 2018 13:43:38 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id a2-v6sm2453831ywm.7.2018.07.20.13.43.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:43:38 -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 v3 03/19] drm: add msm compressed format modifiers Date: Fri, 20 Jul 2018 16:42:54 -0400 Message-Id: <20180720204315.19054-4-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: <20180720204315.19054-1-seanpaul@chromium.org> References: <20180720204315.19054-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. Changes in v3: - Removed duplicate entry for DRM_FORMAT_MOD_QCOM_COMPRESSED (Rob Clark) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul --- include/uapi/drm/drm_fourcc.h | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index e04613d30a13..1c9a6bf8c81e 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -298,6 +298,43 @@ 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. + * + * 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) + +/* + * 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 */ /*