Commit 63aa5ec6 authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

drm/mipi-dbi: Initialize default driver functions with macro



Introduce DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS to initialize MIPI-DBI
helpers to default values and convert drivers. The prepare_fb function
set by some drivers is called implicitly by simple-kms helpers, so leave
it out.

Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Tested-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Tested-by: Noralf Trønnes <noralf@tronnes.org> # drm/tiny/mi0283qt
Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-5-tzimmermann@suse.de
parent e06c123e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -577,10 +577,7 @@ static void ili9341_dbi_enable(struct drm_simple_display_pipe *pipe,
}

static const struct drm_simple_display_pipe_funcs ili9341_dbi_funcs = {
	.mode_valid = mipi_dbi_pipe_mode_valid,
	.enable = ili9341_dbi_enable,
	.disable = mipi_dbi_pipe_disable,
	.update = mipi_dbi_pipe_update,
	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(ili9341_dbi_enable),
};

static const struct drm_display_mode ili9341_dbi_mode = {
+1 −4
Original line number Diff line number Diff line
@@ -181,10 +181,7 @@ static void yx240qv29_enable(struct drm_simple_display_pipe *pipe,
}

static const struct drm_simple_display_pipe_funcs hx8357d_pipe_funcs = {
	.mode_valid = mipi_dbi_pipe_mode_valid,
	.enable = yx240qv29_enable,
	.disable = mipi_dbi_pipe_disable,
	.update = mipi_dbi_pipe_update,
	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
};

static const struct drm_display_mode yx350hv15_mode = {
+1 −4
Original line number Diff line number Diff line
@@ -100,10 +100,7 @@ static void yx240qv29_enable(struct drm_simple_display_pipe *pipe,
}

static const struct drm_simple_display_pipe_funcs ili9163_pipe_funcs = {
	.mode_valid = mipi_dbi_pipe_mode_valid,
	.enable = yx240qv29_enable,
	.disable = mipi_dbi_pipe_disable,
	.update = mipi_dbi_pipe_update,
	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
};

static const struct drm_display_mode yx240qv29_mode = {
+1 −4
Original line number Diff line number Diff line
@@ -137,10 +137,7 @@ static void yx240qv29_enable(struct drm_simple_display_pipe *pipe,
}

static const struct drm_simple_display_pipe_funcs ili9341_pipe_funcs = {
	.mode_valid = mipi_dbi_pipe_mode_valid,
	.enable = yx240qv29_enable,
	.disable = mipi_dbi_pipe_disable,
	.update = mipi_dbi_pipe_update,
	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
};

static const struct drm_display_mode yx240qv29_mode = {
+1 −4
Original line number Diff line number Diff line
@@ -150,10 +150,7 @@ static void waveshare_enable(struct drm_simple_display_pipe *pipe,
}

static const struct drm_simple_display_pipe_funcs waveshare_pipe_funcs = {
	.mode_valid = mipi_dbi_pipe_mode_valid,
	.enable = waveshare_enable,
	.disable = mipi_dbi_pipe_disable,
	.update = mipi_dbi_pipe_update,
	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(waveshare_enable),
};

static const struct drm_display_mode waveshare_mode = {
Loading