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: 10545995 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-2.web.codeaurora.org (Postfix) with ESMTP id DFE1714E0 for ; Thu, 26 Jul 2018 14:43:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE3882B26D for ; Thu, 26 Jul 2018 14:43:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C21BB2B41E; Thu, 26 Jul 2018 14:43:23 +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 B0B852B26D for ; Thu, 26 Jul 2018 14:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731047AbeGZQAc (ORCPT ); Thu, 26 Jul 2018 12:00:32 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:45519 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729511AbeGZQAc (ORCPT ); Thu, 26 Jul 2018 12:00:32 -0400 Received: by mail-yw0-f193.google.com with SMTP id 139-v6so654028ywg.12 for ; Thu, 26 Jul 2018 07:43:21 -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=AxREyDoeY+SxF4xxld71Dpey0YyAhF00PkSYwrUSnUg=; b=Yw1ATQoBrLnIvNVqJZxFMPtdYoZuxAaaZKQFZ0e8rj10QkG2S/e5q1YSZddF1U3zqt Q/VYeT8ysuqwn+hgy9+JjvtsznM4l05zhBIIQAZZx7bjS4Ia588dYC4U7HS2t5FnLVzv kO9TxECgSDCsLoj6HGs20XPPZIigXVPFCJllk= 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=SwOIjEVBgMc5pRnH0WmSeDb2L/GUbgSP2NSqQKN23xwOkU7gheuOsu1R3L/D8Ko7A/ fW8ouwibrUQV7DCK1k7ouN+f2Da1Af7dMGQLvvF4c99LpVh3l0Ywcx6Zo0bWIffEy6e7 8AG5R3NK1hZ5PGQi7GMcrLBN/LeXVYz1IKSuhz+02TxzgP9BcA/7DZft//1EzU011f1+ +0RHf/SF0pgILT1+NgGWYaEunjOyuBMyjFj2TXAzorhM+rulw+DlqjMa8JZb4nxwd6se k2yAIMFuA8lhHsNDm1/KVIisnSTtI//AnTIfFjrc6jmZzmqOzO7NSgAqE67eAafjE0ea /b+A== X-Gm-Message-State: AOUpUlEjUPbeWKbn16UxllusP0EHENIY66f+rvvIcRqH3uLKl5bVBvR4 SbqixopyCWwc0AkW+rJQ3PRJpg== 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 Cc: Jeykumar Sankaran , Stanimir Varbanov , Sean Paul , Abhinav Kumar , Archit Taneja , chandanu@codeaurora.org, Jordan Crouse , ryadav@codeaurora.org, Sravanthi Kollukuduru , dri-devel , David Airlie , freedreno , linux-arm-msm , nganji@codeaurora.org, "Kristian H. Kristensen" , dovizu@chromium.org, Rob Herring , Gustavo Padovan , Maarten Lankhorst , Rob Clark 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: To: unlisted-recipients:; (no To-header on input) 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) 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 */ /*