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: 9208985 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 E74E96075A for ; Thu, 30 Jun 2016 21:35:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDA2128564 for ; Thu, 30 Jun 2016 21:35:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1A4528691; Thu, 30 Jun 2016 21:35:43 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 73A2528564 for ; Thu, 30 Jun 2016 21:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbcF3VfH (ORCPT ); Thu, 30 Jun 2016 17:35:07 -0400 Received: from resqmta-po-09v.sys.comcast.net ([96.114.154.168]:57501 "EHLO resqmta-po-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbcF3VfG (ORCPT ); Thu, 30 Jun 2016 17:35:06 -0400 Received: from resomta-po-14v.sys.comcast.net ([96.114.154.238]) by resqmta-po-09v.sys.comcast.net with SMTP id Ijc0bWJpcrlQrIjc1bnRDY; Thu, 30 Jun 2016 21:35:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1467322505; bh=I231GAOjKlsGRre5oJmzfBA+qO6yayhQABhYKdyRNxA=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=lKBwfjJZvKRZIxKEAXCppKOF6QbFRCyONF0AkrDtZDYgZ9f/Lxwslhz4rTQLKUbog 9UefIfpQufd+GdTsipIalD1LQ2m53euEp0ZzrUeCqj3Bv/+v1V53nfgMthDBP4EFK8 /Vm7grPwPUyzdYtCOMkdCWXFbo0Aei1alINmWLlnGPeTYh53XEkLCjKWPq5Bx7EwKE cSSY58oNJAALpFlFDwHSePREl7FOPVZWKIVOgVYWOcB5bB0Fkep9W8ujxxV+hRj4j2 C3G0Butf8SCrECZ027CSt5yXyBpteWJZ1L6gwur9CN1pNbw5KsD1LsdXAKhaeCVXyn Hb2IiYn5zF1wQ== 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 Cc: Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org 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 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 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,