From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 517DCC433E0 for ; Wed, 17 Feb 2021 13:40:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2790764E45 for ; Wed, 17 Feb 2021 13:40:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233171AbhBQNke (ORCPT ); Wed, 17 Feb 2021 08:40:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:41796 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbhBQNfQ (ORCPT ); Wed, 17 Feb 2021 08:35:16 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A3E20B760; Wed, 17 Feb 2021 13:34:34 +0000 (UTC) Date: Wed, 17 Feb 2021 14:34:34 +0100 Message-ID: From: Takashi Iwai To: Luis Chamberlain Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 1/4] firmware: Add the support for ZSTD-compressed firmware files In-Reply-To: <20210217132419.GN4332@42.do-not-panic.com> References: <20210127154939.13288-1-tiwai@suse.de> <20210127154939.13288-2-tiwai@suse.de> <20210217132419.GN4332@42.do-not-panic.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Feb 2021 14:24:19 +0100, Luis Chamberlain wrote: > > On Wed, Jan 27, 2021 at 04:49:36PM +0100, Takashi Iwai wrote: > > Due to the popular demands on ZSTD, here is a patch to add a support > > of ZSTD-compressed firmware files via the direct firmware loader. > > It's just like XZ-compressed file support, providing a decompressor > > with ZSTD. Since ZSTD API can give the decompression size beforehand, > > the code is even simpler than XZ. > > > > Signed-off-by: Takashi Iwai > > It also occurs to me that having a simple like #define HAVE_FIRMWARE_COMPRESS_ZSTD > on include/linux/firmware.h would enable userspace to be aware (if they > have kernel sources) to determine if the kernels supports this format. Extending that idea, we might want to have a sysfs entry showing the supported formats instead? This will allow to judge dynamically. thanks, Takashi