mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/bridge: cdns-dsi: Create a header file
Create a header file for cdns dsi and move structure definations to prepare for adding j721e wrapper support Signed-off-by: Rahul T R <r-ravikumar@ti.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230103101951.10963-5-r-ravikumar@ti.com
This commit is contained in:
parent
87a439e055
commit
6184e01f99
|
|
@ -6,10 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_bridge.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_mipi_dsi.h>
|
||||
#include <drm/drm_panel.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
|
|
@ -23,9 +20,10 @@
|
|||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/phy/phy-mipi-dphy.h>
|
||||
|
||||
#include "cdns-dsi-core.h"
|
||||
|
||||
#define IP_CONF 0x0
|
||||
#define SP_HS_FIFO_DEPTH(x) (((x) & GENMASK(30, 26)) >> 26)
|
||||
#define SP_LP_FIFO_DEPTH(x) (((x) & GENMASK(25, 21)) >> 21)
|
||||
|
|
@ -424,48 +422,6 @@
|
|||
#define DSI_NULL_FRAME_OVERHEAD 6
|
||||
#define DSI_EOT_PKT_SIZE 4
|
||||
|
||||
struct cdns_dsi_output {
|
||||
struct mipi_dsi_device *dev;
|
||||
struct drm_panel *panel;
|
||||
struct drm_bridge *bridge;
|
||||
union phy_configure_opts phy_opts;
|
||||
};
|
||||
|
||||
enum cdns_dsi_input_id {
|
||||
CDNS_SDI_INPUT,
|
||||
CDNS_DPI_INPUT,
|
||||
CDNS_DSC_INPUT,
|
||||
};
|
||||
|
||||
struct cdns_dsi_cfg {
|
||||
unsigned int hfp;
|
||||
unsigned int hsa;
|
||||
unsigned int hbp;
|
||||
unsigned int hact;
|
||||
unsigned int htotal;
|
||||
};
|
||||
|
||||
struct cdns_dsi_input {
|
||||
enum cdns_dsi_input_id id;
|
||||
struct drm_bridge bridge;
|
||||
};
|
||||
|
||||
struct cdns_dsi {
|
||||
struct mipi_dsi_host base;
|
||||
void __iomem *regs;
|
||||
struct cdns_dsi_input input;
|
||||
struct cdns_dsi_output output;
|
||||
unsigned int direct_cmd_fifo_depth;
|
||||
unsigned int rx_fifo_depth;
|
||||
struct completion direct_cmd_comp;
|
||||
struct clk *dsi_p_clk;
|
||||
struct reset_control *dsi_p_rst;
|
||||
struct clk *dsi_sys_clk;
|
||||
bool link_initialized;
|
||||
bool phy_initialized;
|
||||
struct phy *dphy;
|
||||
};
|
||||
|
||||
static inline struct cdns_dsi *input_to_dsi(struct cdns_dsi_input *input)
|
||||
{
|
||||
return container_of(input, struct cdns_dsi, input);
|
||||
|
|
|
|||
64
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.h
Normal file
64
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright: 2017 Cadence Design Systems, Inc.
|
||||
*
|
||||
* Author: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
*/
|
||||
|
||||
#ifndef __CDNS_DSI_H__
|
||||
#define __CDNS_DSI_H__
|
||||
|
||||
#include <drm/drm_bridge.h>
|
||||
#include <drm/drm_mipi_dsi.h>
|
||||
#include <drm/drm_panel.h>
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/phy/phy.h>
|
||||
|
||||
struct clk;
|
||||
struct reset_control;
|
||||
|
||||
struct cdns_dsi_output {
|
||||
struct mipi_dsi_device *dev;
|
||||
struct drm_panel *panel;
|
||||
struct drm_bridge *bridge;
|
||||
union phy_configure_opts phy_opts;
|
||||
};
|
||||
|
||||
enum cdns_dsi_input_id {
|
||||
CDNS_SDI_INPUT,
|
||||
CDNS_DPI_INPUT,
|
||||
CDNS_DSC_INPUT,
|
||||
};
|
||||
|
||||
struct cdns_dsi_cfg {
|
||||
unsigned int hfp;
|
||||
unsigned int hsa;
|
||||
unsigned int hbp;
|
||||
unsigned int hact;
|
||||
unsigned int htotal;
|
||||
};
|
||||
|
||||
struct cdns_dsi_input {
|
||||
enum cdns_dsi_input_id id;
|
||||
struct drm_bridge bridge;
|
||||
};
|
||||
|
||||
struct cdns_dsi {
|
||||
struct mipi_dsi_host base;
|
||||
void __iomem *regs;
|
||||
struct cdns_dsi_input input;
|
||||
struct cdns_dsi_output output;
|
||||
unsigned int direct_cmd_fifo_depth;
|
||||
unsigned int rx_fifo_depth;
|
||||
struct completion direct_cmd_comp;
|
||||
struct clk *dsi_p_clk;
|
||||
struct reset_control *dsi_p_rst;
|
||||
struct clk *dsi_sys_clk;
|
||||
bool link_initialized;
|
||||
bool phy_initialized;
|
||||
struct phy *dphy;
|
||||
};
|
||||
|
||||
#endif /* !__CDNS_DSI_H__ */
|
||||
Loading…
Reference in New Issue
Block a user