Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2188216pxb; Sat, 14 Nov 2020 17:17:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwB4eHHX5/Eoa8IQMDRfj6mPwciu2XSRFjtJxRffmjAcNWQJkbWJ+OPS70NWdmZZpRHdHT X-Received: by 2002:a17:906:d72:: with SMTP id s18mr8907372ejh.110.1605403027982; Sat, 14 Nov 2020 17:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605403027; cv=none; d=google.com; s=arc-20160816; b=n1dLuaac5R2mj3awvoIiHsuxl/PTAP6yMsw33KgcDlpwGLDIFl3+sPzb+OGWzArdJO YuIVg1ccVCFHhfEqM9qGewvdUsTNCEezIWGkYKUfnSlOULmwenoqPA2ko5nJmY4zAv9o iog62ec1jwYwsMn1j/pVVTSQeLlWPB5ojcr3mpgHoonypVtxE+VE4L6fup3hueChkrXS TvEzECLm34sfoBSb4ARoqfGJpgMf5gzpSOAeXthOMTe/fz71jz0KSS+UTJUHt4do2ebo DIFJBqAj/7H9PNxO4SlFHbrg6MDHW1w9BE/vqcbXCzfnLQYPNT/qsYqy1Z26YB6zn0ST V7+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=IkawYPMV301+aYXAyocoPPmb1jMA64IMdAR4/kKs4QQ=; b=oJvtWFQIT/zxVDjh92xA7ARvV5jqbmEe1yeRiIcuWYPotJ62mIXu9ci430MA1FmwQp ZRr4yPdDNsSBrgNoPaD2/caTD30CZ8VNnVzPYw82VgmQPNQHH8Yn1Pl0JgRdvgYGQPca PXI0zEgGbe+AvxCSYU/vOqsIu3M/+NHzUzt90IzJM/riaopvMKsmfUHC8oGlhmLXndK6 GlLtY/MHataeA6/ykTDN4Lxpkt8ERMIQUqlSXL18MOezeQPW1T8qx32/Zeir4y6fAJ58 439INrRdiLrV0hedI1q1gejoEl77szl43/KVMRidarQIlh8H0rCbRvtNrCvs4Zw/1HS7 7dqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq7si8815717ejb.212.2020.11.14.17.16.45; Sat, 14 Nov 2020 17:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbgKOBMl (ORCPT + 99 others); Sat, 14 Nov 2020 20:12:41 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45744 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbgKOBMl (ORCPT ); Sat, 14 Nov 2020 20:12:41 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id D82461F47E3B Message-ID: Subject: Re: [PATCH v2 3/9] media: Rename stateful codec control macros From: Ezequiel Garcia To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@collabora.com, Jonas Karlman , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec Date: Sat, 14 Nov 2020 22:12:25 -0300 In-Reply-To: <5b563695-bb40-8309-042b-10c6910d773c@xs4all.nl> References: <20201113215121.505173-1-ezequiel@collabora.com> <20201113215121.505173-4-ezequiel@collabora.com> <5b563695-bb40-8309-042b-10c6910d773c@xs4all.nl> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-11-14 at 13:53 +0100, Hans Verkuil wrote: > On 13/11/2020 22:51, Ezequiel Garcia wrote: > > For historical reasons, stateful codec controls are named > > as {}_MPEG_{}. While we can't at this point sanely > > change all control IDs (such as V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER), > > we can least change the more meaningful macros such as classes > > macros. > > > > Signed-off-by: Ezequiel Garcia > > --- > > .../userspace-api/media/v4l/dev-mem2mem.rst | 2 +- > > .../media/v4l/ext-ctrls-codec.rst | 4 +- > > .../media/v4l/extended-controls.rst | 8 +- > > .../media/v4l/vidioc-g-ext-ctrls.rst | 6 +- > > drivers/media/common/cx2341x.c | 4 +- > > drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +- > > drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 2 +- > > drivers/media/v4l2-core/v4l2-ctrls.c | 4 +- > > include/media/fwht-ctrls.h | 2 +- > > include/media/h264-ctrls.h | 16 +- > > include/media/hevc-ctrls.h | 10 +- > > include/media/mpeg2-ctrls.h | 4 +- > > include/media/vp8-ctrls.h | 2 +- > > include/uapi/linux/v4l2-controls.h | 409 +++++++++--------- > > 14 files changed, 242 insertions(+), 233 deletions(-) > > > > > > > @@ -1177,4 +1177,13 @@ enum v4l2_detect_md_mode { > > #define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) > > #define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) > > > > +/* MPEG-compression definitions kept for backwards compatibility */ > > +#ifndef __KERNEL__ > > +#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC > > +#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) > > +#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) > > +#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) > > +#define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100) > > Don't copy the offset value here, just keep this as a straight aliases, e.g.: > > #define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE > > It's safer that way. > Yes, indeed. Thanks, Ezequiel