linux/drivers/gpu/drm/i915/display/intel_dsi.h

/*
 * 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/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>

#include "intel_display_types.h"

#define INTEL_DSI_VIDEO_MODE
#define INTEL_DSI_COMMAND_MODE

/* Dual Link support */
#define DSI_DUAL_LINK_NONE
#define DSI_DUAL_LINK_FRONT_BACK
#define DSI_DUAL_LINK_PIXEL_ALT

struct intel_dsi_host;

struct intel_dsi {};

struct intel_dsi_host {};

static inline struct intel_dsi_host *to_intel_dsi_host(struct mipi_dsi_host *h)
{}

#define for_each_dsi_port(__port, __ports_mask)
#define for_each_dsi_phy(__phy, __phys_mask)

static inline struct intel_dsi *enc_to_intel_dsi(struct intel_encoder *encoder)
{}

static inline bool is_vid_mode(struct intel_dsi *intel_dsi)
{}

static inline bool is_cmd_mode(struct intel_dsi *intel_dsi)
{}

static inline u16 intel_dsi_encoder_ports(struct intel_encoder *encoder)
{}

int intel_dsi_bitrate(const struct intel_dsi *intel_dsi);
int intel_dsi_tlpx_ns(const struct intel_dsi *intel_dsi);
enum drm_panel_orientation
intel_dsi_get_panel_orientation(struct intel_connector *connector);
int intel_dsi_get_modes(struct drm_connector *connector);
enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
					  struct drm_display_mode *mode);
struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
					   const struct mipi_dsi_host_ops *funcs,
					   enum port port);
void intel_dsi_wait_panel_power_cycle(struct intel_dsi *intel_dsi);
void intel_dsi_shutdown(struct intel_encoder *encoder);

#endif /* _INTEL_DSI_H */