Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp711095imm; Wed, 13 Jun 2018 07:11:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIOOLzT+oeLWNFEf67uvv3qdXoNGerZO8Q4RE+YY3WzrIqyoB7eqZI2evly2o1pgvzopUw0 X-Received: by 2002:a62:9b57:: with SMTP id r84-v6mr5168245pfd.157.1528899062336; Wed, 13 Jun 2018 07:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528899062; cv=none; d=google.com; s=arc-20160816; b=b6z05ulhX8ewZ+/vyQ1CjhNdv1E0hi80jOSFA+HxztD2N9JaRV1tiWpAXZBhnxh8QI WBwoR0ou4yFGQcFFalHyMPCU6ESiiaQGeuUQXRLu31OsWnZTRhVpBIu2ZwuxnZbctIZh kx67rcd4/T4ULbRNVkxf3GzTl4tVn4xauyounHzmadkIyy6b1jR9HbOYjKJpnz3x+N8P WoIim1OK2ZicPc0uf6qplyu7QlaBYy/cuehjfE0lAtG8geGRg1F2W4nADT/sGa6p3Kk4 uO3Tv1pVgDqrG1w3JYMeA/UWrOL73MvP3SL7J5cbxp8gZ/hJZMPNt0zN28vBDM3hn7Ds EeVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=dc+V4gsQTISfPpHhG4H1R/8Eh/ihVpv6H+F9Y2F1Kdo=; b=WZ5CNKmpoHDb3Er2mu6U1RxLE7TDTkfD9BGsCW1gEz3jBb1QLcdfAd/DQdTCtoRnWg h1gJn5AfgBk+vzvdnTF0oXSYo9FidInsCa65IeZhFTgl5wjSfQMOznXkaEFdc8XQim+m gM0QkFa5x79L9aUdSjpuyjUn4QPQzVbxaah0poWXvielNzmdS+XCr2v/qvcSrlxlzw1M +ukupLd5DAKH5t+adMqKrzHgZPGI5k46t8cwW3QuEwHlhUMjG9PGvAKsT8uGIKo2D67a wxmoB4eJ/VZ6NWEkW8ryMCrcL6tVrTKcYwbv65pjmVx2/TeJhFExMpz/TjmV2XsPh7q8 lbIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33-v6si2869346plc.369.2018.06.13.07.10.25; Wed, 13 Jun 2018 07:11:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935896AbeFMOJW (ORCPT + 99 others); Wed, 13 Jun 2018 10:09:22 -0400 Received: from mail.bootlin.com ([62.4.15.54]:52367 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935781AbeFMOHU (ORCPT ); Wed, 13 Jun 2018 10:07:20 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 8544220A32; Wed, 13 Jun 2018 16:07:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AAubervilliers-681-1-37-30.w90-88.abo.wanadoo.fr [90.88.156.30]) by mail.bootlin.com (Postfix) with ESMTPSA id 5A2DE20728; Wed, 13 Jun 2018 16:07:18 +0200 (CEST) From: Maxime Ripard To: hans.verkuil@cisco.com, acourbot@chromium.org, sakari.ailus@linux.intel.com, Laurent Pinchart Cc: tfiga@chromium.org, posciak@chromium.org, Paul Kocialkowski , Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, nicolas.dufresne@collabora.com, jenskuske@gmail.com, linux-sunxi@googlegroups.com, Thomas Petazzoni , Maxime Ripard Subject: [PATCH 5/9] media: cedrus: Remove MPEG1 support Date: Wed, 13 Jun 2018 16:07:10 +0200 Message-Id: <20180613140714.1686-6-maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180613140714.1686-1-maxime.ripard@bootlin.com> References: <20180613140714.1686-1-maxime.ripard@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The MPEG1 codec is obsolete, and that code hasn't been tested either. Since it stands in the way of further refactoring, remove it entirely. Signed-off-by: Maxime Ripard --- drivers/media/platform/sunxi/cedrus/sunxi_cedrus_dec.c | 4 +--- drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.c | 8 ++------ drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.h | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_dec.c b/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_dec.c index c19acf9626c4..f274408ab5a7 100644 --- a/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_dec.c +++ b/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_dec.c @@ -80,7 +80,6 @@ void sunxi_cedrus_device_run(void *priv) struct sunxi_cedrus_run run = { 0 }; struct media_request *src_req, *dst_req; unsigned long flags; - bool mpeg1 = false; run.src = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); if (!run.src) { @@ -123,7 +122,6 @@ void sunxi_cedrus_device_run(void *priv) run.mpeg2.hdr = get_ctrl_ptr(ctx, SUNXI_CEDRUS_CTRL_DEC_MPEG2_FRAME_HDR); sunxi_cedrus_mpeg2_setup(ctx, &run); - mpeg1 = run.mpeg2.hdr->type == MPEG1; break; default: @@ -146,7 +144,7 @@ void sunxi_cedrus_device_run(void *priv) if (!ctx->job_abort) { if (ctx->vpu_src_fmt->fourcc == V4L2_PIX_FMT_MPEG2_FRAME) - sunxi_cedrus_mpeg2_trigger(ctx, mpeg1); + sunxi_cedrus_mpeg2_trigger(ctx); } else { v4l2_m2m_buf_done(run.src, VB2_BUF_STATE_ERROR); v4l2_m2m_buf_done(run.dst, VB2_BUF_STATE_ERROR); diff --git a/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.c b/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.c index 85e6fc2fbdb2..d1d7a3cfce0d 100644 --- a/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.c +++ b/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.c @@ -148,13 +148,9 @@ void sunxi_cedrus_mpeg2_setup(struct sunxi_cedrus_ctx *ctx, sunxi_cedrus_write(dev, src_buf_addr + VBV_SIZE - 1, VE_MPEG_VLD_END); } -void sunxi_cedrus_mpeg2_trigger(struct sunxi_cedrus_ctx *ctx, bool mpeg1) +void sunxi_cedrus_mpeg2_trigger(struct sunxi_cedrus_ctx *ctx) { struct sunxi_cedrus_dev *dev = ctx->dev; - /* Trigger MPEG engine. */ - if (mpeg1) - sunxi_cedrus_write(dev, VE_TRIG_MPEG1, VE_MPEG_TRIGGER); - else - sunxi_cedrus_write(dev, VE_TRIG_MPEG2, VE_MPEG_TRIGGER); + sunxi_cedrus_write(dev, VE_TRIG_MPEG2, VE_MPEG_TRIGGER); } diff --git a/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.h b/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.h index b572001d47f2..4c380becfa1a 100644 --- a/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.h +++ b/drivers/media/platform/sunxi/cedrus/sunxi_cedrus_mpeg2.h @@ -28,6 +28,6 @@ struct sunxi_cedrus_run; void sunxi_cedrus_mpeg2_setup(struct sunxi_cedrus_ctx *ctx, struct sunxi_cedrus_run *run); -void sunxi_cedrus_mpeg2_trigger(struct sunxi_cedrus_ctx *ctx, bool mpeg1); +void sunxi_cedrus_mpeg2_trigger(struct sunxi_cedrus_ctx *ctx); #endif -- 2.17.0