From patchwork Tue Dec 13 23:38:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9473383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2DA9D60762 for ; Tue, 13 Dec 2016 23:38:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 227B32855A for ; Tue, 13 Dec 2016 23:38:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 175A128598; Tue, 13 Dec 2016 23:38:04 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3C322855A for ; Tue, 13 Dec 2016 23:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbcLMXiC (ORCPT ); Tue, 13 Dec 2016 18:38:02 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:41954 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752359AbcLMXiC (ORCPT ); Tue, 13 Dec 2016 18:38:02 -0500 Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 60F2C2085D; Wed, 14 Dec 2016 00:37:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1481672264; bh=k/vnUNo7kn1KE6DIdHsybje6ZsEWqPwwl+iGPioares=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FC/AO6tH09C3tgwjVTQ6pjOM6bC7lXOcU4B8nkMFlYzwZJ9bliVuTJArI3nqdRGpT GeOPyyI5K3pjmzxq5aIcVnTbbee/I78kXUG48ozAd5qIAlz+jrfNSUPQRWD12iQU/p wrmXcaoADG7hpjiMwR0sSN8JbV8Wt7HYCyXxt3Ec= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-omap@vger.kernel.org, Tomi Valkeinen Subject: [PATCH/RFC 3/7] drm: omapdrm: Retrieve OMAP revision from omapdss Date: Wed, 14 Dec 2016 01:38:22 +0200 Message-Id: <1481672306-22564-4-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1481672306-22564-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1481672306-22564-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The OMAP revision is currently passed through omapdrm platform data. To prepare for removal of omapdrm platform data, get it from the omapdss. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/core.c | 8 ++++++++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 + drivers/gpu/drm/omapdrm/omap_drv.c | 3 +-- drivers/gpu/drm/omapdrm/omap_drv.h | 1 - 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/core.c b/drivers/gpu/drm/omapdrm/dss/core.c index 6a3ebfcd7223..1bf978b5c5bc 100644 --- a/drivers/gpu/drm/omapdrm/dss/core.c +++ b/drivers/gpu/drm/omapdrm/dss/core.c @@ -62,6 +62,14 @@ enum omapdss_version omapdss_get_version(void) } EXPORT_SYMBOL(omapdss_get_version); +u32 omapdss_get_omaprev(void) +{ + struct omap_dss_board_info *pdata = core.pdev->dev.platform_data; + + return pdata->omaprev; +} +EXPORT_SYMBOL(omapdss_get_omaprev); + struct platform_device *dss_get_core_pdev(void) { return core.pdev; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index b420dde8c0fb..6c2553b56971 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -767,6 +767,7 @@ struct omap_dss_driver { }; enum omapdss_version omapdss_get_version(void); +u32 omapdss_get_omaprev(void); bool omapdss_is_initialized(void); int omap_dss_register_driver(struct omap_dss_driver *); diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index a3b37823b271..0e54e3c9c291 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -743,7 +743,6 @@ static struct drm_driver omap_drm_driver = { static int pdev_probe(struct platform_device *pdev) { - struct omap_drm_platform_data *pdata = pdev->dev.platform_data; struct omap_drm_private *priv; struct drm_device *ddev; unsigned int i; @@ -769,7 +768,7 @@ static int pdev_probe(struct platform_device *pdev) goto err_disconnect_dssdevs; } - priv->omaprev = pdata->omaprev; + priv->omaprev = omapdss_get_omaprev(); priv->wq = alloc_ordered_workqueue("omapdrm", 0); init_waitqueue_head(&priv->commit.wait); diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index b20377efd01b..2c9ddcec1449 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h @@ -21,7 +21,6 @@ #define __OMAP_DRV_H__ #include -#include #include #include