From patchwork Sun Jun 1 03:39:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 4277031 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E9F99F1D6 for ; Sun, 1 Jun 2014 03:39:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2D2120270 for ; Sun, 1 Jun 2014 03:39:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74924202E6 for ; Sun, 1 Jun 2014 03:39:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756803AbaFADjd (ORCPT ); Sat, 31 May 2014 23:39:33 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:59653 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755761AbaFADj3 (ORCPT ); Sat, 31 May 2014 23:39:29 -0400 Received: from avalon.ideasonboard.com (8.26-200-80.adsl-dyn.isp.belgacom.be [80.200.26.8]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6F44A35A73; Sun, 1 Jun 2014 05:39:02 +0200 (CEST) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 12/18] v4l: vsp1: wpf: Clear RPF to WPF association at stream off time Date: Sun, 1 Jun 2014 05:39:31 +0200 Message-Id: <1401593977-30660-13-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1401593977-30660-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1401593977-30660-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The VSP1 stores the video pipelines' input (RPF) to output (WPF) mappings in a WPF register. An RPF must never be associated with multiple WPFs, even if all of those WPFs but one are unused, otherwise the hardware won't function properly. The driver doesn't ensure this correctly as it never clears the mappings. An RPF used with one WPF and later with a different WPF will lead to malfunction, as it will be associated with two WPFs. Clear the mappings at stream off time to fix this. Reported-by: Damian Hobson-Garcia Signed-off-by: Laurent Pinchart --- drivers/media/platform/vsp1/vsp1_wpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index 591f09c..d330865 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c @@ -54,6 +54,7 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) if (!enable) { vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), 0); + vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, 0); return 0; }