Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp513767pxa; Wed, 19 Aug 2020 07:39:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0JFOwtXn4dWFYGDiOT9b/Ioz2OBYiAJuxs2rC3YywyZpWGWyqc3Avo1gXuZWHmH+Cmm1b X-Received: by 2002:a50:d942:: with SMTP id u2mr25987506edj.0.1597847986314; Wed, 19 Aug 2020 07:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597847986; cv=none; d=google.com; s=arc-20160816; b=ivdlss4HMxY4CBdkMnzg92y4x3Q6d6PCSPZviSpfl+g29VueY8eREJS/4IVfOIoXdN cZa+JE8NOw9tPvC5m/4mWzZDJuJjopLydwOOmXa2NjB9IG+LTxlaK0ypJwM+B8hPU/Yr FCrZjZZQj8iNbGZlTkDYG+1IV6dJdKFReO5jlGpT8MVCUsPXVcjQjtNyA3fVXEYtZJZq jb/1iCppZ8TlDALpCUr46tSFpHDX1kq7FToo81wlt/cRmifuTWp/xIdmhxQ+qgYKQppS zAqtg0S0ik9lg7UwqsWFTQUIiH2E3W/EkCTeosOrvMVBWGcWw6pInvTMLVZbtIR4984b UNKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QNbPzZX2GtVh6G2hTMWIWD9KAP618DeoqysCGM2Uipg=; b=bO1tt9U0+JtTaKCNvKRFpTP37LHmPJW/+4tfeE2VxERyHQKLxVbGeMFXfMakZFrIC8 6OlQDqPelpQAojNro8FeBUWYdJuEfV3ocTq6pTUIs2dnrjK6V1yJJdm66s3FPA2y8FOT DJkYCXlKB0z93PLTQNmmUsJ5h9Wreifsx8fuGjnkxMOc1SKzjjV0ULCtSiAdvAApd9Bz ssaKivLBm6DCiphQM8x37+VAv46Rkp+8F1rgEXA15fNYV9Kg2dqQQGC6XanxBZlBwEFq lPDGv+EDEXwf3lLjTI5ylP/hNBazbkKUVk71mR4oh/lcOUW1FAnFM7Lm1cfjA3InYIgW 3ASQ== 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 w13si15913311edr.565.2020.08.19.07.39.21; Wed, 19 Aug 2020 07:39:46 -0700 (PDT) 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 S1728638AbgHSOiN (ORCPT + 99 others); Wed, 19 Aug 2020 10:38:13 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45700 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727854AbgHSOiJ (ORCPT ); Wed, 19 Aug 2020 10:38:09 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id A4F2128CF67 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Jonas Karlman , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec , Ezequiel Garcia Subject: [PATCH v4] media: rkvdec: Drop unneeded per_request driver-specific control flag Date: Wed, 19 Aug 2020 11:37:55 -0300 Message-Id: <20200819143755.243103-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200814133634.95665-17-ezequiel@collabora.com> References: <20200814133634.95665-17-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, the drivers makes no distinction between per_request and mandatory, as both are used in the same request validate check. The driver only cares to know if a given control is required to be part of a request, so only one flag is needed. Signed-off-by: Ezequiel Garcia --- v4: * Drop 'mandatory' from DECODE_MODE and START_MODE. --- drivers/staging/media/rkvdec/rkvdec.c | 8 +------- drivers/staging/media/rkvdec/rkvdec.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 7c5129593921..9f59dfb62d3f 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -55,35 +55,29 @@ static const struct v4l2_ctrl_ops rkvdec_ctrl_ops = { static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = { { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SPS, .cfg.ops = &rkvdec_ctrl_ops, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_PPS, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX, }, { - .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE, .cfg.min = V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED, .cfg.max = V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED, .cfg.def = V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED, }, { - .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_START_CODE, .cfg.min = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, .cfg.def = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, @@ -615,7 +609,7 @@ static int rkvdec_request_validate(struct media_request *req) u32 id = ctrls->ctrls[i].cfg.id; struct v4l2_ctrl *ctrl; - if (!ctrls->ctrls[i].per_request || !ctrls->ctrls[i].mandatory) + if (!ctrls->ctrls[i].mandatory) continue; ctrl = v4l2_ctrl_request_hdl_ctrl_find(hdl, id); diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h index 2fc9f46b6910..77a137cca88e 100644 --- a/drivers/staging/media/rkvdec/rkvdec.h +++ b/drivers/staging/media/rkvdec/rkvdec.h @@ -25,7 +25,6 @@ struct rkvdec_ctx; struct rkvdec_ctrl_desc { - u32 per_request : 1; u32 mandatory : 1; struct v4l2_ctrl_config cfg; }; -- 2.27.0