From patchwork Mon Mar 19 14:29:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10292411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DAF7C60385 for ; Mon, 19 Mar 2018 14:30:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C96EC28FF0 for ; Mon, 19 Mar 2018 14:30:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDDD0292AA; Mon, 19 Mar 2018 14:30:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7399B29287 for ; Mon, 19 Mar 2018 14:30:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933529AbeCSOaP (ORCPT ); Mon, 19 Mar 2018 10:30:15 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:61162 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932708AbeCSOaN (ORCPT ); Mon, 19 Mar 2018 10:30:13 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20180319143011epoutp04aae19422fc673abb3f74cdee9d0a7de7~dWLuUR5q-2645826458epoutp04d; Mon, 19 Mar 2018 14:30:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20180319143011epoutp04aae19422fc673abb3f74cdee9d0a7de7~dWLuUR5q-2645826458epoutp04d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1521469811; bh=WvbTQINm8kogFtaGilJ83om+JYLZ/QOqDFcKES13xhA=; h=From:To:Cc:Subject:Date:References:From; b=oaqLLAuyQfPr1UizD6fG2aiTc20JkpjOKCyijvR1BPaplsjsYnd+zdvEoaFlJpkRu wNvTmu0d0VtUyillEyGzEJ6RYLtWbZ4jW/M1RKQY23xEQ93gkmlErgQ2Lh0op2oNTu 7nBhXjc+8d2EADITX2sGO2AspxtRewU0EcR8iXHs= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180319143010epcas2p1c26a2c62b2424e7667f2f4f05e0ecfdf~dWLtMNX-H3270832708epcas2p10; Mon, 19 Mar 2018 14:30:10 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 36.8A.04137.279CFAA5; Mon, 19 Mar 2018 23:30:10 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180319143010epcas2p25aa33888e29cc229adf272369b6e684b~dWLs91aOs2776527765epcas2p2e; Mon, 19 Mar 2018 14:30:10 +0000 (GMT) X-AuditID: b6c32a46-3c1ff70000001029-67-5aafc972e481 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 9D.17.03890.279CFAA5; Mon, 19 Mar 2018 23:30:10 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5U003CIDM01Q60@mmp1.samsung.com>; Mon, 19 Mar 2018 23:30:10 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, smitha.t@samsung.com, a.hajda@samsung.com, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH] s5p-mfc: Amend initial min, max values of HEVC hierarchical coding QP controls Date: Mon, 19 Mar 2018 15:29:58 +0100 Message-id: <20180319142958.21569-1-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.14.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRmVeSWpSXmKPExsWy7bCmhW7RyfVRBpuWyVncWneO1eLU5GdM Fj0btrJazDi/j8ni8Jt2Vou7e7YxOrB59G1ZxejxeZOcx6mvn9kDmKO4bFJSczLLUov07RK4 Mra2NbIVnBesWP7sOWsD43XeLkZODgkBE4n7J66zdTFycQgJ7GCUOL33EwuE851R4uiql6ww Vf+b57JDJHYzSix9t48FJCEk8ItR4lkfG4jNJmAo0Xu0jxHEFhGQl3jSewMsziwwlVFi6kJZ EFtYIFFi47dGsBoWAVWJT+3zwWp4Bawl2i9sgVomL/F+wX1GkGUSAjdZJW68+QKU4AByXCRW vLGFqBGWeHV8CzuELS3xbNVGRgi7WqKzrYsdoreFUeLPtEtsEAlricPHL7JCHMQn0XH4LzvE TF6JjjYhiBIPicanz1ggbEeJzv3XWSF+jJU4suYB6wRGyQWMDKsYxVILinPTU4uNCoz0ihNz i0vz0vWS83M3MYKjS8ttB+OScz6HGAU4GJV4eB2ProsSYk0sK67MPcQowcGsJML79ApQiDcl sbIqtSg/vqg0J7X4EKM0B4uSOG9rgEuUkEB6YklqdmpqQWoRTJaJg1OqgbGly9GfXea3PSvj hNh/WVMe/O8wNFv27k3F612zFldePtJy9d+Klps2V+xbRU/4Z5Ym7+P81r7z7JdHsy4e3Ke0 8t22P9Yp8zXEGgS/fvnCPfVeVNTXUzPdnzW3dk7WyttQ6Tvns+muxNR7UivDL3W2GByS9uqK U566vtrx8Ia7fn9uXnvK+pNFiaU4I9FQi7moOBEAvv+4zqoCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKJMWRmVeSWpSXmKPExsVy+t9jAd2ik+ujDK4uFbK4te4cq8Wpyc+Y LHo2bGW1mHF+H5PF4TftrBZ392xjdGDz6NuyitHj8yY5j1NfP7MHMEdx2aSk5mSWpRbp2yVw ZWxta2QrOC9YsfzZc9YGxuu8XYycHBICJhL/m+eyg9hCAjsZJd7fj+ti5AKyfzFKbH97ixEk wSZgKNF7tA/MFhGQl3jSe4MNpIhZYDKjxOpzLWDdwgKJEhs2P2cFsVkEVCU+tc9nA7F5Bawl 2i9sYYXYJi/xfsF9xgmMXAsYGVYxSqYWFOem5xYbFRjlpZbrFSfmFpfmpesl5+duYgR6ftth rf4djI+XxB9iFOBgVOLhdTi6LkqINbGsuDL3EKMEB7OSCO/TK0Ah3pTEyqrUovz4otKc1OJD jNIcLErivPz5xyKFBNITS1KzU1MLUotgskwcnFINjIUropLXicw3MV/bt2Ueo60R67SHQspP yjjmxv3znRP6kbWnZdmdHdtKy89kPL72yGhNlrCO48byrw+c/tpvvf5y7XbN8qofVn9dLjW5 VewUnB8Yfn/RiUWJl3PV/J8YMNZNDLqWqLXlSYTA+YVPHJKZFka0am1fYpfByz5z2tocs9mT rAr0bZVYijMSDbWYi4oTAY4hqM74AQAA X-CMS-MailID: 20180319143010epcas2p25aa33888e29cc229adf272369b6e684b X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180319143010epcas2p25aa33888e29cc229adf272369b6e684b X-RootMTR: 20180319143010epcas2p25aa33888e29cc229adf272369b6e684b References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Valid range for those controls is specified in documentation as [0, 51], so initialize the controls to such range rather than [INT_MIN, INT_MAX]. Signed-off-by: Sylwester Nawrocki Acked-by: Hans Verkuil --- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index 810dabe2f1b9..7382b41f4f6d 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -856,56 +856,56 @@ static struct mfc_control controls[] = { { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, }, { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, }, { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, }, { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, }, { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, }, { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, }, { .id = V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP, .type = V4L2_CTRL_TYPE_INTEGER, - .minimum = INT_MIN, - .maximum = INT_MAX, + .minimum = 0, + .maximum = 51, .step = 1, .default_value = 0, },