From patchwork Fri Aug 9 17:14:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2842514 Return-Path: X-Original-To: patchwork-dri-devel@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 03E96BF546 for ; Sat, 10 Aug 2013 18:22:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 829762029B for ; Sat, 10 Aug 2013 18:22:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 464A42027F for ; Sat, 10 Aug 2013 18:22:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F81BE5EB2 for ; Sat, 10 Aug 2013 11:22:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 218B1E62C9 for ; Fri, 9 Aug 2013 10:14:23 -0700 (PDT) Received: from avalon.ideasonboard.com (unknown [109.134.65.8]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 841B736704; Fri, 9 Aug 2013 19:14:03 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH/RFC v3 04/19] video: display: Add display entity notifier Date: Fri, 9 Aug 2013 19:14:55 +0200 Message-Id: <1376068510-30363-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1376068510-30363-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1376068510-30363-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailman-Approved-At: Sat, 10 Aug 2013 11:06:24 -0700 Cc: Sebastien Guiriec , Jesse Barnes , Benjamin Gaignard , Tom Gall , Kyungmin Park , Tomi Valkeinen , Stephen Warren , Mark Zhang , =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Alexandre Courbot , Ragesh Radhakrishnan , Thomas Petazzoni , Sunil Joshi , Maxime Ripard , Vikas Sajjan , Marcus Lorentzon X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED,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 Display entities are initialized by they respective drivers asynchronously with the master display driver. The notifier infrastructure allows display drivers to create a list of entities they need (based on platform data) and be notified when those entities are added to or removed from the system. Signed-off-by: Laurent Pinchart --- drivers/video/display/Makefile | 3 +- drivers/video/display/display-notifier.c | 304 +++++++++++++++++++++++++++++++ include/video/display.h | 66 +++++++ 3 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 drivers/video/display/display-notifier.c diff --git a/drivers/video/display/Makefile b/drivers/video/display/Makefile index 3054adc..b907aad 100644 --- a/drivers/video/display/Makefile +++ b/drivers/video/display/Makefile @@ -1,2 +1,3 @@ -display-y := display-core.o +display-y := display-core.o \ + display-notifier.o obj-$(CONFIG_DISPLAY_CORE) += display.o diff --git a/drivers/video/display/display-notifier.c b/drivers/video/display/display-notifier.c new file mode 100644 index 0000000..c9210ec --- /dev/null +++ b/drivers/video/display/display-notifier.c @@ -0,0 +1,304 @@ +/* + * Display Notifier + * + * Copyright (C) 2013 Renesas Solutions Corp. + * + * Contacts: Laurent Pinchart + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include + +#include