aboutsummaryrefslogtreecommitdiff
path: root/include/drm/tinydrm/tinydrm-helpers.h
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-04-08drm: move tinydrm format conversion helpers to new drm_format_helper.cGerd Hoffmann1-10/+0
Also rename them from tinydrm_* to drm_fb_* Pure code motion, no functional change. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-02-21drm/tinydrm: tinydrm_display_pipe_init() don't use tinydrm_deviceNoralf Trønnes1-0/+13
Rework function signature so tinydrm_device can be avoided. Move definition to tinydrm-helpers.h so tinydrm.h can be deleted in a later patch. Signed-off-by: Noralf Trønnes <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-17drm/tinydrm: Use damage helper for dirtyfbNoralf Trønnes1-10/+1
This switches to drm_atomic_helper_dirtyfb() as the framebuffer dirty handler. All flushing will now happen in the pipe functions. Also enable the damage plane property for all except repaper which can only do full updates. ili9225: This change made ili9225_init() equal to mipi_dbi_init() so use it. v3: Include vblank header (Sam) ili9225 and st7586 can't use mipi_dbi_enable_flush() (David) v2: Remove fb check in mipi_dbi_enable_flush() it can't be NULL (kbuild test robot) Cc: David Lechner <[email protected]> Cc: Eric Anholt <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Daniel Vetter <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Tested-by: David Lechner <[email protected]> Reviewed-by: David Lechner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-17drm/tinydrm: Use struct drm_rectNoralf Trønnes1-5/+6
This prepares for the switch to drm_atomic_helper_dirtyfb() in the next patch. The damage helper returns a drm_rect so switch to that everywhere including using a pointer in the dirty functions. This is a non-functional change except for the debug print which looks a bit different. Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Daniel Vetter <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-03-28drm/tinydrm: Make fb_dirty into a lower level hookVille Syrjälä1-0/+5
mipi_dbi_enable_flush() wants to call the fb->dirty() hook from the bowels of the .atomic_enable() hook. That prevents us from taking the plane mutex in fb->dirty() unless we also plumb down the acquire context. Instead it seems simpler to split the fb->dirty() into a tinydrm specific lower level hook that can be called from mipi_dbi_enable_flush() and from a generic higher level tinydrm_fb_dirty() helper. As we don't have a tinydrm specific vfuncs table we'll just stick it into tinydrm_device directly for now. v2: Deal with the fb->dirty() in tinydrm_display_pipe_update() as well (Noralf) Cc: "Noralf Trønnes" <[email protected]> Cc: David Lechner <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Noralf Trønnes <[email protected]> Tested-by: Noralf Trønnes <[email protected]>
2018-02-20drm/tinydrm: Replace tinydrm_of_find_backlight with of_find_backlightMeghana Madhyastha1-2/+0
Remove tinydrm_of_find_backlight from tinydrm-helpers.c. We now have a generic of_find_backlight defined in backlight.c. Let the callers of tinydrm_of_find_backlight call of_find_backlight. Also, remove select BACKLIGHT_LCD_SUPPORT and select BACKLIGHT_CLASS_DEVICE from tinydrm/Kconfig as it is a hack that is no longer needed. Reviewed-by: Noralf Trønnes <[email protected]> Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Meghana Madhyastha <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/11dd1cabd098a730d07ab04c5987b139d14d8b21.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20drm/tinydrm: Convert tinydrm_enable/disable_backlight to ↵Meghana Madhyastha1-2/+0
backlight_enable/disable Remove tinydrm_enable/disable_backlight and let the callers call the more generic backlight_enable/disable helpers Reviewed-by: Noralf Trønnes <[email protected]> Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Meghana Madhyastha <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ec700724e47814e6426966e093bd32b2364ba147.1516810725.git.meghana.madhyastha@gmail.com
2017-08-09drm/tinydrm: Generalize tinydrm_xrgb8888_to_gray8()David Lechner1-1/+2
This adds parameters for vaddr and clip to tinydrm_xrgb8888_to_gray8() to make it more generic. dma_buf_{begin,end}_cpu_access() are moved out to the repaper driver. Return type is change to void to simplify error handling by callers. Signed-off-by: David Lechner <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-14drm/tinydrm: Add tinydrm_xrgb8888_to_gray8() helperNoralf Trønnes1-0/+1
Drm has no monochrome or greyscale support so add a conversion from the common format XR24. Also reorder includes into the common order. Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-02-24drm/tinydrm: helpers: Properly fix backlight dependencyNoralf Trønnes1-19/+0
BACKLIGHT_CLASS_DEVICE was selected in the last version of the tinydrm patchset to fix the backlight dependency, but the ifdef CONFIG_BACKLIGHT_CLASS_DEVICE was forgotten. Fix that. Signed-off-by: Noralf Trønnes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2017-02-18drm/tinydrm: Add helper functionsNoralf Trønnes1-0/+100
Add common functionality needed by many tinydrm drivers. Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Thierry Reding <[email protected]>