From patchwork Thu Jun 30 21:35:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 9208993 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 12DD86075A for ; Thu, 30 Jun 2016 21:37:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 073FD2867C for ; Thu, 30 Jun 2016 21:37:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF2872868C; Thu, 30 Jun 2016 21:37:13 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9D8532867C for ; Thu, 30 Jun 2016 21:37:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIjcP-0003gG-GB; Thu, 30 Jun 2016 21:35:29 +0000 Received: from resqmta-po-08v.sys.comcast.net ([2001:558:fe16:19:96:114:154:167]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIjcM-0003JC-NW for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2016 21:35:27 +0000 Received: from resomta-po-14v.sys.comcast.net ([96.114.154.238]) by resqmta-po-08v.sys.comcast.net with SMTP id Ijc0bt0ucB1Y8Ijc0bw4Jq; Thu, 30 Jun 2016 21:35:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1467322504; bh=I231GAOjKlsGRre5oJmzfBA+qO6yayhQABhYKdyRNxA=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=EyOsQCiyR7NdEpQHR/XNpiB6nifoeOt4qjqe0HTrSSaRggmO99uRhUYCs3S9bOFYY AdIeh2jd7yiFBr1qqKuss9Vmqb2/r0ePWxRvhOdB+hsT9w3K0BoHysmbGPHFJ2EM3U p9T7SBESW7HsRVhz8kjYUTU7G9Khz/hDJlSBXQMOcNBGe2yKlJ48ZUxyA2Pnqll51X lqqf6AA4DcJnM+eSxjQzauxvL0O8mn25EhqjGUDtAefwguvg3fQ3U1jHXVJlf/8PcM sO0CrFZANwl4xQ2IfxuUhcuRHZeq0JnDqmUFXGRoJS5xorKfJhte3H7zTnpuXi+ax6 xYr1Om5Th4zWA== Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-14v.sys.comcast.net with comcast id D9b31t00Q1LXgTt019b3YF; Thu, 30 Jun 2016 21:35:04 +0000 Received: from shuah-XPS-13-9350.sisa.samsung.com (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id 6F8269F422; Thu, 30 Jun 2016 15:35:03 -0600 (MDT) From: Shuah Khan To: kyungmin.park@samsung.com, k.debski@samsung.com, jtp.park@samsung.com, mchehab@kernel.org, hverkuil@xs4all.nl, javier@osg.samsung.com Subject: [RFC PATCH] media: s5p-mfc - remove vidioc_g_crop Date: Thu, 30 Jun 2016 15:35:02 -0600 Message-Id: <1467322502-11180-1-git-send-email-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160630_143526_858622_C0121993 X-CRM114-Status: UNSURE ( 6.11 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove vidioc_g_crop() from s5p-mfc decoder. Without its s_crop counterpart g_crop is not useful. Delete it. Signed-off-by: Shuah Khan --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 42 ---------------------------- 1 file changed, 42 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index a01a373..ee7b189 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -766,47 +766,6 @@ static const struct v4l2_ctrl_ops s5p_mfc_dec_ctrl_ops = { .g_volatile_ctrl = s5p_mfc_dec_g_v_ctrl, }; -/* Get cropping information */ -static int vidioc_g_crop(struct file *file, void *priv, - struct v4l2_crop *cr) -{ - struct s5p_mfc_ctx *ctx = fh_to_ctx(priv); - struct s5p_mfc_dev *dev = ctx->dev; - u32 left, right, top, bottom; - - if (ctx->state != MFCINST_HEAD_PARSED && - ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING - && ctx->state != MFCINST_FINISHED) { - mfc_err("Cannont set crop\n"); - return -EINVAL; - } - if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_H264) { - left = s5p_mfc_hw_call(dev->mfc_ops, get_crop_info_h, ctx); - right = left >> S5P_FIMV_SHARED_CROP_RIGHT_SHIFT; - left = left & S5P_FIMV_SHARED_CROP_LEFT_MASK; - top = s5p_mfc_hw_call(dev->mfc_ops, get_crop_info_v, ctx); - bottom = top >> S5P_FIMV_SHARED_CROP_BOTTOM_SHIFT; - top = top & S5P_FIMV_SHARED_CROP_TOP_MASK; - cr->c.left = left; - cr->c.top = top; - cr->c.width = ctx->img_width - left - right; - cr->c.height = ctx->img_height - top - bottom; - mfc_debug(2, "Cropping info [h264]: l=%d t=%d " - "w=%d h=%d (r=%d b=%d fw=%d fh=%d\n", left, top, - cr->c.width, cr->c.height, right, bottom, - ctx->buf_width, ctx->buf_height); - } else { - cr->c.left = 0; - cr->c.top = 0; - cr->c.width = ctx->img_width; - cr->c.height = ctx->img_height; - mfc_debug(2, "Cropping info: w=%d h=%d fw=%d " - "fh=%d\n", cr->c.width, cr->c.height, ctx->buf_width, - ctx->buf_height); - } - return 0; -} - static int vidioc_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd) { @@ -880,7 +839,6 @@ static const struct v4l2_ioctl_ops s5p_mfc_dec_ioctl_ops = { .vidioc_expbuf = vidioc_expbuf, .vidioc_streamon = vidioc_streamon, .vidioc_streamoff = vidioc_streamoff, - .vidioc_g_crop = vidioc_g_crop, .vidioc_decoder_cmd = vidioc_decoder_cmd, .vidioc_subscribe_event = vidioc_subscribe_event, .vidioc_unsubscribe_event = v4l2_event_unsubscribe,