From patchwork Fri Jan 11 03:50:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10757309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D64C1515 for ; Fri, 11 Jan 2019 03:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A73C29BFE for ; Fri, 11 Jan 2019 03:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AAB229C12; Fri, 11 Jan 2019 03:52:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6F64B29BFE for ; Fri, 11 Jan 2019 03:52:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D0A16F53A; Fri, 11 Jan 2019 03:52:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id C98E76F519 for ; Fri, 11 Jan 2019 03:51:39 +0000 (UTC) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D66401823; Fri, 11 Jan 2019 04:51:29 +0100 (CET) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 16/49] drm/omap: Expose DRM modes instead of timings in display devices Date: Fri, 11 Jan 2019 05:50:47 +0200 Message-Id: <20190111035120.20668-17-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com> References: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP omap_dss_device operations expose fixed video timings through a .get_timings() operation that return a single timing for the device. To prepare for the move to drm_bridge, modify the API to instead add DRM modes directly to the connector. As this puts more burden on display devices, we also create a helper function for panels to add a single DRM mode from the panel video timings. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 8 ++--- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 10 +++--- .../displays/panel-lgphilips-lb035q02.c | 8 ++--- .../omapdrm/displays/panel-nec-nl8048hl11.c | 8 ++--- .../displays/panel-sharp-ls037v7dw01.c | 8 ++--- .../omapdrm/displays/panel-sony-acx565akm.c | 8 ++--- .../omapdrm/displays/panel-tpo-td028ttec1.c | 8 ++--- .../omapdrm/displays/panel-tpo-td043mtea1.c | 8 ++--- drivers/gpu/drm/omapdrm/dss/display.c | 22 +++++++++++++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 8 +++-- drivers/gpu/drm/omapdrm/dss/venc.c | 12 ++++--- drivers/gpu/drm/omapdrm/omap_connector.c | 33 ++++++------------- 12 files changed, 80 insertions(+), 61 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index eee44d9ea0c3..d6a584292e91 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -68,12 +68,12 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) regulator_disable(ddata->vcc_supply); } -static void panel_dpi_get_timings(struct omap_dss_device *dssdev, - struct videomode *vm) +static int panel_dpi_get_modes(struct omap_dss_device *dssdev, + struct drm_connector *connector) { struct panel_drv_data *ddata = to_panel_data(dssdev); - *vm = ddata->vm; + return omapdss_display_get_modes(connector, &ddata->vm); } static const struct omap_dss_device_ops panel_dpi_ops = { @@ -83,7 +83,7 @@ static const struct omap_dss_device_ops panel_dpi_ops = { .enable = panel_dpi_enable, .disable = panel_dpi_disable, - .get_timings = panel_dpi_get_timings, + .get_modes = panel_dpi_get_modes, }; static int panel_dpi_probe_of(struct platform_device *pdev) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index ffbf20e6ebe9..9cd9ab487a24 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -24,6 +24,8 @@ #include #include +#include + #include