From patchwork Thu Aug 29 13:31:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2851390 Return-Path: X-Original-To: patchwork-linux-fbdev@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 155E5BF546 for ; Thu, 29 Aug 2013 13:33:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9F6420254 for ; Thu, 29 Aug 2013 13:33:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39DE72020A for ; Thu, 29 Aug 2013 13:33:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843Ab3H2Ncp (ORCPT ); Thu, 29 Aug 2013 09:32:45 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:49971 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754702Ab3H2NcY (ORCPT ); Thu, 29 Aug 2013 09:32:24 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7TDWOXA024023; Thu, 29 Aug 2013 08:32:24 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7TDWOVu017798; Thu, 29 Aug 2013 08:32:24 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Thu, 29 Aug 2013 08:32:24 -0500 Received: from deskari.tieu.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7TDW75H015728; Thu, 29 Aug 2013 08:32:23 -0500 From: Tomi Valkeinen To: , CC: Archit Taneja , Tomi Valkeinen Subject: [PATCH 11/15] OMAPDSS: VENC: remove code related to old panel model Date: Thu, 29 Aug 2013 16:31:56 +0300 Message-ID: <1377783120-14001-12-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com> References: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Now that the old panel drivers have been removed, we can remove the old-model API and related code from the DSS encoder drivers. This patch removes the code from the VENC driver. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/Makefile | 2 +- drivers/video/omap2/dss/dss.h | 14 ----- drivers/video/omap2/dss/venc.c | 118 ++++++--------------------------------- 3 files changed, 17 insertions(+), 117 deletions(-) diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index e022ed1..94832eb 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -7,7 +7,7 @@ omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \ dispc-compat.o display-sysfs.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 +omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o ti_hdmi_4xxx_ip.o diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 6142885..68dd27f 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -434,20 +434,6 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, /* VENC */ int venc_init_platform_driver(void) __init; void venc_uninit_platform_driver(void) __exit; -int omapdss_venc_display_enable(struct omap_dss_device *dssdev); -void omapdss_venc_display_disable(struct omap_dss_device *dssdev); -void omapdss_venc_set_timings(struct omap_dss_device *dssdev, - struct omap_video_timings *timings); -int omapdss_venc_check_timings(struct omap_dss_device *dssdev, - struct omap_video_timings *timings); -u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev); -int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss); -void omapdss_venc_set_type(struct omap_dss_device *dssdev, - enum omap_dss_venc_type type); -void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev, - bool invert_polarity); -int venc_panel_init(void); -void venc_panel_exit(void); /* HDMI */ int hdmi_init_platform_driver(void) __init; diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 496a106..0d8ccde 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -492,7 +492,7 @@ static void venc_power_off(struct omap_dss_device *dssdev) venc_runtime_put(); } -int omapdss_venc_display_enable(struct omap_dss_device *dssdev) +static int venc_display_enable(struct omap_dss_device *dssdev) { struct omap_dss_device *out = &venc.output; int r; @@ -521,7 +521,7 @@ err0: return r; } -void omapdss_venc_display_disable(struct omap_dss_device *dssdev) +static void venc_display_disable(struct omap_dss_device *dssdev) { DSSDBG("venc_display_disable\n"); @@ -532,7 +532,7 @@ void omapdss_venc_display_disable(struct omap_dss_device *dssdev) mutex_unlock(&venc.venc_lock); } -void omapdss_venc_set_timings(struct omap_dss_device *dssdev, +static void venc_set_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { DSSDBG("venc_set_timings\n"); @@ -550,7 +550,7 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev, mutex_unlock(&venc.venc_lock); } -int omapdss_venc_check_timings(struct omap_dss_device *dssdev, +static int venc_check_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { DSSDBG("venc_check_timings\n"); @@ -574,13 +574,13 @@ static void venc_get_timings(struct omap_dss_device *dssdev, mutex_unlock(&venc.venc_lock); } -u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev) +static u32 venc_get_wss(struct omap_dss_device *dssdev) { /* Invert due to VENC_L21_WC_CTL:INV=1 */ return (venc.wss_data >> 8) ^ 0xfffff; } -int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss) +static int venc_set_wss(struct omap_dss_device *dssdev, u32 wss) { const struct venc_config *config; int r; @@ -609,7 +609,7 @@ err: return r; } -void omapdss_venc_set_type(struct omap_dss_device *dssdev, +static void venc_set_type(struct omap_dss_device *dssdev, enum omap_dss_venc_type type) { mutex_lock(&venc.venc_lock); @@ -619,7 +619,7 @@ void omapdss_venc_set_type(struct omap_dss_device *dssdev, mutex_unlock(&venc.venc_lock); } -void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev, +static void venc_invert_vid_out_polarity(struct omap_dss_device *dssdev, bool invert_polarity) { mutex_lock(&venc.venc_lock); @@ -721,74 +721,6 @@ static int venc_get_clocks(struct platform_device *pdev) return 0; } -static struct omap_dss_device *venc_find_dssdev(struct platform_device *pdev) -{ - struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = omapdss_get_default_display_name(); - struct omap_dss_device *def_dssdev; - int i; - - def_dssdev = NULL; - - for (i = 0; i < pdata->num_devices; ++i) { - struct omap_dss_device *dssdev = pdata->devices[i]; - - if (dssdev->type != OMAP_DISPLAY_TYPE_VENC) - continue; - - if (def_dssdev == NULL) - def_dssdev = dssdev; - - if (def_disp_name != NULL && - strcmp(dssdev->name, def_disp_name) == 0) { - def_dssdev = dssdev; - break; - } - } - - return def_dssdev; -} - -static int venc_probe_pdata(struct platform_device *vencdev) -{ - struct omap_dss_device *plat_dssdev; - struct omap_dss_device *dssdev; - int r; - - plat_dssdev = venc_find_dssdev(vencdev); - - if (!plat_dssdev) - return 0; - - r = venc_init_regulator(); - if (r) - return r; - - dssdev = dss_alloc_and_init_device(&vencdev->dev); - if (!dssdev) - return -ENOMEM; - - dss_copy_device_pdata(dssdev, plat_dssdev); - - r = omapdss_output_set_device(&venc.output, dssdev); - if (r) { - DSSERR("failed to connect output to new device: %s\n", - dssdev->name); - dss_put_device(dssdev); - return r; - } - - r = dss_add_device(dssdev); - if (r) { - DSSERR("device %s register failed: %d\n", dssdev->name, r); - omapdss_output_unset_device(&venc.output); - dss_put_device(dssdev); - return r; - } - - return 0; -} - static int venc_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { @@ -836,18 +768,18 @@ static const struct omapdss_atv_ops venc_ops = { .connect = venc_connect, .disconnect = venc_disconnect, - .enable = omapdss_venc_display_enable, - .disable = omapdss_venc_display_disable, + .enable = venc_display_enable, + .disable = venc_display_disable, - .check_timings = omapdss_venc_check_timings, - .set_timings = omapdss_venc_set_timings, + .check_timings = venc_check_timings, + .set_timings = venc_set_timings, .get_timings = venc_get_timings, - .set_type = omapdss_venc_set_type, - .invert_vid_out_polarity = omapdss_venc_invert_vid_out_polarity, + .set_type = venc_set_type, + .invert_vid_out_polarity = venc_invert_vid_out_polarity, - .set_wss = omapdss_venc_set_wss, - .get_wss = omapdss_venc_get_wss, + .set_wss = venc_set_wss, + .get_wss = venc_get_wss, }; static void venc_init_output(struct platform_device *pdev) @@ -913,26 +845,12 @@ static int omap_venchw_probe(struct platform_device *pdev) venc_runtime_put(); - r = venc_panel_init(); - if (r) - goto err_panel_init; - dss_debugfs_create_file("venc", venc_dump_regs); venc_init_output(pdev); - if (pdev->dev.platform_data) { - r = venc_probe_pdata(pdev); - if (r) - goto err_probe; - } - return 0; -err_probe: - venc_panel_exit(); - venc_uninit_output(pdev); -err_panel_init: err_runtime_get: pm_runtime_disable(&pdev->dev); return r; @@ -940,10 +858,6 @@ err_runtime_get: static int __exit omap_venchw_remove(struct platform_device *pdev) { - dss_unregister_child_devices(&pdev->dev); - - venc_panel_exit(); - venc_uninit_output(pdev); pm_runtime_disable(&pdev->dev);