From patchwork Thu Jul 26 14:43:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10545997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A00609093 for ; Thu, 26 Jul 2018 14:43:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EEB32B26D for ; Thu, 26 Jul 2018 14:43:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82EC82B41E; Thu, 26 Jul 2018 14:43:25 +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 8CD582B26D for ; Thu, 26 Jul 2018 14:43:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 770A76E78B; Thu, 26 Jul 2018 14:43:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x244.google.com (mail-yw0-x244.google.com [IPv6:2607:f8b0:4002:c05::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 78DA76E78B for ; Thu, 26 Jul 2018 14:43:21 +0000 (UTC) Received: by mail-yw0-x244.google.com with SMTP id r184-v6so656267ywg.6 for ; Thu, 26 Jul 2018 07:43:21 -0700 (PDT) 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=AxREyDoeY+SxF4xxld71Dpey0YyAhF00PkSYwrUSnUg=; b=WY2zb7JH74fgIBvaFgs7RssZyr7pEPkw9MEB96vIbQIuX1UxnHSYV9/Y07k8XFcPWl aidqcVIni1inuben4naf6VgQ9B0+lJcxS7osoE5vWlGo/B42Rpu4CB93ljFH2Xxe4WJ2 qb9mqwKeFtC6lViKTI9KFEwIvKCoxmAfNlEVxo0QsJPYTZtJUXuLWTJ14tKlSkeavPa0 pJdT5wE9lhJpigNlOpc1PtiWJEJIH5w4FNff2LpjsjDg11eL/kTpzx1bssKDEk43jh/A 8FRr7kdGHq6lJM/jEGihhQ0VPVcoK0yv8UcWcuT7wFLASIue3RKdF/e6OhmIr0R5jZFO OL/w== X-Gm-Message-State: AOUpUlF/dc4sla6f6EUmXZJLxggbUCfy2VutH3j1KoLBKxWoOybHgqV5 j7S+23tc+JeUR2A2u6LRicfW9A== X-Google-Smtp-Source: AAOMgpfBqggTW15q6JP7o26tVZorNg/bDfI4Opp/GXtrArdIQaHBv7alMSGfDh6b1y6za4R25c24iQ== X-Received: by 2002:a81:ef10:: with SMTP id o16-v6mr1059067ywm.171.1532616200713; Thu, 26 Jul 2018 07:43:20 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id f82-v6sm1406300ywf.58.2018.07.26.07.43.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 07:43:19 -0700 (PDT) From: Sean Paul To: Subject: [PATCH v4 03/19] drm: add msm compressed format modifiers Date: Thu, 26 Jul 2018 10:43:01 -0400 Message-Id: <20180726144318.22230-1-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: References: 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: ryadav@codeaurora.org, David Airlie , linux-arm-msm , dri-devel , Stanimir Varbanov , Abhinav Kumar , Rob Herring , Sravanthi Kollukuduru , dovizu@chromium.org, freedreno , "Kristian H. Kristensen" , chandanu@codeaurora.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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) Changes in v4: - Remove all modifiers aside from COMPRESSED, this includes tiled and 10-bit Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark --- include/uapi/drm/drm_fourcc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index d43949b5bb3e..721ab7e54d96 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -299,6 +299,19 @@ 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) + /* Vivante framebuffer modifiers */ /*