From patchwork Fri Feb 15 17:01:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Francis, David" X-Patchwork-Id: 10815455 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 080A81390 for ; Fri, 15 Feb 2019 17:01:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E998B2FC73 for ; Fri, 15 Feb 2019 17:01:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6FFF2FC84; Fri, 15 Feb 2019 17:01:43 +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=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 B08412FC73 for ; Fri, 15 Feb 2019 17:01:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B5806ECA5; Fri, 15 Feb 2019 17:01:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750081.outbound.protection.outlook.com [40.107.75.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFADB6ECA1; Fri, 15 Feb 2019 17:01:38 +0000 (UTC) Received: from DM3PR12CA0117.namprd12.prod.outlook.com (2603:10b6:0:51::13) by SN1PR12MB0592.namprd12.prod.outlook.com (2a01:111:e400:c429::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.18; Fri, 15 Feb 2019 17:01:37 +0000 Received: from CO1NAM03FT026.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by DM3PR12CA0117.outlook.office365.com (2603:10b6:0:51::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1622.16 via Frontend Transport; Fri, 15 Feb 2019 17:01:37 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 165.204.84.17 as permitted sender) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT026.mail.protection.outlook.com (10.152.80.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1580.10 via Frontend Transport; Fri, 15 Feb 2019 17:01:36 +0000 Received: from localhost.localdomain (10.180.168.240) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Fri, 15 Feb 2019 11:01:35 -0600 From: David Francis To: Subject: [PATCH v2 0/3] Make DRM DSC helpers more generally usable Date: Fri, 15 Feb 2019 12:01:29 -0500 Message-ID: <20190215170132.11224-1-David.Francis@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(136003)(346002)(396003)(376002)(39850400004)(2980300002)(199004)(189003)(36756003)(2906002)(2351001)(54906003)(1076003)(316002)(68736007)(6916009)(105596002)(16586007)(106466001)(50466002)(426003)(48376002)(53936002)(305945005)(86362001)(478600001)(49486002)(8936002)(51416003)(186003)(486006)(104016004)(217873002)(14444005)(77096007)(2616005)(81156014)(4326008)(126002)(26005)(81166006)(47776003)(50226002)(4744005)(6666004)(336012)(72206003)(97736004)(8676002)(476003)(356004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0592; H:SATLEXCHOV02.amd.com; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58b3886a-dd1e-4f1f-6588-08d693673f16 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060); SRVR:SN1PR12MB0592; X-MS-TrafficTypeDiagnostic: SN1PR12MB0592: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0592; 20:6FT+5vPC7ubPXWO0ZZmSEEEaSmykIs542GLx7zyr6bJ2jd+5jx1fZkiId/xv428ckcrvSb6hSvZgT1/D6Is+KTlj8uETE8GpVFVrmkHSFB99RsfAU9Z1bU6JFS+FGSGnVnTaVM/d0ChmpzGOYJJAYwNEss9X/Lbsok/mZbb1eFbcbFbm6u4MA6CfBA+2+wQjWuaxlB/zlpXIIdDp34HiAtpg5X6EQxn1kp3fkbdFVmFczM4DUw+QEkbgIIsnd3Z3JHOEX4HFAVwAKpBNJN96UW0T4JkrvsE515IVz3HbVDMV7jbgaCATs0wz/d2ohHBjIdHjs4uokkUS56nlF+gtVv0wat2PuAc6NYnoviMaZXiUKeK5LkM7rBmZhcPkMvhx9X0Y5cC6nMHib10KH0FzSsbHJ1DTl4zMTQ2irM+PcAhe9op2TjGDbQwEYrGXxg99padyIx27XMB4UA8a8MhcJdCgdeR+odrw7hvEuUkFf8HKNdPwgc0jcIgleGLt44oA X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 09497C15EB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0592; 23:0sBlDYlIz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mdWbRaS4sDHdgGVuYzs/fKGTBEkUHJMvGGnwJ+e1a02Mik8DZv2ii3LuVLfrKITchp51Nnb/YL X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: GmpOMil9VvUBSpgxehUaHy0DLKEHKibKlxtf9RfBrEBkc9PiRjwvFT5DZZRwUlyPI01ncgoJIKu6mDe2sizkAQogZbHO1uMTrInMy1XMUeH1MMW5QCyItKSRhodcvKOdksETMUWLr/s7d2Z+6yKrViVmtUdLrQjI8vUuz43xk6NADhLKpY+tERNLKkMOmKnkTA+tdqXTg/dJjwxgI6OthN2bBV7aJ35TEjhcG75KegT0JYeD3g8XrW1bruT7OV6G9LcqSEBW5ehBDGXVWl+d3jsCneFK11YBIdxYKqpYhVZzjGXClVGKjSqcTZxWYziZFNrXN1TSQNTvNR8NmqIvaD27ojhCf8+r58EaZSGIUYdT6CMiEOZUJP/NdN7JrX41Eu70TmnNCySikdxUh/Z+nFdmXt9tvOaleTAJLeYIKfk= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0592; 20:Mx0ErXY+lo13Y75aMD3kFkpUd8wkz7eNIBAp4GhJU/G7UfmveTAS3IS8hYL5pPMIERz35vf0K+g9ElyND9n4K+1PzWKdZlqmnbCrQDx0mtIL7JbLzrmdpzWuu8SQ379S3teZsEmUS4AEc6e33oQy2Z6bO1RQ/QyvR6m6Q6Yk3I5SpnRbK7yEmBnM4X27wQnr5f30IJdCRCfyspAEu6fCLvxOliivd1K9vahBVQEdLsgq9YCUA5qEK2sGwqz0+Q6B X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2019 17:01:36.3496 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58b3886a-dd1e-4f1f-6588-08d693673f16 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0592 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VTSTgnpFlBMyBO/Lu4OqyD0gO+vtQd6H8e4Ij1H6Gyk=; b=o4ek/pWbnZ+0+xaC1LU6gbSlK77XFigaitOIiyTqe5Av8D7JGqGCdTC6/q005YJBYUU5eWBJ8rtBiPn01dTh2NU1NhWSoBXinzmJl8j/2jpmiLBpHlK7Rqo0lfypwimO1SBgC1OOu6S4ntqMBY0CXH8sv+ywBtozAqwE0kmfwzM= X-Mailman-Original-Authentication-Results: spf=softfail (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; 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: intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, nikola.cornij@amd.com, manasi.d.navare@intel.com, David Francis Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP drm_dsc could use some work so that drm drivers other than i915 can make use of it their own DSC implementations Move rc compute, a function that forms part of the DSC spec, into drm. Update it to DSC 1.2. Also split the PPS packing and SDP header init functions, to allow for drivers with their own SDP struct headers v2: Rebase onto drm-next Refactor drm_dsc_dp_pps_header_init Clean up documentation on new drm function David Francis (3): drm/i915: Move dsc rate params compute into drm drm/dsc: Add native 420 and 422 support to compute_rc_params drm/dsc: Split DSC PPS and SDP header initialisations drivers/gpu/drm/drm_dsc.c | 269 +++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_vdsc.c | 133 +-------------- include/drm/drm_dsc.h | 9 +- 3 files changed, 219 insertions(+), 192 deletions(-)