struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
+ struct mipi_dbi *dbi = &dbidev->dbi;
u8 addr_mode;
int ret, idx;
static int hx8357d_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct mipi_dbi *dbidev;
+ struct mipi_dbi_dev *dbidev;
struct drm_device *drm;
struct gpio_desc *dc;
u32 rotation = 0;
device_property_read_u32(dev, "rotation", &rotation);
- ret = mipi_dbi_spi_init(spi, dbidev, dc);
+ ret = mipi_dbi_spi_init(spi, &dbidev->dbi, dc);
if (ret)
return ret;
- ret = mipi_dbi_init(dbidev, &hx8357d_pipe_funcs, &yx350hv15_mode, rotation);
+ ret = mipi_dbi_dev_init(dbidev, &hx8357d_pipe_funcs, &yx350hv15_mode, rotation);
if (ret)
return ret;
static void ili9225_fb_dirty(struct drm_framebuffer *fb, struct drm_rect *rect)
{
struct drm_gem_cma_object *cma_obj = drm_fb_cma_get_gem_obj(fb, 0);
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(fb->dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(fb->dev);
unsigned int height = rect->y2 - rect->y1;
unsigned int width = rect->x2 - rect->x1;
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi *dbi = &dbidev->dbi;
bool swap = dbi->swap_bytes;
u16 x_start, y_start;
u16 x1, x2, y1, y2;
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
struct drm_framebuffer *fb = plane_state->fb;
struct device *dev = pipe->crtc.dev->dev;
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi *dbi = &dbidev->dbi;
struct drm_rect rect = {
.x1 = 0,
.x2 = fb->width,
static void ili9225_pipe_disable(struct drm_simple_display_pipe *pipe)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
+ struct mipi_dbi *dbi = &dbidev->dbi;
DRM_DEBUG_KMS("\n");
static int ili9225_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct mipi_dbi *dbidev;
+ struct mipi_dbi_dev *dbidev;
struct drm_device *drm;
struct mipi_dbi *dbi;
struct gpio_desc *rs;
if (!dbidev)
return -ENOMEM;
- dbi = dbidev;
+ dbi = &dbidev->dbi;
drm = &dbidev->drm;
ret = devm_drm_dev_init(dev, drm, &ili9225_driver);
if (ret) {
/* override the command function set in mipi_dbi_spi_init() */
dbi->command = ili9225_dbi_command;
- ret = mipi_dbi_init(dbidev, &ili9225_pipe_funcs, &ili9225_mode, rotation);
+ ret = mipi_dbi_dev_init(dbidev, &ili9225_pipe_funcs, &ili9225_mode, rotation);
if (ret)
return ret;
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
+ struct mipi_dbi *dbi = &dbidev->dbi;
u8 addr_mode;
int ret, idx;
static int ili9341_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct mipi_dbi *dbidev;
+ struct mipi_dbi_dev *dbidev;
struct drm_device *drm;
struct mipi_dbi *dbi;
struct gpio_desc *dc;
if (!dbidev)
return -ENOMEM;
- dbi = dbidev;
+ dbi = &dbidev->dbi;
drm = &dbidev->drm;
ret = devm_drm_dev_init(dev, drm, &ili9341_driver);
if (ret) {
if (ret)
return ret;
- ret = mipi_dbi_init(dbidev, &ili9341_pipe_funcs, &yx240qv29_mode, rotation);
+ ret = mipi_dbi_dev_init(dbidev, &ili9341_pipe_funcs, &yx240qv29_mode, rotation);
if (ret)
return ret;
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
+ struct mipi_dbi *dbi = &dbidev->dbi;
u8 addr_mode;
int ret, idx;
static int mi0283qt_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct mipi_dbi *dbidev;
+ struct mipi_dbi_dev *dbidev;
struct drm_device *drm;
struct mipi_dbi *dbi;
struct gpio_desc *dc;
if (!dbidev)
return -ENOMEM;
- dbi = dbidev;
+ dbi = &dbidev->dbi;
drm = &dbidev->drm;
ret = devm_drm_dev_init(dev, drm, &mi0283qt_driver);
if (ret) {
if (ret)
return ret;
- ret = mipi_dbi_init(dbidev, &mi0283qt_pipe_funcs, &mi0283qt_mode, rotation);
+ ret = mipi_dbi_dev_init(dbidev, &mi0283qt_pipe_funcs, &mi0283qt_mode, rotation);
if (ret)
return ret;
static void mipi_dbi_fb_dirty(struct drm_framebuffer *fb, struct drm_rect *rect)
{
struct drm_gem_cma_object *cma_obj = drm_fb_cma_get_gem_obj(fb, 0);
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(fb->dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(fb->dev);
unsigned int height = rect->y2 - rect->y1;
unsigned int width = rect->x2 - rect->x1;
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi *dbi = &dbidev->dbi;
bool swap = dbi->swap_bytes;
int idx, ret = 0;
bool full;
* framebuffer flushing, can't use this function since they both use the same
* flushing code.
*/
-void mipi_dbi_enable_flush(struct mipi_dbi *dbidev,
+void mipi_dbi_enable_flush(struct mipi_dbi_dev *dbidev,
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
}
EXPORT_SYMBOL(mipi_dbi_enable_flush);
-static void mipi_dbi_blank(struct mipi_dbi *dbidev)
+static void mipi_dbi_blank(struct mipi_dbi_dev *dbidev)
{
struct drm_device *drm = &dbidev->drm;
u16 height = drm->mode_config.min_height;
u16 width = drm->mode_config.min_width;
+ struct mipi_dbi *dbi = &dbidev->dbi;
size_t len = width * height * 2;
- struct mipi_dbi *dbi = dbidev;
int idx;
if (!drm_dev_enter(drm, &idx))
*/
void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
if (!dbidev->enabled)
return;
static int mipi_dbi_connector_get_modes(struct drm_connector *connector)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(connector->dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(connector->dev);
struct drm_display_mode *mode;
mode = drm_mode_duplicate(connector->dev, &dbidev->mode);
};
/**
- * mipi_dbi_init_with_formats - MIPI DBI initialization with custom formats
+ * mipi_dbi_dev_init_with_formats - MIPI DBI device initialization with custom formats
* @dbidev: MIPI DBI device structure to initialize
* @funcs: Display pipe functions
* @formats: Array of supported formats (DRM_FORMAT\_\*).
* has one fixed &drm_display_mode which is rotated according to @rotation.
* This mode is used to set the mode config min/max width/height properties.
*
- * Use mipi_dbi_init() if you don't need custom formats.
+ * Use mipi_dbi_dev_init() if you don't need custom formats.
*
* Note:
* Some of the helper functions expects RGB565 to be the default format and the
* Returns:
* Zero on success, negative error code on failure.
*/
-int mipi_dbi_init_with_formats(struct mipi_dbi *dbidev,
- const struct drm_simple_display_pipe_funcs *funcs,
- const uint32_t *formats, unsigned int format_count,
- const struct drm_display_mode *mode,
- unsigned int rotation, size_t tx_buf_size)
+int mipi_dbi_dev_init_with_formats(struct mipi_dbi_dev *dbidev,
+ const struct drm_simple_display_pipe_funcs *funcs,
+ const uint32_t *formats, unsigned int format_count,
+ const struct drm_display_mode *mode,
+ unsigned int rotation, size_t tx_buf_size)
{
static const uint64_t modifiers[] = {
DRM_FORMAT_MOD_LINEAR,
struct drm_device *drm = &dbidev->drm;
int ret;
- if (!dbidev->command)
+ if (!dbidev->dbi.command)
return -EINVAL;
dbidev->tx_buf = devm_kmalloc(drm->dev, tx_buf_size, GFP_KERNEL);
return 0;
}
-EXPORT_SYMBOL(mipi_dbi_init_with_formats);
+EXPORT_SYMBOL(mipi_dbi_dev_init_with_formats);
/**
- * mipi_dbi_init - MIPI DBI initialization
+ * mipi_dbi_dev_init - MIPI DBI device initialization
* @dbidev: MIPI DBI device structure to initialize
* @funcs: Display pipe functions
* @mode: Display mode
* Returns:
* Zero on success, negative error code on failure.
*/
-int mipi_dbi_init(struct mipi_dbi *dbidev,
- const struct drm_simple_display_pipe_funcs *funcs,
- const struct drm_display_mode *mode, unsigned int rotation)
+int mipi_dbi_dev_init(struct mipi_dbi_dev *dbidev,
+ const struct drm_simple_display_pipe_funcs *funcs,
+ const struct drm_display_mode *mode, unsigned int rotation)
{
size_t bufsize = mode->vdisplay * mode->hdisplay * sizeof(u16);
dbidev->drm.mode_config.preferred_depth = 16;
- return mipi_dbi_init_with_formats(dbidev, funcs, mipi_dbi_formats,
- ARRAY_SIZE(mipi_dbi_formats), mode,
- rotation, bufsize);
+ return mipi_dbi_dev_init_with_formats(dbidev, funcs, mipi_dbi_formats,
+ ARRAY_SIZE(mipi_dbi_formats), mode,
+ rotation, bufsize);
}
-EXPORT_SYMBOL(mipi_dbi_init);
+EXPORT_SYMBOL(mipi_dbi_dev_init);
/**
* mipi_dbi_release - DRM driver release helper
*/
void mipi_dbi_release(struct drm_device *drm)
{
- struct mipi_dbi *dbi = drm_to_mipi_dbi(drm);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(drm);
DRM_DEBUG_DRIVER("\n");
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
- kfree(dbi);
+ kfree(dbidev);
}
EXPORT_SYMBOL(mipi_dbi_release);
}
EXPORT_SYMBOL(mipi_dbi_display_is_on);
-static int mipi_dbi_poweron_reset_conditional(struct mipi_dbi *dbidev, bool cond)
+static int mipi_dbi_poweron_reset_conditional(struct mipi_dbi_dev *dbidev, bool cond)
{
struct device *dev = dbidev->drm.dev;
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi *dbi = &dbidev->dbi;
int ret;
if (dbidev->regulator) {
* Returns:
* Zero on success, or a negative error code.
*/
-int mipi_dbi_poweron_reset(struct mipi_dbi *dbidev)
+int mipi_dbi_poweron_reset(struct mipi_dbi_dev *dbidev)
{
return mipi_dbi_poweron_reset_conditional(dbidev, false);
}
* Zero if the controller was reset, 1 if the display was already on, or a
* negative error code.
*/
-int mipi_dbi_poweron_conditional_reset(struct mipi_dbi *dbidev)
+int mipi_dbi_poweron_conditional_reset(struct mipi_dbi_dev *dbidev)
{
return mipi_dbi_poweron_reset_conditional(dbidev, true);
}
* @dc: D/C gpio (optional)
*
* This function sets &mipi_dbi->command, enables &mipi_dbi->read_commands for the
- * usual read commands. It should be followed by a call to mipi_dbi_init() or
+ * usual read commands. It should be followed by a call to mipi_dbi_dev_init() or
* a driver-specific init.
*
* If @dc is set, a Type C Option 3 interface is assumed, if not
size_t count, loff_t *ppos)
{
struct seq_file *m = file->private_data;
- struct mipi_dbi *mipi = m->private;
+ struct mipi_dbi_dev *dbidev = m->private;
u8 val, cmd = 0, parameters[64];
char *buf, *pos, *token;
unsigned int i;
int ret, idx;
- if (!drm_dev_enter(&mipi->drm, &idx))
+ if (!drm_dev_enter(&dbidev->drm, &idx))
return -ENODEV;
buf = memdup_user_nul(ubuf, count);
}
}
- ret = mipi_dbi_command_buf(mipi, cmd, parameters, i);
+ ret = mipi_dbi_command_buf(&dbidev->dbi, cmd, parameters, i);
err_free:
kfree(buf);
static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)
{
- struct mipi_dbi *mipi = m->private;
+ struct mipi_dbi_dev *dbidev = m->private;
+ struct mipi_dbi *dbi = &dbidev->dbi;
u8 cmd, val[4];
int ret, idx;
size_t len;
- if (!drm_dev_enter(&mipi->drm, &idx))
+ if (!drm_dev_enter(&dbidev->drm, &idx))
return -ENODEV;
for (cmd = 0; cmd < 255; cmd++) {
- if (!mipi_dbi_command_is_read(mipi, cmd))
+ if (!mipi_dbi_command_is_read(dbi, cmd))
continue;
switch (cmd) {
}
seq_printf(m, "%02x: ", cmd);
- ret = mipi_dbi_command_buf(mipi, cmd, val, len);
+ ret = mipi_dbi_command_buf(dbi, cmd, val, len);
if (ret) {
seq_puts(m, "XX\n");
continue;
*/
int mipi_dbi_debugfs_init(struct drm_minor *minor)
{
- struct mipi_dbi *mipi = drm_to_mipi_dbi(minor->dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(minor->dev);
umode_t mode = S_IFREG | S_IWUSR;
- if (mipi->read_commands)
+ if (dbidev->dbi.read_commands)
mode |= S_IRUGO;
- debugfs_create_file("command", mode, minor->debugfs_root, mipi,
+ debugfs_create_file("command", mode, minor->debugfs_root, dbidev,
&mipi_dbi_debugfs_command_fops);
return 0;
static void st7586_fb_dirty(struct drm_framebuffer *fb, struct drm_rect *rect)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(fb->dev);
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(fb->dev);
+ struct mipi_dbi *dbi = &dbidev->dbi;
int start, end, idx, ret = 0;
if (!dbidev->enabled)
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
struct drm_framebuffer *fb = plane_state->fb;
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi *dbi = &dbidev->dbi;
struct drm_rect rect = {
.x1 = 0,
.x2 = fb->width,
static void st7586_pipe_disable(struct drm_simple_display_pipe *pipe)
{
- struct mipi_dbi *mipi = drm_to_mipi_dbi(pipe->crtc.dev);
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
/*
* This callback is not protected by drm_dev_enter/exit since we want to
DRM_DEBUG_KMS("\n");
- if (!mipi->enabled)
+ if (!dbidev->enabled)
return;
- mipi_dbi_command(mipi, MIPI_DCS_SET_DISPLAY_OFF);
- mipi->enabled = false;
+ mipi_dbi_command(&dbidev->dbi, MIPI_DCS_SET_DISPLAY_OFF);
+ dbidev->enabled = false;
}
static const u32 st7586_formats[] = {
static int st7586_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct mipi_dbi *dbidev;
+ struct mipi_dbi_dev *dbidev;
struct drm_device *drm;
struct mipi_dbi *dbi;
struct gpio_desc *a0;
if (!dbidev)
return -ENOMEM;
- dbi = dbidev;
+ dbi = &dbidev->dbi;
drm = &dbidev->drm;
ret = devm_drm_dev_init(dev, drm, &st7586_driver);
if (ret) {
/* Cannot read from this controller via SPI */
dbi->read_commands = NULL;
- ret = mipi_dbi_init_with_formats(dbidev, &st7586_pipe_funcs,
- st7586_formats, ARRAY_SIZE(st7586_formats),
- &st7586_mode, rotation, bufsize);
+ ret = mipi_dbi_dev_init_with_formats(dbidev, &st7586_pipe_funcs,
+ st7586_formats, ARRAY_SIZE(st7586_formats),
+ &st7586_mode, rotation, bufsize);
if (ret)
return ret;
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev);
- struct mipi_dbi *dbi = dbidev;
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
+ struct mipi_dbi *dbi = &dbidev->dbi;
int ret, idx;
u8 addr_mode;
static int st7735r_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct mipi_dbi *dbidev;
+ struct mipi_dbi_dev *dbidev;
struct drm_device *drm;
struct mipi_dbi *dbi;
struct gpio_desc *dc;
if (!dbidev)
return -ENOMEM;
- dbi = dbidev;
+ dbi = &dbidev->dbi;
drm = &dbidev->drm;
ret = devm_drm_dev_init(dev, drm, &st7735r_driver);
if (ret) {
/* Cannot read from Adafruit 1.8" display via SPI */
dbi->read_commands = NULL;
- ret = mipi_dbi_init(dbidev, &jd_t18003_t01_pipe_funcs, &jd_t18003_t01_mode, rotation);
+ ret = mipi_dbi_dev_init(dbidev, &jd_t18003_t01_pipe_funcs, &jd_t18003_t01_mode, rotation);
if (ret)
return ret;
struct regulator;
/**
- * struct mipi_dbi - MIPI DBI controller
- * @spi: SPI device
- * @enabled: Pipeline is enabled
- * @cmdlock: Command lock
- * @command: Bus specific callback executing commands.
- * @read_commands: Array of read commands terminated by a zero entry.
- * Reading is disabled if this is NULL.
- * @dc: Optional D/C gpio.
- * @tx_buf: Buffer used for transfer (copy clip rect area)
- * @tx_buf9: Buffer used for Option 1 9-bit conversion
- * @tx_buf9_len: Size of tx_buf9.
- * @swap_bytes: Swap bytes in buffer before transfer
- * @reset: Optional reset gpio
- * @rotation: initial rotation in degrees Counter Clock Wise
- * @backlight: backlight device (optional)
- * @regulator: power regulator (optional)
+ * struct mipi_dbi - MIPI DBI interface
*/
struct mipi_dbi {
/**
+ * @cmdlock: Command lock
+ */
+ struct mutex cmdlock;
+
+ /**
+ * @command: Bus specific callback executing commands.
+ */
+ int (*command)(struct mipi_dbi *dbi, u8 *cmd, u8 *param, size_t num);
+
+ /**
+ * @read_commands: Array of read commands terminated by a zero entry.
+ * Reading is disabled if this is NULL.
+ */
+ const u8 *read_commands;
+
+ /**
+ * @swap_bytes: Swap bytes in buffer before transfer
+ */
+ bool swap_bytes;
+
+ /**
+ * @reset: Optional reset gpio
+ */
+ struct gpio_desc *reset;
+
+ /* Type C specific */
+
+ /**
+ * @spi: SPI device
+ */
+ struct spi_device *spi;
+
+ /**
+ * @dc: Optional D/C gpio.
+ */
+ struct gpio_desc *dc;
+
+ /**
+ * @tx_buf9: Buffer used for Option 1 9-bit conversion
+ */
+ void *tx_buf9;
+
+ /**
+ * @tx_buf9_len: Size of tx_buf9.
+ */
+ size_t tx_buf9_len;
+};
+
+/**
+ * struct mipi_dbi_dev - MIPI DBI device
+ */
+struct mipi_dbi_dev {
+ /**
* @drm: DRM device
*/
struct drm_device drm;
*/
struct drm_display_mode mode;
- struct spi_device *spi;
+ /**
+ * @enabled: Pipeline is enabled
+ */
bool enabled;
- struct mutex cmdlock;
- int (*command)(struct mipi_dbi *dbi, u8 *cmd, u8 *param, size_t num);
- const u8 *read_commands;
- struct gpio_desc *dc;
+
+ /**
+ * @tx_buf: Buffer used for transfer (copy clip rect area)
+ */
u16 *tx_buf;
- void *tx_buf9;
- size_t tx_buf9_len;
- bool swap_bytes;
- struct gpio_desc *reset;
+
+ /**
+ * @rotation: initial rotation in degrees Counter Clock Wise
+ */
unsigned int rotation;
+
+ /**
+ * @backlight: backlight device (optional)
+ */
struct backlight_device *backlight;
+
+ /**
+ * @regulator: power regulator (optional)
+ */
struct regulator *regulator;
+
+ /**
+ * @dbi: MIPI DBI interface
+ */
+ struct mipi_dbi dbi;
};
-static inline struct mipi_dbi *drm_to_mipi_dbi(struct drm_device *drm)
+static inline struct mipi_dbi_dev *drm_to_mipi_dbi_dev(struct drm_device *drm)
{
- return container_of(drm, struct mipi_dbi, drm);
+ return container_of(drm, struct mipi_dbi_dev, drm);
}
int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi,
struct gpio_desc *dc);
-int mipi_dbi_init_with_formats(struct mipi_dbi *dbidev,
- const struct drm_simple_display_pipe_funcs *funcs,
- const uint32_t *formats, unsigned int format_count,
- const struct drm_display_mode *mode,
- unsigned int rotation, size_t tx_buf_size);
-int mipi_dbi_init(struct mipi_dbi *dbidev,
- const struct drm_simple_display_pipe_funcs *funcs,
- const struct drm_display_mode *mode, unsigned int rotation);
+int mipi_dbi_dev_init_with_formats(struct mipi_dbi_dev *dbidev,
+ const struct drm_simple_display_pipe_funcs *funcs,
+ const uint32_t *formats, unsigned int format_count,
+ const struct drm_display_mode *mode,
+ unsigned int rotation, size_t tx_buf_size);
+int mipi_dbi_dev_init(struct mipi_dbi_dev *dbidev,
+ const struct drm_simple_display_pipe_funcs *funcs,
+ const struct drm_display_mode *mode, unsigned int rotation);
void mipi_dbi_release(struct drm_device *drm);
void mipi_dbi_pipe_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_state);
-void mipi_dbi_enable_flush(struct mipi_dbi *dbidev,
+void mipi_dbi_enable_flush(struct mipi_dbi_dev *dbidev,
struct drm_crtc_state *crtc_state,
struct drm_plane_state *plan_state);
void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe);
void mipi_dbi_hw_reset(struct mipi_dbi *dbi);
bool mipi_dbi_display_is_on(struct mipi_dbi *dbi);
-int mipi_dbi_poweron_reset(struct mipi_dbi *dbidev);
-int mipi_dbi_poweron_conditional_reset(struct mipi_dbi *dbidev);
+int mipi_dbi_poweron_reset(struct mipi_dbi_dev *dbidev);
+int mipi_dbi_poweron_conditional_reset(struct mipi_dbi_dev *dbidev);
u32 mipi_dbi_spi_cmd_max_speed(struct spi_device *spi, size_t len);
int mipi_dbi_spi_transfer(struct spi_device *spi, u32 speed_hz,