From patchwork Sat Mar 17 15:28:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10290863 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 61F2960385 for ; Sat, 17 Mar 2018 15:29:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52A8128F75 for ; Sat, 17 Mar 2018 15:29:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 422A729118; Sat, 17 Mar 2018 15:29:18 +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, FREEMAIL_FROM, 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 04A5828F75 for ; Sat, 17 Mar 2018 15:29:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753569AbeCQP2w (ORCPT ); Sat, 17 Mar 2018 11:28:52 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38294 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077AbeCQP2h (ORCPT ); Sat, 17 Mar 2018 11:28:37 -0400 Received: by mail-lf0-f68.google.com with SMTP id y2-v6so17369928lfc.5; Sat, 17 Mar 2018 08:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=JplHqWFz5Y+W6B/s/EtiGrIqwyu2SWnvnD56WUvvoJI=; b=giXz0m7KYOb1FLiDtvGkSqc9B3k4hRa2Mhval+7kvXQjz9mFyFrEg9908rD+PSSx2R 2JHEhQy/kbajUf6hWBnlKsl0ZQx34aJloUiaHIoGErYteFrrdIUFddj9YuzH/ckxHc46 VnubocJ9kYOzmiU6IZ0/iDROP8VCBzc9YyZ3GUTMDHNMU3x6tqWatdbbtREF5D3uUhQd yJ4qX6Z8FcERJ6/+ZvAfc06VAxhJ/qTWBqttFCQ23JZgObcwnoDMbhwKze2QP1O8YBtm jlTMor7V7W1o9Kp0f//4h78GrfCtXN9VXha3O3yDYfF4hcN7lLJF/pLgHIuR2YEvfPVr qoRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=JplHqWFz5Y+W6B/s/EtiGrIqwyu2SWnvnD56WUvvoJI=; b=Fp10PwriLVCkm1yGUiQThLEJyGsNyTeiIsszedSJQayE31hcRPfaVhlkmOwHLu/cuE m3APzrYrn0+z9ucVVJA2nkLsKus7E2sIeaQog2FRPkbmaP0Yxn9YN1NN7454nq2z/LRh eWsjx34Iy/9JF0t14aU7M9MtpSFlbAb0AOqtiE6t9+tQgUOlxQprD1rfQodH0dkoqd9Y eVnKdMxhY3aZ3cOgvg3cLt5CqTyAdV78mHAlHYANxqi8dpT0bmlHWsR65RevheKaGBLb 1jL3c8QyJtTjGItClRuD/HbCF23fgP4du7+03kGooDOuv1K+NzbO/k5oe+fmdMI7aZmE Clew== X-Gm-Message-State: AElRT7Gjltoyy7F0bcSTJ9qApN7TtG9KB9OZf+bG29C74xSluD2I5wgU rcG7u4lFkLdM2dP9vHgD8Zo= X-Google-Smtp-Source: AG47ELuI5m8c5kVydq39/kj4wxCZENU3x+eEKaw4n7E8pVNJ1ykdMbjy1UNIl37r40XTR6LY9uTOsQ== X-Received: by 10.46.124.8 with SMTP id x8mr3839760ljc.121.1521300516036; Sat, 17 Mar 2018 08:28:36 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-55-234.pppoe.spdop.ru. [109.252.55.234]) by smtp.gmail.com with ESMTPSA id a142-v6sm2388276lfb.11.2018.03.17.08.28.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Mar 2018 08:28:35 -0700 (PDT) From: Dmitry Osipenko To: Mauro Carvalho Chehab , Hans Verkuil Cc: Greg Kroah-Hartman , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 4/5] media: staging: tegra-vde: Do not handle spurious interrupts Date: Sat, 17 Mar 2018 18:28:14 +0300 Message-Id: <8d1b583bde182ab79a18f43df83f87affda6b174.1521300358.git.digetx@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: References: In-Reply-To: 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 Do not handle interrupts if we haven't asked for them, potentially that could happen if HW wasn't programmed properly. Signed-off-by: Dmitry Osipenko --- drivers/staging/media/tegra-vde/tegra-vde.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c b/drivers/staging/media/tegra-vde/tegra-vde.c index 94b4db55cdb5..9e542c6288f1 100644 --- a/drivers/staging/media/tegra-vde/tegra-vde.c +++ b/drivers/staging/media/tegra-vde/tegra-vde.c @@ -935,6 +935,9 @@ static irqreturn_t tegra_vde_isr(int irq, void *data) { struct tegra_vde *vde = data; + if (completion_done(&vde->decode_completion)) + return IRQ_NONE; + tegra_vde_set_bits(vde, 0, vde->frameid + 0x208); complete(&vde->decode_completion);