From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796339894; b=c2J/a0BNkFT229br0jDoBNYjmmoWLbCW+WT8GDPqdC28+Mv95PWE1EhLuFNMrBSXEvcb cgDBQw/uTMlsPqJgGJguZO8+P743sdRsZDybSPNH6iWLrn3MKxHYMB7qd6NfUzXUJpEid 1nzzp0QFfvAlaE8d/kR/JvESXi5FN+wlOClTfTIWnpv9N7MQs2bsXNvr4b+ODa5X9kjtl k6vC+tHTlm+SbqIlT9xaw+cgMwGES5QoTjSapPT6YGGLX8Nq86OJX7oXa7kWs0NeF6ARs UOxNkUUYS8FvQVC2/oh8eDpRiuzDkg/JlhF2faQeAqDl2rTqYDldj6ldT4SHm5sgnUg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796339894; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-Spam-Details-Enc: X-Authority-Analysis:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Info:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=Y4OC6cYDLYgxcMUEoG4b+8CkrnkWDk54pL6IXgxlYfw=; b=qaUG9XCy9AB3qxRAoYJypIaOuVI1dwksI6b+SlUTixANJzdcsLwT1yLM5Hxqx3126wCC OhKMRbYkJj8mpvumGVYuFzvb5fPTFvWR5VUXXRTTWWsdDGw1yPOq+YQ7tKqvjRWTOW46N i9LTXyV2bwUFq7+1gDHXT98t0de0TGbug+6evkre/WEVwjqenYnQAnglM6Afm8OMLQ1hq FBzBaXunm2kSbIy3UQT4kqtj0sDX4rJ8r5to5XB6+nY3I6sqJ+WqeS6KHyFQ19XLvCIel WDR4I6bABxj3oycxcVurrUkWMA6at6gH69wLq6ZSvVZNeZjcB8VBtm8PxVUkclwtoUA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=JFBgzpFo; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=P0knb27z; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B9A6606A32D for ; Thu, 3 Dec 2026 23:18:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8B9A6606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=JFBgzpFo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=P0knb27z Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B3L6Fpu1828276 for ; Thu, 3 Dec 2026 23:18:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Y4OC6cYDLYgxcMUEoG4b+8CkrnkWDk54pL6IXgxlYfw=; b=JFBgzpFoARUc5vgL rFOSaDTEoEXp0Ns4Mi90cCtBRTGc8/5WJAbBiT58NQ4vdqMTEwSFx+mQo0M8uuhq V355zDXQm8MX4Obhy5fCjzSlJdHy35kAqar5O0q8DSCsrpyX/aDF7F2oN5S1tuw9 54K+ucyeyMKnpOo2Mp+f7xbT/wo7GgTp9HIqX77l9vC+pLDktqB6oY1u84Imjwzd m5/5tdTbSrr0P2nd5l+tW356breDoKv7GsSwroRCd40mlln5c28KQKfj/x3KtE5d VBrx6JUrBIRQs1uT59Bq9lsrVkJ2B9+zPutXSNOX3OlBfdsdPTCwNOL28/XpLacx mR+kjQ== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbg1y8kpd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 03 Dec 2026 23:18:12 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-3875074b532so29149eec.3 for ; Thu, 03 Dec 2026 15:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796339892; x=1796944692; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Y4OC6cYDLYgxcMUEoG4b+8CkrnkWDk54pL6IXgxlYfw=; b=P0knb27zoqtK6SkZNY6MnCjpYE8HSizqg6/UYZWMMrz6YodLYWHT/sNAc7w9UMwQy/ IaM4lPbmZQ6/ro93GAXP6tTj155h4kdoE4FZ7KEtTvoY7wFxjJdutoS+41v/UzJn388o 0vXqXNcWjmA2s+00r2lXyfvzac5sPCGg5pS+C41Y42iry55KPfDMIfk+z2mwcnQ2rqre BjMQvgGP/Zgk3MF5YAnEUwLcXccDK0ylWFtXW0yx2h/DMG65IfJwJySeXXu0ctlXsfUx F0XKsjkqG1nm+CA9uKu4fXeS8jG/5xaC01FxZREpJ4O7uSKmqTE0sim7+XdY1HKW4x2H M5Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796339892; x=1796944692; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Y4OC6cYDLYgxcMUEoG4b+8CkrnkWDk54pL6IXgxlYfw=; b=jfTNd2zId39jF//n4M7luaioqkn/TGjeVPn0qHux8VSUehi0DO3yN0cxZRbeWJiDFW 7NFC5zOGpw/zmrYqwgmpIhysLCekou8OdnAYxtHzYdi1O61Rzpe9uxc9NPO5XyGzD4jK PBtcADHDUDgvoPmHAg/SQJKec/H6yegTEwW2qIi054sG49u+y5A1UHBRnMx8+q5Rd8TA /NfyzZ0nGgBlsWOVukJgry6Ks7xW7gCfspfcTb4/C3Ygp4J7qGSsP5hxK3DGB9JZrfMo j/Oe3LPmIHSEOdAeJLPPDI5dW1+03BljK5iYM5R+OUWhd8dLpc5ibdS1tX7+rFtMCMSX 3LbQ== X-Forwarded-Encrypted: i=1; AL+hErEanRpXzIMSt8bpeMtGRCdtincU6Tn+GPTa9d6lJACvbA15wp9pY/oeS++rP0kNL71U1Q31T6Bn1gL387E=@vger.kernel.org X-Gm-Message-State: APuU4Z+Z8uc7HXxs6Q00IbPr/wk0VgN1kYABAVUvZ4s+y5N09ittAelk 9mdjqbMrym5suMORUYzEla3SjW1GSCQFM9fzzNyLjiCrUhfkskVq8vwdhqFWMEVIl1uIFhiXgK6 iJlkrMVMk5DkhRI8T4D8v6rAKXfHf9dWRkBWit/txdAIiMr3+qNvetbCdyG+TmiOK0vLZTLzFJ+ M= X-Gm-Gg: AZFdTZd1Jyirez8WsnIjWjOw7nzWrIn0Urw5t9RbxG7nenA5ONqaJuRPPcNWZGnqPy7 wG6OddQlVQSJ1aRY1PRLMilPjJZ9ynPjeG0xZkalNZvdpKPGAWbEm7hXYTQE+Iia8CKMoe7tY4Z FswusYSwjgNdbziMyeml8oCqD7E4Nz0RViZ3mArivoc+nSDnPAjKUEL9q1gCG1qDUNj3PDQeAM7 /c5+J87QL5TnXVZffUYyCW92aCftHSA3X+eVOvKB2hGEwR2Q6U/LWffbuXub00N8NvxsUpw0r19 2YezUcnIPtimJjs2wShGr5Ty2JnvNF6Chwfq3+eZ7zn+twiDMW/SsBGulAf/X+O4ISqCKo6fqfc BpAgmDPJ+XkoZYFwI6TXdx3B6PKebo6k1yxh2sQ471qXKJOcePP1g5+b+mWmu/HSWfGeviaBs5K L4s2Wcq/kveGVdIuX85hLHVOAkD4ArR1TJFw== X-Received: by 2002:a05:693c:80c2:b0:384:cea9:a109 with SMTP id 5a478bee46e88-38751e5b7c4mr464934eec.0.1796339891839; Thu, 03 Dec 2026 15:18:11 -0800 (PST) X-Received: by 2002:a05:693c:80c2:b0:384:cea9:a109 with SMTP id 5a478bee46e88-38751e5b7c4mr464891eec.0.1796339891053; Thu, 03 Dec 2026 15:18:11 -0800 (PST) Received: from [10.110.118.8] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387521e5c89sm1178759eec.18.2026.12.03.15.18.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 15:18:10 -0800 (PST) Message-ID: Date: Thu, 3 Dec 2026 15:18:08 -0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 1/5] media: v4l2-core: add new control type V4L2_CTRL_TYPE_S8 To: Hans Verkuil , Mauro Carvalho Chehab , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, kernel test robot References: <20261120-enc_roi_enable-v11-0-c00b95ea1b81@oss.qualcomm.com> <20261120-enc_roi_enable-v11-1-c00b95ea1b81@oss.qualcomm.com> Content-Language: en-US From: Deepa Guthyappa Madivalara In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAzMDA5MiBTYWx0ZWRfX/eYoslfj6j46 r4YHX8MAEh0lbia+SoFWA825+70TqiXVyIMLCpA6w+3x0S7vi4p0gQECZe5sw8oWi5tFnt7KEKM Q1VPPLLg2F7OnYlSRHwON9PLEg4BNaQ7JF5XoJcFcHmztXzKhy+Ut0DJ+UXvmUeKLqOlmv6yJ5B XFKtJZaVUkiPNbnlGGKV3xOnFDU6lmoVo7Bva7uwDGexhUG01HTA44kTDm1xmJI8Sf87yUB7dZ9 4k8iEWsFB63RVIEB9veSOdYKl0zVQliH8ogheDaSAwpQ3yvS/thYdVNKm9ieq6f5ibMljyPBK97 zUsx4u/m2S8X1LAzi1z9A15Y+fPKCyOI3UHxLx2AgvBuGVUaRX4N9KxK/W540gS1+80mZ5VXCvQ Sfh3Q3biLPexKiODMmBan76+y35mF74LUsZGG1BpCMFJRbYB5PgdOb372oC8MyDcrgIrS2nrnJ0 DVIt0jdOp/KAjHfh9RQ== X-Authority-Analysis: v=2.4 cv=Aql7T+9P c=1 sm=1 tr=0 ts=6b11f8b4 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=bwrcSM_aVqJE378hdqEA:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-ORIG-GUID: 53SkxXbrPO5K4UZfooLc3G6ORfMeH6BK X-Proofpoint-GUID: 53SkxXbrPO5K4UZfooLc3G6ORfMeH6BK X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDA5MiBTYWx0ZWRfX46nCz/9Mv7kS yNNNFpwym56dUqz9dqv1TyQXBY5Fs7D7LltiTvt9C9T55Bfwl/8B3t5VilFhtTbavr2taMKgwFh L9fw8vbBAhD76kX0oL2ZzlTHa29yFwY= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-03_05,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 suspectscore=0 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2612010000 definitions=main-2612030092 On 12/3/2026 1:36 AM, Hans Verkuil wrote: > On 21/11/2026 00:45, Deepa Guthyappa Madivalara wrote: >> Introduce V4L2_CTRL_TYPE_S8 (enum value 0x0103) as a new >> control type for signed 8-bit values. Add necessary support in >> v4l2_ext_control, v4l2_ctrl_ptr and handling in v4l2-ctrls-core, >> v4l2-ctrls-api. >> >> Reviewed-by: Hans Verkuil >> Signed-off-by: Deepa Guthyappa Madivalara > This patch is fine, but you need to add another patch adding a test S8 array control > to the vivid driver, just as was done for TYPE_U8. This ensures that we can do > regression tests for controls of this type using vivid. > > Regards, > > Hans Sure, added in V12. >> --- >> .../userspace-api/media/v4l/videodev2.h.rst.exceptions | 1 + >> .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst | 4 ++++ >> .../userspace-api/media/v4l/vidioc-queryctrl.rst | 6 ++++++ >> drivers/media/v4l2-core/v4l2-ctrls-api.c | 1 + >> drivers/media/v4l2-core/v4l2-ctrls-core.c | 16 ++++++++++++++++ >> include/media/v4l2-ctrls.h | 2 ++ >> include/uapi/linux/videodev2.h | 2 ++ >> 7 files changed, 32 insertions(+) >> >> diff --git a/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions b/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions >> index 6182b4e2d2ee002c0d3562e1cc3bc2fd9c4286d6..b036ed3ec2f0744175cad1cbc4e73fe828e0c955 100644 >> --- a/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions >> +++ b/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions >> @@ -141,6 +141,7 @@ replace symbol V4L2_CTRL_TYPE_STRING :c:type:`V4L.v4l2_ctrl_type` >> replace symbol V4L2_CTRL_TYPE_U16 :c:type:`V4L.v4l2_ctrl_type` >> replace symbol V4L2_CTRL_TYPE_U32 :c:type:`V4L.v4l2_ctrl_type` >> replace symbol V4L2_CTRL_TYPE_U8 :c:type:`V4L.v4l2_ctrl_type` >> +replace symbol V4L2_CTRL_TYPE_S8 :c:type:`V4L.v4l2_ctrl_type` >> replace symbol V4L2_CTRL_TYPE_MPEG2_SEQUENCE :c:type:`V4L.v4l2_ctrl_type` >> replace symbol V4L2_CTRL_TYPE_MPEG2_PICTURE :c:type:`V4L.v4l2_ctrl_type` >> replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTISATION :c:type:`V4L.v4l2_ctrl_type` >> diff --git a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst >> index d78328152b7552f8f0d30a9e2f7c104bfd4b70d3..fe5f8992389c32d8f35f432229ef2f734002644e 100644 >> --- a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst >> +++ b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst >> @@ -188,6 +188,10 @@ still cause this situation. >> - ``p_u32`` >> - A pointer to a matrix control of unsigned 32-bit values. Valid if >> this control is of type ``V4L2_CTRL_TYPE_U32``. >> + * - __s8 * >> + - ``p_s8`` >> + - A pointer to a matrix control of signed 8-bit values. Valid if >> + this control is of type ``V4L2_CTRL_TYPE_S8``. >> * - __s32 * >> - ``p_s32`` >> - A pointer to a matrix control of signed 32-bit values. Valid if >> diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst >> index 82c8b52e771ce9301491b3f752e501a8fe7e2434..57e1652ae72e0324742142446acf32a16b94941c 100644 >> --- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst >> +++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst >> @@ -425,6 +425,12 @@ See also the examples in :ref:`control`. >> - any >> - An unsigned 32-bit valued control ranging from minimum to maximum >> inclusive. The step value indicates the increment between values. >> + * - ``V4L2_CTRL_TYPE_S8`` >> + - any >> + - any >> + - any >> + - A signed 8-bit valued control ranging from minimum to maximum >> + inclusive. The step value indicates the increment between values. >> * - ``V4L2_CTRL_TYPE_MPEG2_QUANTISATION`` >> - n/a >> - n/a >> diff --git a/drivers/media/v4l2-core/v4l2-ctrls-api.c b/drivers/media/v4l2-core/v4l2-ctrls-api.c >> index 93d8d4012d0f4fef004e417d0aee2ae44b1b30bd..7d41cfd7378baaa929d4da0266c45f731bb54285 100644 >> --- a/drivers/media/v4l2-core/v4l2-ctrls-api.c >> +++ b/drivers/media/v4l2-core/v4l2-ctrls-api.c >> @@ -980,6 +980,7 @@ int __v4l2_ctrl_modify_range(struct v4l2_ctrl *ctrl, >> case V4L2_CTRL_TYPE_U8: >> case V4L2_CTRL_TYPE_U16: >> case V4L2_CTRL_TYPE_U32: >> + case V4L2_CTRL_TYPE_S8: >> if (ctrl->is_array) >> return -EINVAL; >> ret = check_range(ctrl->type, min, max, step, def); >> diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c >> index 6e751a043a210618fd7829df16e99e535e9f45cc..a34eb2a21abafe7b0f1e9509939edb9fbedf8030 100644 >> --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c >> +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c >> @@ -297,6 +297,9 @@ static void __v4l2_ctrl_type_op_init(const struct v4l2_ctrl *ctrl, u32 from_idx, >> memset(ptr.p_u32 + from_idx, 0, elems * sizeof(u32)); >> } >> break; >> + case V4L2_CTRL_TYPE_S8: >> + memset(ptr.p_s8 + from_idx, (u8)value, elems); >> + break; >> default: >> for (i = from_idx; i < tot_elems; i++) { >> switch (which) { >> @@ -377,6 +380,9 @@ void v4l2_ctrl_type_op_log(const struct v4l2_ctrl *ctrl) >> case V4L2_CTRL_TYPE_U32: >> pr_cont("%u", (unsigned)*ptr.p_u32); >> break; >> + case V4L2_CTRL_TYPE_S8: >> + pr_cont("%d", *ptr.p_s8); >> + break; >> case V4L2_CTRL_TYPE_AREA: >> pr_cont("%ux%u", ptr.p_area->width, ptr.p_area->height); >> break; >> @@ -1474,6 +1480,8 @@ static int std_validate_elem(const struct v4l2_ctrl *ctrl, u32 idx, >> return ROUND_TO_RANGE(ptr.p_u16[idx], u16, ctrl); >> case V4L2_CTRL_TYPE_U32: >> return ROUND_TO_RANGE(ptr.p_u32[idx], u32, ctrl); >> + case V4L2_CTRL_TYPE_S8: >> + return ROUND_TO_RANGE(ptr.p_s8[idx], u8, ctrl); >> >> case V4L2_CTRL_TYPE_BOOLEAN: >> ptr.p_s32[idx] = !!ptr.p_s32[idx]; >> @@ -1533,6 +1541,10 @@ int v4l2_ctrl_type_op_validate(const struct v4l2_ctrl *ctrl, >> if (ctrl->maximum == 0xffffffff && ctrl->minimum == 0 && ctrl->step == 1) >> return 0; >> break; >> + case V4L2_CTRL_TYPE_S8: >> + if (ctrl->maximum == S8_MAX && ctrl->minimum == S8_MIN && ctrl->step == 1) >> + return 0; >> + break; >> >> case V4L2_CTRL_TYPE_BUTTON: >> case V4L2_CTRL_TYPE_CTRL_CLASS: >> @@ -1764,6 +1776,7 @@ int check_range(enum v4l2_ctrl_type type, >> case V4L2_CTRL_TYPE_U32: >> case V4L2_CTRL_TYPE_INTEGER: >> case V4L2_CTRL_TYPE_INTEGER64: >> + case V4L2_CTRL_TYPE_S8: >> if (step == 0 || min > max || def < min || def > max) >> return -ERANGE; >> return 0; >> @@ -2069,6 +2082,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, >> case V4L2_CTRL_TYPE_U32: >> elem_size = sizeof(u32); >> break; >> + case V4L2_CTRL_TYPE_S8: >> + elem_size = sizeof(s8); >> + break; >> case V4L2_CTRL_TYPE_MPEG2_SEQUENCE: >> elem_size = sizeof(struct v4l2_ctrl_mpeg2_sequence); >> break; >> diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h >> index cec9217d97ac698cd447574f5d079dd913a9ef6f..cbda866197d894657b571ee5d57b4956818b7ee0 100644 >> --- a/include/media/v4l2-ctrls.h >> +++ b/include/media/v4l2-ctrls.h >> @@ -30,6 +30,7 @@ struct video_device; >> * @p_s32: Pointer to a 32-bit signed value. >> * @p_s64: Pointer to a 64-bit signed value. >> * @p_u8: Pointer to a 8-bit unsigned value. >> + * @p_s8: Pointer to a 8-bit signed value. >> * @p_u16: Pointer to a 16-bit unsigned value. >> * @p_u32: Pointer to a 32-bit unsigned value. >> * @p_char: Pointer to a string. >> @@ -61,6 +62,7 @@ struct video_device; >> * @p_const: Pointer to a constant compound value. >> */ >> union v4l2_ctrl_ptr { >> + s8 *p_s8; >> s32 *p_s32; >> s64 *p_s64; >> u8 *p_u8; >> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h >> index 5373dba640fae3d19247ab1c74ba336e05dc0fe0..ac588d0093df9cc35c11d0b9d41d052d5e800925 100644 >> --- a/include/uapi/linux/videodev2.h >> +++ b/include/uapi/linux/videodev2.h >> @@ -1884,6 +1884,7 @@ struct v4l2_ext_control { >> __s64 value64; >> char __user *string; >> __u8 __user *p_u8; >> + __s8 __user *p_s8; >> __u16 __user *p_u16; >> __u32 __user *p_u32; >> __s32 __user *p_s32; >> @@ -1961,6 +1962,7 @@ enum v4l2_ctrl_type { >> V4L2_CTRL_TYPE_U8 = 0x0100, >> V4L2_CTRL_TYPE_U16 = 0x0101, >> V4L2_CTRL_TYPE_U32 = 0x0102, >> + V4L2_CTRL_TYPE_S8 = 0x0103, >> V4L2_CTRL_TYPE_AREA = 0x0106, >> V4L2_CTRL_TYPE_RECT = 0x0107, >> >>