From patchwork Fri Jul 26 09:32:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuya Matsubara X-Patchwork-Id: 2833936 Return-Path: X-Original-To: patchwork-linux-media@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 35164C0319 for ; Fri, 26 Jul 2013 09:33:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E53AE2011F for ; Fri, 26 Jul 2013 09:33:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9878820119 for ; Fri, 26 Jul 2013 09:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758272Ab3GZJc5 (ORCPT ); Fri, 26 Jul 2013 05:32:57 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:62742 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758403Ab3GZJc4 (ORCPT ); Fri, 26 Jul 2013 05:32:56 -0400 Received: by mail-pa0-f50.google.com with SMTP id fb10so2552350pad.37 for ; Fri, 26 Jul 2013 02:32:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=NhHRA/Q+plHH+Wpb8GNcU93IQ6pfDq9lW89SwvJj6Ww=; b=AFgBsadHbu1oVYEbqRl3XwIq/fh6RLMHZkzRAtFimMSlw9klB6CTBiwUHzI17YZ0Ud GBcaRVZb0NLL8ZHyVlWKXuJpREM5PBMwG/QGaFRpGIqbGLogCbHh9kKfJpiNhqbiO3zQ gTqLF3Gjg0rG0kwmuUMzw0fh6jQ9UkIy9Zuy/cb9oAdgUBbBtbVsnBVR7vV/XuO4utPn dlRZDoe85KG1QbwEuG9sH/Wt4miw+4UBv6GAK+fWaUex1RxJ2Abgvss1n7m93r12VqCD A/i3hrekRZEcW4Jz2cxydpLL+XPChiZD/FEmeZvGF71Ze/cdfPXAUAKMwyylqbHQabu/ OvEw== X-Received: by 10.66.119.196 with SMTP id kw4mr54317606pab.164.1374831175434; Fri, 26 Jul 2013 02:32:55 -0700 (PDT) Received: from kiefer.hq.igel.co.jp ([219.106.231.132]) by mx.google.com with ESMTPSA id ot4sm2578248pac.17.2013.07.26.02.32.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Jul 2013 02:32:54 -0700 (PDT) From: Katsuya Matsubara To: Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-sh@vger.kernel.org, Hans Verkuil , Sakari Ailus , Sylwester Nawrocki , Katsuya Matsubara Subject: [PATCH 1/7] [media] vsp1: Fix lack of the sink entity registration for enabled links Date: Fri, 26 Jul 2013 18:32:11 +0900 Message-Id: <1374831137-9219-2-git-send-email-matsu@igel.co.jp> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374831137-9219-1-git-send-email-matsu@igel.co.jp> References: <1374831137-9219-1-git-send-email-matsu@igel.co.jp> X-Gm-Message-State: ALoCoQlP1j8eeioZVvzoBQGaz7Ca9oala6VDbKWXtlon0r685UmEKwZ1+P1H4R5Tp2/HH2Ec2exd Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-8.4 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 Each source entity maintains a pointer to the counterpart sink entity while an enabled link connects them. It should be managed by the setup_link callback in the media controller framework at runtime. However, enabled links which connect RPFs and WPFs that have an equivalent index number are created during initialization. This registers the pointer to a sink entity from the source entity when an enabled link is created. Signed-off-by: Katsuya Matsubara --- drivers/media/platform/vsp1/vsp1_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index 756929e..0ead308 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -101,6 +101,9 @@ static int vsp1_create_links(struct vsp1_device *vsp1, struct vsp1_entity *sink) entity, pad, flags); if (ret < 0) return ret; + + if (flags & MEDIA_LNK_FL_ENABLED) + source->sink = entity; } }