From patchwork Wed Sep 5 08:25:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1406361 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E299540220 for ; Wed, 5 Sep 2012 08:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758099Ab2IEI15 (ORCPT ); Wed, 5 Sep 2012 04:27:57 -0400 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:49142 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758104Ab2IEI0a (ORCPT ); Wed, 5 Sep 2012 04:26:30 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKUEcMtCSuobKTrVcDkyVgUCFGwVQ3MHSX@postini.com; Wed, 05 Sep 2012 01:26:29 PDT Received: by lagy9 with SMTP id y9so139374lag.19 for ; Wed, 05 Sep 2012 01:26:27 -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=+BbVTo7qXpSCK7CuDKsOui9mn+D2br2xUSQdCkeVrFc=; b=IxYEs9N/nVope40C9KDHHzVCwMVa+KoppUlU2xa9t1lZa0qkFsZ8nZF7uPF3wGuSOA Fs7pAwlAOOS9ldEh0AEVI2e931eGCZqx5dQm6rXL2Lq5scMogH+uPiH0Bt4JS1m0VYnf +u0LQsJ03UlgZtdWHolhtuM64Io5rx9PIhRqwroEi95RhKqAK6E9eu+n2/L/P3F2Y1iF 8Wn651TkZfHjPQrtpspV2apat6RYQLl2bhkHcszra5zsbWVNKwZXfDTZVMNKX6jwQ8gM mOOPrSZ773sdODuEs0saUN2zZdpcrC28X+197mrzvbQ9T6IEdJe3vufY0cuyNXhrwjql kyfA== Received: by 10.112.31.170 with SMTP id b10mr7424332lbi.67.1346833586875; Wed, 05 Sep 2012 01:26:26 -0700 (PDT) Received: from localhost.localdomain (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPS id bc2sm279735lbb.3.2012.09.05.01.26.25 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:26:26 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, archit@ti.com Cc: Tomi Valkeinen Subject: [PATCH 09/17] OMAPDSS: split overlay sysfs code Date: Wed, 5 Sep 2012 11:25:47 +0300 Message-Id: <1346833555-31258-10-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346833555-31258-1-git-send-email-tomi.valkeinen@ti.com> References: <1346833555-31258-1-git-send-email-tomi.valkeinen@ti.com> X-Gm-Message-State: ALoCoQkDjdvvyCaldB0J6RFGOF6k5pQvm0Gd8DfelC6sofuS4qtGmz0gQ/a0cPuF1fh1c3SdwFYn Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Separate sysfs code for overlays to a separate file. This is a bit cleaner, and will allow us later to easily switch off the sysfs support via Kconfig option. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/Makefile | 2 +- drivers/video/omap2/dss/dss.h | 3 + drivers/video/omap2/dss/overlay-sysfs.c | 456 +++++++++++++++++++++++++++++++ drivers/video/omap2/dss/overlay.c | 420 +--------------------------- 4 files changed, 462 insertions(+), 419 deletions(-) create mode 100644 drivers/video/omap2/dss/overlay-sysfs.c diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 30a48fb..927d5ce 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_OMAP2_DSS) += omapdss.o omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \ - manager.o overlay.o apply.o + manager.o overlay.o overlay-sysfs.o apply.o omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index d6cca82..11b053e 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -265,6 +265,9 @@ int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info, const struct omap_video_timings *mgr_timings); bool dss_ovl_use_replication(struct dss_lcd_mgr_config config, enum omap_color_mode mode); +int dss_overlay_kobj_init(struct omap_overlay *ovl, + struct platform_device *pdev); +void dss_overlay_kobj_uninit(struct omap_overlay *ovl); /* DSS */ int dss_init_platform_driver(void) __init; diff --git a/drivers/video/omap2/dss/overlay-sysfs.c b/drivers/video/omap2/dss/overlay-sysfs.c new file mode 100644 index 0000000..4cc5dde --- /dev/null +++ b/drivers/video/omap2/dss/overlay-sysfs.c @@ -0,0 +1,456 @@ +/* + * Copyright (C) 2009 Nokia Corporation + * Author: Tomi Valkeinen + * + * Some code and ideas taken from drivers/video/omap/ driver + * by Imre Deak. + * + * 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. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#define DSS_SUBSYS_NAME "OVERLAY" + +#include +#include +#include +#include +#include + +#include