Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp454350pxb; Tue, 9 Feb 2021 04:49:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyE3FL7WqdG0W8o1HwUSpP90cLLBDDbL0RiC6sU0038qTtN9NOx3iKk1v6B3wohhldrEf1+ X-Received: by 2002:aa7:c58e:: with SMTP id g14mr22302816edq.362.1612874995943; Tue, 09 Feb 2021 04:49:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612874995; cv=none; d=google.com; s=arc-20160816; b=cCUm5K6x5n27rjhpsFjXAUE43+mYBVjJ20msLw7bQd5sauFFv8Bq231+kB4xMc9TKJ b+tP3RUaT0zGMn7n8oykdlbquUQlTrthuw0yZOOw5mUYjv+9spjbM1+j65oLdNv2YulH GOcO+HRSwG0HLBLm5zgH99PfW0X5nQsF3nETe3ELKJqimE39CqAnjGWon6jaJ6oez3WX 0fzRqUSL/bAvugHOM1tENrIRo8jpiaNsQIo0xQ2YFQnbHAALtjFgE7DWxd+6Iyd6CFn3 UNhKbiYW4Ng/9mwm5zeaCmmUSrJT5sniLnt0/Ft9ej2GtASzfkkeSq/2BEssTBVZJt6O DdIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=B5JAyA1kwYINhJvLZYjbe/feHsiUk/XX0BYM0Lc9rg4=; b=mTtMYnqpVDYtgD9UKJuofLNdgm+jC2dRSK3UHF+hw5MuLUfUlC+cUx4I+Y0oD8dKeJ U98E4jiRWX93g2FS3NFyqdZyXSvDCvpM9b/GfuF8ZLKm0uIgeuSpD2Q4z7RWMtTuZP6n P8s5JpVDiVR8Y4vk1NpF+NNH6xah3wiCUB9G6jcVU9eYE5baHhIkdxb9Ns0dGFBcjAua ftfqgjIfyP/m+SLFKaiHn9p/y07g76sE2wifi/JAp5RmnDBA0xKsL9SMZl2y4ECT9VdZ jiQiCVs6zPwSnRNodJCOrp7+Z+0gOwhgWWgjAZH6PKUkgYFgfINnHajcnUBL7JGHhvDs ugsQ== 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 j23si14096387ejd.156.2021.02.09.04.49.32; Tue, 09 Feb 2021 04:49:55 -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 S230171AbhBIMr1 (ORCPT + 99 others); Tue, 9 Feb 2021 07:47:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbhBIMqW (ORCPT ); Tue, 9 Feb 2021 07:46:22 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD38C06178A; Tue, 9 Feb 2021 04:45:41 -0800 (PST) Received: from [IPv6:2003:c7:cf1c:ce00:59a:7e98:1669:ccc] (p200300c7cf1cce00059a7e9816690ccc.dip0.t-ipconnect.de [IPv6:2003:c7:cf1c:ce00:59a:7e98:1669:ccc]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dafna) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 076FA1F44DA5; Tue, 9 Feb 2021 12:45:40 +0000 (GMT) Subject: Re: [PATCH AUTOSEL 5.10 14/36] media: rkisp1: uapi: change hist_bins array type from __u16 to __u32 To: Hans Verkuil , Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Helen Koike , Mauro Carvalho Chehab , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Greg Kroah-Hartman References: <20210208175806.2091668-1-sashal@kernel.org> <20210208175806.2091668-14-sashal@kernel.org> <12c8f50e-3bba-5936-6e67-55bd928a75c7@xs4all.nl> From: Dafna Hirschfeld Message-ID: Date: Tue, 9 Feb 2021 13:45:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <12c8f50e-3bba-5936-6e67-55bd928a75c7@xs4all.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 08.02.21 um 21:46 schrieb Hans Verkuil: > On 08/02/2021 18:57, Sasha Levin wrote: >> From: Dafna Hirschfeld >> >> [ Upstream commit 31f190e0ccac8b75d33fdc95a797c526cf9b149e ] >> >> Each entry in the array is a 20 bits value composed of 16 bits unsigned >> integer and 4 bits fractional part. So the type should change to __u32. >> In addition add a documentation of how the measurements are done. > > Dafna, Helen, does it make sense at all to backport these three patches to > when rkisp1 was a staging driver? > > I would be inclined not to backport this. I also don't think it makes sense since this changes the uapi and it is not really a bug fix. Thanks, Dafna > > Regards, > > Hans > >> >> Signed-off-by: Dafna Hirschfeld >> Acked-by: Helen Koike >> Signed-off-by: Hans Verkuil >> Signed-off-by: Mauro Carvalho Chehab >> Signed-off-by: Sasha Levin >> --- >> drivers/staging/media/rkisp1/uapi/rkisp1-config.h | 13 +++++++++---- >> 1 file changed, 9 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/staging/media/rkisp1/uapi/rkisp1-config.h b/drivers/staging/media/rkisp1/uapi/rkisp1-config.h >> index 432cb6be55b47..c19fe059c2442 100644 >> --- a/drivers/staging/media/rkisp1/uapi/rkisp1-config.h >> +++ b/drivers/staging/media/rkisp1/uapi/rkisp1-config.h >> @@ -848,13 +848,18 @@ struct rkisp1_cif_isp_af_stat { >> /** >> * struct rkisp1_cif_isp_hist_stat - statistics histogram data >> * >> - * @hist_bins: measured bin counters >> + * @hist_bins: measured bin counters. Each bin is a 20 bits unsigned fixed point >> + * type. Bits 0-4 are the fractional part and bits 5-19 are the >> + * integer part. >> * >> - * Measurement window divided into 25 sub-windows, set >> - * with ISP_HIST_XXX >> + * The window of the measurements area is divided to 5x5 sub-windows. The >> + * histogram is then computed for each sub-window independently and the final >> + * result is a weighted average of the histogram measurements on all >> + * sub-windows. The window of the measurements area and the weight of each >> + * sub-window are configurable using struct @rkisp1_cif_isp_hst_config. >> */ >> struct rkisp1_cif_isp_hist_stat { >> - __u16 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX]; >> + __u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX]; >> }; >> >> /** >> >