From patchwork Tue May 29 22:41:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10437379 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 E4152603B5 for ; Tue, 29 May 2018 22:41:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3946287B4 for ; Tue, 29 May 2018 22:41:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6CA8287C3; Tue, 29 May 2018 22:41:45 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 88644287B4 for ; Tue, 29 May 2018 22:41:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967819AbeE2Wld (ORCPT ); Tue, 29 May 2018 18:41:33 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38612 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967570AbeE2Wlb (ORCPT ); Tue, 29 May 2018 18:41:31 -0400 Received: by mail-lf0-f68.google.com with SMTP id z142-v6so1213840lff.5; Tue, 29 May 2018 15:41:30 -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; bh=xoR89gRWWH6sS16EUjhHT6Zg2xzB8JbRPjcQUvNnW8I=; b=axDC1csqXv+XIc3/Kyr8lb5KVUCYXp07VdWYzbpmd0NWik3rSS9g0g0tJFNCGbEV8h LvqYjIpAnOKSxG/Trj7S3nkHUMD+YTWefZzt6UuIusOIoH6Vq2RGGVUxyie2/niUOSUh jLfGxGUTXjF4yNE3oaZWz/sNnXfM6cTnREyKFS16VUkVC86Zv9Zmi2tMWfBouiY1KbCi FEbOcThXg6VSd/wBiuzxBTYFdTsvF0ZoopzYd6HNbsD9bAviID0c+p8swdZdaJ/5WfRG Qp8jJM8o7Y96A1hRw1fnvlkAE7FSkz7iPGMJX1eZoOjFVtmM6qqgLXCO6q/LbNl9l3CY e/SQ== 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; bh=xoR89gRWWH6sS16EUjhHT6Zg2xzB8JbRPjcQUvNnW8I=; b=lvwbRHA2LOyEUpECbSdmorcJLXpxC6DENFj9HJ2Ob98I3kG9lnGtGtLlh/0obFUB7e 6fWFIEaPOKmBp6+lM2espSRrlCYF3IUgv1vgEFAgdkpnLWCtOANDSRrdac4ODCwuLzK+ BePmY/4c/cgHnkn0ug4zByQtbZf+lIKTNH7UsCxSczNmroVvqD5VYDOLNMXZwPbuMJLS Avfzn34XKeY3YbLzEpxa51bUJK/G3W2depNj990GcdufAt6xCfLX4cCC0aZj5sgsNRyB gJOdkXstUVmS30SDGh9XZYX3Y0OOdlUMtiMYXgz/xbkexaf9FiaTgjqCqI6rrbIicFs+ IlUw== X-Gm-Message-State: ALKqPwfKjnCu5DqbuoAcsTY66aG021Qp65FL7D1na5iEUsU0qJ5IZ19s mOhWsQFr3nlcqp3xM52K+GQ= X-Google-Smtp-Source: ADUXVKIbl7bEqaEtd/otI6JpbPODQCkELi2Z83boZ7AakYYl0YOksRGm8WqFwsHB3oi1GXY/o+fxZg== X-Received: by 2002:a19:c203:: with SMTP id l3-v6mr147917lfc.55.1527633689605; Tue, 29 May 2018 15:41:29 -0700 (PDT) Received: from localhost.localdomain (109-252-91-41.nat.spd-mgts.ru. [109.252.91.41]) by smtp.gmail.com with ESMTPSA id x72-v6sm1762269lfi.52.2018.05.29.15.41.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 15:41:28 -0700 (PDT) From: Dmitry Osipenko To: Hans Verkuil , Mauro Carvalho Chehab , Thierry Reding Cc: linux-tegra@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] media: staging: tegra-vde: Reset VDE regardless of memory client resetting failure Date: Wed, 30 May 2018 01:41:06 +0300 Message-Id: <20180529224106.31565-1-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 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 A failed memory client reset doesn't prevent VDE from resetting, hence reset VDE regardless of preceding memory client resetting failure. Signed-off-by: Dmitry Osipenko --- drivers/staging/media/tegra-vde/tegra-vde.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c b/drivers/staging/media/tegra-vde/tegra-vde.c index 6dd3bf4481be..6f06061a40d9 100644 --- a/drivers/staging/media/tegra-vde/tegra-vde.c +++ b/drivers/staging/media/tegra-vde/tegra-vde.c @@ -901,15 +901,12 @@ static int tegra_vde_ioctl_decode_h264(struct tegra_vde *vde, * the whole system. */ err = reset_control_assert(vde->rst_mc); - if (!err) { - err = reset_control_assert(vde->rst); - if (err) - dev_err(dev, - "DEC end: Failed to assert HW reset: %d\n", - err); - } else { + if (err) dev_err(dev, "DEC end: Failed to assert MC reset: %d\n", err); - } + + err = reset_control_assert(vde->rst); + if (err) + dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err); put_runtime_pm: pm_runtime_mark_last_busy(dev);