mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
drm/tinydrm/mipi-dbi: Add mipi_dbi_enable_flush()
Add and use a function for enabling, flushing and turning on backlight. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: David Lechner <david@lechnology.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-4-noralf@tronnes.org
This commit is contained in:
@@ -270,6 +270,26 @@ static const struct drm_framebuffer_funcs mipi_dbi_fb_funcs = {
|
||||
.dirty = mipi_dbi_fb_dirty,
|
||||
};
|
||||
|
||||
/**
|
||||
* mipi_dbi_enable_flush - MIPI DBI enable helper
|
||||
* @mipi: MIPI DBI structure
|
||||
*
|
||||
* This function sets &mipi_dbi->enabled, flushes the whole framebuffer and
|
||||
* enables the backlight. Drivers can use this in their
|
||||
* &drm_simple_display_pipe_funcs->enable callback.
|
||||
*/
|
||||
void mipi_dbi_enable_flush(struct mipi_dbi *mipi)
|
||||
{
|
||||
struct drm_framebuffer *fb = mipi->tinydrm.pipe.plane.fb;
|
||||
|
||||
mipi->enabled = true;
|
||||
if (fb)
|
||||
fb->funcs->dirty(fb, NULL, 0, 0, NULL, 0);
|
||||
|
||||
tinydrm_enable_backlight(mipi->backlight);
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dbi_enable_flush);
|
||||
|
||||
/**
|
||||
* mipi_dbi_pipe_enable - MIPI DBI pipe enable helper
|
||||
* @pipe: Display pipe
|
||||
|
||||
Reference in New Issue
Block a user