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=-15.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 02FC0C433DB for ; Tue, 9 Feb 2021 12:48:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BDA964EBA for ; Tue, 9 Feb 2021 12:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbhBIMrc (ORCPT ); Tue, 9 Feb 2021 07:47:32 -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]; >> }; >> >> /** >> >