From patchwork Mon Nov 6 12:25:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 741649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0996C0018A for ; Mon, 6 Nov 2023 12:26:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231778AbjKFM0g (ORCPT ); Mon, 6 Nov 2023 07:26:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231789AbjKFM0d (ORCPT ); Mon, 6 Nov 2023 07:26:33 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40605BD for ; Mon, 6 Nov 2023 04:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699273591; x=1730809591; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A+Yikjp17RNh7XDRe1iqOgzF4GMBKIVb59XO+1P9TVY=; b=ZHY9lSG64hmcxvtBwunJhlOItar5C875xUk/7/e6EN4Hb4CUI9RI1YvM uJvCTCgjOPtbEB/Se3BQBopnSADvQtZtI0eBPFB8vDmD40ZMnCgYA+CAq 4VsBEpI/5SiUyPCOPA+6KZKPWO5WUZWt+pamcdHK0RNtxWk7sF/hVy2+L vP5Ujjebly6B8ggaKvuCZddmFcR0aSbw35Z8GoAC5M8AnAWFU8poSgyMA lwu6w0tEAIrCGQr4LnuQ1sPHn/drIoSoIRCRs4WrwPS92LRdgoVL0R32Q btU5BElJpfZXJeeyogDhPihJc0/3cbUMJx04Zlgn0kPNgf+oFiFpC23CR g==; X-IronPort-AV: E=McAfee;i="6600,9927,10885"; a="475498646" X-IronPort-AV: E=Sophos;i="6.03,281,1694761200"; d="scan'208";a="475498646" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 04:26:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10885"; a="755836323" X-IronPort-AV: E=Sophos;i="6.03,281,1694761200"; d="scan'208";a="755836323" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 04:26:27 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 4DE401202BB; Mon, 6 Nov 2023 14:26:23 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Laurent Pinchart , tomi.valkeinen@ideasonboard.com, bingbu.cao@intel.com, hongju.wang@intel.com, hverkuil@xs4all.nl, Andrey Konovalov , Jacopo Mondi , Dmitry Perchanov , "Ng, Khai Wen" , Alain Volmat Subject: [PATCH v7 29/31] media: ccs: Remove which parameter from ccs_propagate Date: Mon, 6 Nov 2023 14:25:37 +0200 Message-Id: <20231106122539.1268265-30-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231106122539.1268265-1-sakari.ailus@linux.intel.com> References: <20231106122539.1268265-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org ccs_propagate() no longer stores information in the driver's context struct. The which parameter can thus be removed. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ccs/ccs-core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index dd3c5b655705..017b53c32d36 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -2292,8 +2292,7 @@ static int ccs_get_format(struct v4l2_subdev *subdev, /* Changes require propagation only on sink pad. */ static void ccs_propagate(struct v4l2_subdev *subdev, - struct v4l2_subdev_state *sd_state, int which, - int target) + struct v4l2_subdev_state *sd_state, int target) { struct ccs_subdev *ssd = to_ccs_subdev(subdev); struct v4l2_rect *comp, *crop; @@ -2500,7 +2499,7 @@ static int ccs_set_format(struct v4l2_subdev *subdev, crop->top = 0; crop->width = fmt->format.width; crop->height = fmt->format.height; - ccs_propagate(subdev, sd_state, fmt->which, V4L2_SEL_TGT_CROP); + ccs_propagate(subdev, sd_state, V4L2_SEL_TGT_CROP); return 0; } @@ -2715,7 +2714,7 @@ static int ccs_set_compose(struct v4l2_subdev *subdev, ccs_set_compose_scaler(subdev, sd_state, sel, sink_crop, comp); *comp = sel->r; - ccs_propagate(subdev, sd_state, sel->which, V4L2_SEL_TGT_COMPOSE); + ccs_propagate(subdev, sd_state, V4L2_SEL_TGT_COMPOSE); if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) return ccs_pll_blanking_update(sensor); @@ -2805,7 +2804,7 @@ static int ccs_set_crop(struct v4l2_subdev *subdev, *crop = sel->r; if (ssd != sensor->pixel_array && sel->pad == CCS_PAD_SINK) - ccs_propagate(subdev, sd_state, sel->which, V4L2_SEL_TGT_CROP); + ccs_propagate(subdev, sd_state, V4L2_SEL_TGT_CROP); return 0; } @@ -3335,7 +3334,6 @@ static int ccs_init_cfg(struct v4l2_subdev *sd, v4l2_subdev_state_get_format(sd_state, pad, CCS_STREAM_PIXEL); struct v4l2_rect *crop = v4l2_subdev_state_get_crop(sd_state, pad, CCS_STREAM_PIXEL); - bool is_active = !sd->active_state || sd->active_state == sd_state; ccs_get_native_size(ssd, crop); @@ -3353,7 +3351,7 @@ static int ccs_init_cfg(struct v4l2_subdev *sd, sensor->csi_format->code : sensor->internal_csi_format->code; fmt->field = V4L2_FIELD_NONE; - ccs_propagate(sd, sd_state, is_active, V4L2_SEL_TGT_CROP); + ccs_propagate(sd, sd_state, V4L2_SEL_TGT_CROP); return 0; }