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: 2833935 Return-Path: X-Original-To: patchwork-linux-sh@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 E1C809F4D4 for ; Fri, 26 Jul 2013 09:32:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1297B2012D for ; Fri, 26 Jul 2013 09:32:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B04820122 for ; Fri, 26 Jul 2013 09:32:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758195Ab3GZJc4 (ORCPT ); Fri, 26 Jul 2013 05:32:56 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:39210 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758397Ab3GZJcz (ORCPT ); Fri, 26 Jul 2013 05:32:55 -0400 Received: by mail-pd0-f178.google.com with SMTP id w16so822827pde.23 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=GcDjmBEB4VrXdqOEil+4VYd8dfKJrAzoNBPJSoo0C9d80yPF5aqCMWKhfIFfkr5+IY Y0dAB57EFgq0PYBHoZOBcFeJp0azdVdtALDdMJsqiiQrsa3mtAC4ehpgFboItXoWjcb3 YWaSYKC56wmzJdT5P1wxzCT6JKzHwe+ZVI5GibxaZq85PZwE1PhCiRyUy15vBeib6N37 CimFKhPePhvwnEG1wJBozhsRyKGhJg6tTTExCAjzNCvirnzzFguyOnMjzbZJExKdPa+L /w2OiZyzCM1UU8MIQFQQ0BH+SSgLxj9QqXbFdyH7S7FM2wc5WV2WUG6z2oSPw6ZExiPe yiWw== 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: ALoCoQnph5w65N6fG6q2fQE/oJmBuE/ljHkT1e7lAWd/ewNrDjW7woNhmbU8C7w82wnyK/NUqzM1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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; } }