From patchwork Thu Feb 8 10:21:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 127665 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1444569ljc; Thu, 8 Feb 2018 04:38:21 -0800 (PST) X-Google-Smtp-Source: AH8x22760Brtd+GH+HyEpkib99A9nj2PBKKZe3MBK2QWG45tp1vY4fwtoXwXVux8L0hu/+HGapMf X-Received: by 10.99.114.71 with SMTP id c7mr413668pgn.283.1518093500968; Thu, 08 Feb 2018 04:38:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518093500; cv=none; d=google.com; s=arc-20160816; b=ww6alfMSGsND5N27m64OHyobUPCiYCapgDSI13LgzUN+Lee6HUMv6xTeBQCDaBlPji vxW+ql2OgxuV4FHcZRicRzupzXkMl78RtnqFfWdALtWRuElTyQolWmyJ5uh+JhBVo2yI 4WO9K6JVzVkiKreO6BoJdbY9TuW2CQ0iG+oFYK64eXJ7778Gh0vi7KaH6P5u/8cTVGaw Oq5O0hZWHdRolksCev7DF0v7vQjNnCvHBHzM/wGj3Xya2KCn3ezPdPB1PKeff/AQ6rWY EHbZpCeI+EE9uhuTB+Ci1MjPVeu0wCaMqvzsS2PnIu5xEuhot7psjoA4QsacbIm90IkB 3sAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=AGqer2HIoE/0/FHiRXHs9gYkFAaDHdFhsFOYQNzcVC4=; b=Htks54VPzxV+c/m/ShxzFGSV4MD5nWe3EFbKkWcxLO/hzIsRMi7ZqrZWSb5tSOK+yp x5AJq+xPQMPa6RJQgZa9phRJae2RW8zi/PrxHds9GBG7C8Q3zsgOy/z4isgVCEo2OBaw XAjIlH84uAmlUEBKYypNIBq3tBazUAFowsTFXMHMhNlXF3a5WfImovQhca3LAOE6bUi3 iPTD9s7WGwSt1EuEa8FStKGumQxFvuC2ephLfpKgrdTSqka3FnlYZU5K8n8h/hgWcJmj Lc6V1qzicXyjFAm/Eygq3MgXqhid0Wr11kfWVP5LEDzlwRYUbDEVZdGS51j9IaFJWQar 8BYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=b+dVm2SH; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id a5-v6si2710949plp.416.2018.02.08.04.38.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2018 04:38:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=b+dVm2SH; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E78846E608; Thu, 8 Feb 2018 12:37:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B20D6E605 for ; Thu, 8 Feb 2018 12:37:45 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w18ALG9p011009; Thu, 8 Feb 2018 04:21:16 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518085276; bh=4ER3JWyEvIT3zlMkal45rQWHMxIc1UVKI7D0mKWa6Ps=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=b+dVm2SHUg/MR7kEiUmA9qs2Mc1FBFzr1TM0wS6OMA+mYJ1oIbe46d129+pa29oQy OAO7cs5hq7Goae5OmJ0l5k4ZEtFWKhHzyoVLGcXTw5BGpF7qgA413hY6FN91arnEut jgnAPqDlSUS8Jx1zT78e+NAaDsiy7hp+w9hxzyd0= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w18ALGiM015881; Thu, 8 Feb 2018 04:21:16 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 8 Feb 2018 04:21:16 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 8 Feb 2018 04:21:16 -0600 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w18AL9C0012092; Thu, 8 Feb 2018 04:21:15 -0600 From: Jyri Sarha To: Subject: [PATCH v4 4/6] drm/omap: move common stuff from dss.h to omapdss.h Date: Thu, 8 Feb 2018 12:21:04 +0200 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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@ti.com, laurent.pinchart@ideasonboard.com, Jyri Sarha Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Tomi Valkeinen The new DSS6 driver needs some structs and defines which are currently in dss.h, which is for the old DSS driver. Move the required structs and defines from dss.h to omapdss.h. Signed-off-by: Tomi Valkeinen Signed-off-by: Jyri Sarha --- drivers/gpu/drm/omapdrm/dss/dss.h | 37 ----------------------------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.h b/drivers/gpu/drm/omapdrm/dss/dss.h index 6374e57e..7347cb9 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.h +++ b/drivers/gpu/drm/omapdrm/dss/dss.h @@ -65,14 +65,6 @@ pr_warn("omapdss: " format, ##__VA_ARGS__) #endif -/* OMAP TRM gives bitfields as start:end, where start is the higher bit - number. For example 7:0 */ -#define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end)) -#define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end)) -#define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end)) -#define FLD_MOD(orig, val, start, end) \ - (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end)) - enum dss_model { DSS_MODEL_OMAP2, DSS_MODEL_OMAP3, @@ -81,12 +73,6 @@ enum dss_model { DSS_MODEL_DRA7, }; -enum dss_io_pad_mode { - DSS_IO_PAD_MODE_RESET, - DSS_IO_PAD_MODE_RFBI, - DSS_IO_PAD_MODE_BYPASS, -}; - enum dss_hdmi_venc_clk_source_select { DSS_VENC_TV_CLK = 0, DSS_HDMI_M_PCLK = 1, @@ -209,29 +195,6 @@ struct dss_reg_field { u8 start, end; }; -struct dispc_clock_info { - /* rates that we get with dividers below */ - unsigned long lck; - unsigned long pck; - - /* dividers */ - u16 lck_div; - u16 pck_div; -}; - -struct dss_lcd_mgr_config { - enum dss_io_pad_mode io_pad_mode; - - bool stallmode; - bool fifohandcheck; - - struct dispc_clock_info clock_info; - - int video_port_width; - - int lcden_sig_polarity; -}; - struct seq_file; struct platform_device; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 4b2068e..8395d5b 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -624,6 +624,43 @@ static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev) struct omap_dss_device * omapdss_of_find_source_for_first_ep(struct device_node *node); +/* OMAP TRM gives bitfields as start:end, where start is the higher bit + number. For example 7:0 */ +#define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end)) +#define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end)) +#define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end)) +#define FLD_MOD(orig, val, start, end) \ + (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end)) + +enum dss_io_pad_mode { + DSS_IO_PAD_MODE_RESET, + DSS_IO_PAD_MODE_RFBI, + DSS_IO_PAD_MODE_BYPASS, +}; + +struct dispc_clock_info { + /* rates that we get with dividers below */ + unsigned long lck; + unsigned long pck; + + /* dividers */ + u16 lck_div; + u16 pck_div; +}; + +struct dss_lcd_mgr_config { + enum dss_io_pad_mode io_pad_mode; + + bool stallmode; + bool fifohandcheck; + + struct dispc_clock_info clock_info; + + int video_port_width; + + int lcden_sig_polarity; +}; + void omapdss_set_is_initialized(bool set); struct device_node *dss_of_port_get_parent_device(struct device_node *port);