From patchwork Tue Oct 21 11:07:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar K X-Patchwork-Id: 5114251 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4D4C1C11AC for ; Tue, 21 Oct 2014 11:08:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 904EC2012F for ; Tue, 21 Oct 2014 11:08:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A1CB220148 for ; Tue, 21 Oct 2014 11:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbaJULIF (ORCPT ); Tue, 21 Oct 2014 07:08:05 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34289 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932323AbaJULIC (ORCPT ); Tue, 21 Oct 2014 07:08:02 -0400 Received: by mail-pa0-f41.google.com with SMTP id eu11so1207956pac.0 for ; Tue, 21 Oct 2014 04:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=LTKNIg5fUvHWZLrTJFXOleT9+ROKJnuKkcwmcrlU/zk=; b=kqDsF83Mdj3g0N77KFNmAwZd2dBVws6Uf22WPnTXn8nkXQlAu9WkZf6o9RW5zsGBuI d3gxwNI2JUfAn27y16DEoUEoHXsk140kwwRMuQpyk2XzgYZZdbGN7dCMUpTeKRSjEj9V 5NsCwO0guteQcvbBqZlckAqTeqssy08RCa6c0I4njhDWZ9ZSypRQS2o6OXzasuvoGQLc X+OBj9SF9YJWAyncWxuflbBYpAmbvjQvp/Jdga36RXBovpiwRV2E3+EwAuuYCgvTG77i JP9zcbzs18eFM4HF6dsP6CWIsLf+LVgtMLneXkXyPhao8qasJlgQfUbURokVb/t3s11U dT8Q== X-Received: by 10.67.30.162 with SMTP id kf2mr12160916pad.102.1413889680725; Tue, 21 Oct 2014 04:08:00 -0700 (PDT) Received: from localhost.localdomain ([14.140.216.146]) by mx.google.com with ESMTPSA id s9sm11680849pdp.1.2014.10.21.04.07.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 04:07:59 -0700 (PDT) From: Arun Kumar K To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: k.debski@samsung.com, wuchengli@chromium.org, posciak@chromium.org, arun.m@samsung.com, ihf@chromium.org, prathyush.k@samsung.com, kiran@chromium.org, arunkk.samsung@gmail.com Subject: [PATCH v3 09/13] [media] s5p-mfc: De-init MFC when watchdog kicks in Date: Tue, 21 Oct 2014 16:37:03 +0530 Message-Id: <1413889627-8431-10-git-send-email-arun.kk@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413889627-8431-1-git-send-email-arun.kk@samsung.com> References: <1413889627-8431-1-git-send-email-arun.kk@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arun Mankuzhi If the software watchdog kicks in, we need to de-init MFC before reloading firmware and re-intializing it again. Signed-off-by: Arun Mankuzhi Signed-off-by: Kiran AVND Signed-off-by: Arun Kumar K --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 8620236..39f8f2a 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -159,6 +159,10 @@ static void s5p_mfc_watchdog_worker(struct work_struct *work) } clear_bit(0, &dev->hw_lock); spin_unlock_irqrestore(&dev->irqlock, flags); + + /* De-init MFC */ + s5p_mfc_deinit_hw(dev); + /* Double check if there is at least one instance running. * If no instance is in memory than no firmware should be present */ if (dev->num_inst > 0) {