Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3343924pxv; Sun, 4 Jul 2021 16:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzytbSQ79Vw2i/rxH9q2sVkE+8GV6W43P7SnuFPd+dD6C5AreZ/Tzuh/O75RvBruHGcxcN1 X-Received: by 2002:a02:9718:: with SMTP id x24mr9882901jai.7.1625439983156; Sun, 04 Jul 2021 16:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625439983; cv=none; d=google.com; s=arc-20160816; b=Wkg5rglcVpi1xsbZv6WTIf0/o9mb++cWZCrOs4HI8PLsK3rV8yKncujqCwm9x3w/oK 93KX3SX4tu+NT4NyuAkMQRcEf8aaRZpcZzkKW/q8Bp1+8eUGqWmQVqqKKt6Mzj2g0EFn rcuPBCUbOrCmDC3uHI4BE5Yyq1j8Vaf6va49kDkN5XuwlTHdcEdm0VCQvZ+kBDsb6ttB 9QFnuVrfWNq5LkPAXeNMYGC4R7DZ2sPk//T/XQBUg91jLfF+BEDi38vSybRs/KVLNBAl wsf7UbVPsGUaGnqj8eFmBq/Bu8zWIDwGGHqZmxW2l7X96rbSiWVxHNtONcfn77jhLnib fjbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6ek6vbDvZEIOSlvNsTI7wA4WSGnwUAUxF5KTpPuwEXE=; b=Ao3Iut/v4a5an5cZ0jjU0g0o/VQ/85BGhOKaJakK8j/uqNjKZg7RwJ8FeHv5B7QHcd Lcw3JYmnHWVEcGH+5m55tkHuw4rdj40t8TUYErtaiwNyjcZTDhb3VbSi8VeoqYWISY8g f1wGlr5tTRnGlCND23w8k+OacRdFDRtNFEw8OkEMIbRzzY1O6sEWBP+/c8kmN0OKqpMM 9pVMprib7e6OhBv5Xd1By2Xemj82daaCSdPCNXlobVPqHVzPjAjRkGZW5zHci1UCjSLu xu6sRH7RxWjB7QLYBJfFIRJEhhI0yjeJO29pTfpMpNrW4RKGKVlsKYKy5pVQeTJ1DDd9 aaKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tu+hK3ZW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si11275914ila.83.2021.07.04.16.06.11; Sun, 04 Jul 2021 16:06:23 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tu+hK3ZW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbhGDXH6 (ORCPT + 99 others); Sun, 4 Jul 2021 19:07:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:45944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbhGDXHg (ORCPT ); Sun, 4 Jul 2021 19:07:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0FADA613E9; Sun, 4 Jul 2021 23:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439900; bh=ZptdSvTsaDQgc709i4bznaO+Cpu4QV9ScxZjMqvcgDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tu+hK3ZWW/tmzTlii9AY6OF3DKl344ZC/yRvQphY8Y7BA2QIkA1fhLYPGHOyVI0cm F+9O37tDvvVcozhlNUqw8wybYupHzzirIu59nLnAv0S3YzXJNoj3w8htonEmiqzesU 4CZI3MMGalNg+JmHkjA3NJ82kVUcAlLG495jmqof53+sst+Het+BniLulVBJV1GU1o r6TxFgP23fPVa8PDxqiTHifuWuMLAtMRemIt+gJDh7Pf6Zt7yWCeDxdz26Ra1ASI3I QjONoXdr1jWkgVTGVupy/e9V29hDg3jScsJ/PUbNYeeRoFs9C6wIWnp9EPm35JdVCf dfA5ItatZAKKA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jernej Skrabec , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH AUTOSEL 5.13 28/85] media: hevc: Fix dependent slice segment flags Date: Sun, 4 Jul 2021 19:03:23 -0400 Message-Id: <20210704230420.1488358-28-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org> References: <20210704230420.1488358-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jernej Skrabec [ Upstream commit 67a7e53d5b21f3a84efc03a4e62db7caf97841ef ] Dependent slice segment flag for PPS control is misnamed. It should have "enabled" at the end. It only tells if this flag is present in slice header or not and not the actual value. Fix this by renaming the PPS flag and introduce another flag for slice control which tells actual value. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 5 ++++- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 4 ++-- include/media/hevc-ctrls.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index b0de4e6e7ebd..514b334470ea 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -3053,7 +3053,7 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - :stub-columns: 0 :widths: 1 1 2 - * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT`` + * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED`` - 0x00000001 - * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT`` @@ -3277,6 +3277,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED`` - 0x00000100 - + * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT`` + - 0x00000200 + - .. raw:: latex diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c index ce497d0197df..10744fab7cea 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c @@ -477,8 +477,8 @@ static void cedrus_h265_setup(struct cedrus_ctx *ctx, slice_params->flags); reg |= VE_DEC_H265_FLAG(VE_DEC_H265_DEC_SLICE_HDR_INFO0_FLAG_DEPENDENT_SLICE_SEGMENT, - V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT, - pps->flags); + V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT, + slice_params->flags); /* FIXME: For multi-slice support. */ reg |= VE_DEC_H265_DEC_SLICE_HDR_INFO0_FLAG_FIRST_SLICE_SEGMENT_IN_PIC; diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h index b4cb2ef02f17..226fcfa0e026 100644 --- a/include/media/hevc-ctrls.h +++ b/include/media/hevc-ctrls.h @@ -81,7 +81,7 @@ struct v4l2_ctrl_hevc_sps { __u64 flags; }; -#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 0) +#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) #define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) #define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) #define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) @@ -160,6 +160,7 @@ struct v4l2_hevc_pred_weight_table { #define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) +#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) struct v4l2_ctrl_hevc_slice_params { __u32 bit_size; -- 2.30.2