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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 1C60FC2BA15 for ; Sat, 4 Apr 2020 00:22:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E019D206F6 for ; Sat, 4 Apr 2020 00:22:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vYWyy3ee" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E019D206F6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 500956ECC8; Sat, 4 Apr 2020 00:22:00 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49B146ECC8 for ; Sat, 4 Apr 2020 00:21:58 +0000 (UTC) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 42F24321; Sat, 4 Apr 2020 02:21:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585959716; bh=yISGOexUXpRvRg7Jt5xQI1yOLeEob8QXDDqtcGTJvyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vYWyy3eeKnYr9FAklrONkxYQAFjBLYd7UyMzBgv6dN8niEc4/SKwnSgcD+mlBhNbs COoXW/6KLF3K+2D6YCvDN1y4z2UsaLo68L0Wk3AW0WWgH6AdCguyS3MHG6OcaBWQSD zmgDovrDYEkZQpqgZhwFsa0ta13nownChq1TxE6Y= Date: Sat, 4 Apr 2020 03:21:47 +0300 From: Laurent Pinchart To: Sakari Ailus Subject: Re: [PATCH v2 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs Message-ID: <20200404002147.GG9690@pendragon.ideasonboard.com> References: <20200403091156.7814-1-sakari.ailus@linux.intel.com> <1105bfe5-88f1-040e-db40-54d7761747d5@rasmusvillemoes.dk> <20200403193242.38611906@coco.lan> <2751400ae13b25d8259a8a9d7b36caf98ec2d367.camel@perches.com> <20200404001425.GC4394@kekkonen.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200404001425.GC4394@kekkonen.localdomain> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , Dave Stevenson , Mauro Carvalho Chehab , Rasmus Villemoes , Linux Kernel Mailing List , dri-devel , Hans Verkuil , Sergey Senozhatsky , Andy Shevchenko , Steven Rostedt , Joe Perches , Andy Shevchenko , Linux Media Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Sakari, On Sat, Apr 04, 2020 at 03:14:25AM +0300, Sakari Ailus wrote: > On Fri, Apr 03, 2020 at 09:32:42PM +0300, Andy Shevchenko wrote: > > On Fri, Apr 3, 2020 at 8:54 PM Joe Perches wrote: > > > On Fri, 2020-04-03 at 19:32 +0200, Mauro Carvalho Chehab wrote: > > > > Em Fri, 03 Apr 2020 09:56:42 -0700 > > > > Joe Perches escreveu: > > > > > It _might_ be useful to use a CONFIG_MEDIA_SUPPORT guard > > > in lib/vsprintf for this. > > > > No need. FourCC, if Sakari makes it more generic, can be used for > > other purposes, e.g. printing component names from the chips (not > > related to media at all). > > Could you elaborate? > > This could be already used on DRM, presumably, and that does not depend on > CONFIG_MEDIA_SUPPORT. I don't know how much there would be a need for that, > though, but this remains a possibility. /** * drm_get_format_name - fill a string with a drm fourcc format's name * @format: format to compute name of * @buf: caller-supplied buffer */ const char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf) { snprintf(buf->str, sizeof(buf->str), "%c%c%c%c %s-endian (0x%08x)", printable_char(format & 0xff), printable_char((format >> 8) & 0xff), printable_char((format >> 16) & 0xff), printable_char((format >> 24) & 0x7f), format & DRM_FORMAT_BIG_ENDIAN ? "big" : "little", format); return buf->str; } EXPORT_SYMBOL(drm_get_format_name); I'm not advocating for one approach or the other in this case, but we should standardize 4CC printing between the two subsystems. -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel