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: 1406381 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BECFBDF264 for ; Wed, 5 Sep 2012 08:28:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758108Ab2IEI15 (ORCPT ); Wed, 5 Sep 2012 04:27:57 -0400 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:57571 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758103Ab2IEI0a (ORCPT ); Wed, 5 Sep 2012 04:26:30 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob108.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 y9so139373lag.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=MNBlQ/1hD5U+w8D0CtLYxxSTq8f332wze9JmAfls9YigruFMfAqK7zSvVhvpqY/LTV XBixV1ZGVTPlTX2OlKXoIXxMuUG3t6GBwclVUQY+O8xxsxvjWGGG9OIn0NQpTa8T3zNk rXrD+dh31r/CNhvJ/pCVMTv0+Lggkx4mbdYv2HZP7NF0HrE7gNAeKTavl0wXBCaF7P07 uLz1milklCBO6WA0q3Layl5qFWU7ubMh2rRi4VSRD46TeW3Rv+sMaq7Ykhi6Ezrh8aFA IwIZtRpcPYKK9SBR2DzWe/5sWrRfC/nqQXqZtxV+CYpA7lspGJscCCyvCzW5Db9RJlD4 S9Ig== 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: ALoCoQno/b/3tz1mOvTyLowAlb9h6A9MWqfQWGMFZdKNhnfrWp6Pd+IQT8NvQctIftq6HwyuvxQV Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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