All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com, yogesh.mohan.marimuthu@intel.com
Subject: [PATCH 06/14] drm/i915: add structs for MIPI DSI output
Date: Tue, 13 Aug 2013 16:29:45 +0300	[thread overview]
Message-ID: <c539e93a7a119e51299e2cc913c8b5860a040e4a.1376397804.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1376397804.git.jani.nikula@intel.com>
In-Reply-To: <cover.1376397804.git.jani.nikula@intel.com>

The sub-encoder model is copied from DVO.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi.h |   99 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/intel_dsi.h

diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h
new file mode 100644
index 0000000..45f649a
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_dsi.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _INTEL_DSI_H
+#define _INTEL_DSI_H
+
+#include <drm/drmP.h>
+#include <drm/drm_crtc.h>
+#include "intel_drv.h"
+
+struct intel_dsi_device {
+	unsigned int panel_id;
+	const char *name;
+	int type;
+	const struct intel_dsi_dev_ops *dev_ops;
+	void *dev_priv;
+};
+
+struct intel_dsi_dev_ops {
+	bool (*init)(struct intel_dsi_device *dsi);
+
+	/* This callback must be able to assume DSI commands can be sent */
+	void (*enable)(struct intel_dsi_device *dsi);
+
+	/* This callback must be able to assume DSI commands can be sent */
+	void (*disable)(struct intel_dsi_device *dsi);
+
+	int (*mode_valid)(struct intel_dsi_device *dsi,
+			  struct drm_display_mode *mode);
+
+	bool (*mode_fixup)(struct intel_dsi_device *dsi,
+			   const struct drm_display_mode *mode,
+			   struct drm_display_mode *adjusted_mode);
+
+	void (*mode_set)(struct intel_dsi_device *dsi,
+			 struct drm_display_mode *mode,
+			 struct drm_display_mode *adjusted_mode);
+
+	enum drm_connector_status (*detect)(struct intel_dsi_device *dsi);
+
+	bool (*get_hw_state)(struct intel_dsi_device *dev);
+
+	struct drm_display_mode *(*get_modes)(struct intel_dsi_device *dsi);
+
+	void (*destroy) (struct intel_dsi_device *dsi);
+};
+
+struct intel_dsi {
+	struct intel_encoder base;
+
+	struct intel_dsi_device dev;
+
+	struct drm_display_mode *panel_fixed_mode;
+
+	/* if true, use HS mode, otherwise LP */
+	bool hs;
+
+	/* virtual channel */
+	int channel;
+
+	/* number of DSI lanes */
+	unsigned int lane_count;
+
+	/* video mode pixel format for MIPI_DSI_FUNC_PRG register */
+	u32 pixel_format;
+
+	/* video mode format for MIPI_VIDEO_MODE_FORMAT register */
+	u32 video_mode_format;
+
+	/* eot for MIPI_EOT_DISABLE register */
+	u32 eot_disable;
+};
+
+static inline struct intel_dsi *enc_to_intel_dsi(struct drm_encoder *encoder)
+{
+	return container_of(encoder, struct intel_dsi, base.base);
+}
+
+#endif /* _INTEL_DSI_H */
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2013-08-13 13:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 13:29 [PATCH 00/14] drm/i915: Baytrail MIPI DSI support Jani Nikula
2013-08-13 13:29 ` [PATCH 01/14] drm: add MIPI DSI encoder and connector types Jani Nikula
2013-08-13 13:29 ` [PATCH 02/14] drm/i915: add more VLV IOSF sideband ports accessors Jani Nikula
2013-08-13 13:29 ` [PATCH 03/14] drm/i915: add VLV pipeconf bit definition for DSI PLL lock Jani Nikula
2013-08-13 13:29 ` [PATCH 04/14] drm/i915: add MIPI DSI register definitions Jani Nikula
2013-08-14 13:59   ` Ville Syrjälä
2013-08-15  8:02     ` Jani Nikula
2013-08-15 13:38   ` Damien Lespiau
2013-08-15 14:08     ` Daniel Vetter
2013-08-13 13:29 ` [PATCH 05/14] drm/i915: add MIPI DSI output type and subtypes Jani Nikula
2013-08-13 13:29 ` Jani Nikula [this message]
2013-08-13 13:29 ` [PATCH 07/14] drm/i915: add MIPI DSI command sending routines Jani Nikula
2013-08-13 13:29 ` [PATCH 08/14] drm/i915: add basic MIPI DSI output support Jani Nikula
2013-08-13 22:17   ` Daniel Vetter
2013-08-13 13:29 ` [PATCH 09/14] drm/i915: add VLV DSI PLL Calculations Jani Nikula
2013-08-13 13:29 ` [PATCH 10/14] drm/i915: don't enable DPLL for DSI Jani Nikula
2013-08-13 13:29 ` [PATCH 11/14] drm/i915: Band Gap WA Jani Nikula
2013-08-13 13:29 ` [PATCH 12/14] drm/i915: Parse the MIPI related VBT Block and store relevant info Jani Nikula
2013-08-13 13:29 ` [PATCH 13/14] drm/i915: initialize DSI output on VLV Jani Nikula
2013-08-13 13:29 ` [PATCH 14/14] drm/i915: add AUO MIPI DSI display sub-encoder Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c539e93a7a119e51299e2cc913c8b5860a040e4a.1376397804.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yogesh.mohan.marimuthu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.