summaryrefslogtreecommitdiff
path: root/include/drm/tinydrm
AgeCommit message (Collapse)Author
2019-01-17drm/tinydrm: Use damage helper for dirtyfbNoralf Trønnes
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 <david@lechnology.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: David Lechner <david@lechnology.com> Reviewed-by: David Lechner <david@lechnology.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190115043643.2364-5-noralf@tronnes.org
2019-01-17drm/tinydrm: Use struct drm_rectNoralf Trønnes
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 <noralf@tronnes.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190115043643.2364-4-noralf@tronnes.org
2018-11-20drm/tinydrm: Use DRM_GEM_CMA_VMAP_DRIVER_OPSNoralf Trønnes
The CMA helper now has the functionality to ensure a virtual address on imported buffer so use that. While touching all tinydrm drivers, remove the unnecessary inclusion of drm_fb_helper.h in some drivers. Cc: David Lechner <david@lechnology.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-6-noralf@tronnes.org
2018-07-11drm/tinydrm: Fix doc build warningsNoralf Trønnes
include/drm/tinydrm/tinydrm.h:34: warning: Function parameter or member 'fb_dirty' not described in 'tinydrm_device' drivers/gpu/drm/tinydrm/mipi-dbi.c:272: warning: Function parameter or member 'crtc_state' not described in 'mipi_dbi_enable_flush' drivers/gpu/drm/tinydrm/mipi-dbi.c:272: warning: Function parameter or member 'plane_state' not described in 'mipi_dbi_enable_flush' Move struct member docs inline so it's not missed next time. Cc: David Lechner <david@lechnology.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: David Lechner <david@lechnology.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180710150518.10528-1-noralf@tronnes.org
2018-04-24drm: Move simple_display_pipe prepare_fb helper into gem fb helpersDaniel Vetter
There's nothing tinydrm specific to this, and there's a few more copies of the same in various other drivers. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Sean Paul <seanpaul@chromium.org> Cc: David Airlie <airlied@linux.ie> Cc: David Lechner <david@lechnology.com> Cc: "Noralf Trønnes" <noralf@tronnes.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Daniel Stone <daniels@collabora.com> Cc: Haneen Mohammed <hamohammed.sa@gmail.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: David Lechner <david@lechnology.com> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-3-daniel.vetter@ffwll.ch
2018-03-28drm/tinydrm: Make fb_dirty into a lower level hookVille Syrjälä
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" <noralf@tronnes.org> Cc: David Lechner <david@lechnology.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180323153509.15287-1-ville.syrjala@linux.intel.com Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Tested-by: Noralf Trønnes <noralf@tronnes.org>
2018-03-27drm/tinydrm: Use gem_free_object_unlockedDaniel Vetter
tinydrm doesn't use dev->struct_mutex and therefore has no need to use gem_free_object. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: "Noralf Trønnes" <noralf@tronnes.org> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180322105133.11211-2-daniel.vetter@ffwll.ch
2018-02-20drm/tinydrm: Replace tinydrm_of_find_backlight with of_find_backlightMeghana Madhyastha
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 <noralf@tronnes.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> 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 Madhyastha
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 <noralf@tronnes.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/ec700724e47814e6426966e093bd32b2364ba147.1516810725.git.meghana.madhyastha@gmail.com
2018-01-15drm/tinydrm/mi0283qt: Let the display pipe handle powerNoralf Trønnes
It's better to leave power handling and controller init to the modesetting machinery using the simple pipe .enable and .disable callbacks. Remove unused mipi_dbi_pipe_enable(). 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-6-noralf@tronnes.org
2018-01-15drm/tinydrm/mipi-dbi: Add poweron-reset functionsNoralf Trønnes
Split out common poweron-reset functionality. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: David Lechner <david@lechnology.com> Tested-by: David Lechner <david@lechnology.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-5-noralf@tronnes.org
2018-01-15drm/tinydrm/mipi-dbi: Add mipi_dbi_enable_flush()Noralf Trønnes
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
2018-01-15drm/tinydrm/mi0283qt: Remove ili9341.hNoralf Trønnes
No need for a public header file for the command macros. Just include the necessary ones in the driver. Also use the MIPI_DCS_PIXEL_FMT_16BIT macro. 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-3-noralf@tronnes.org
2017-12-10drm/tinydrm: Use drm_fb_cma_fbdev_init_with_funcs/fini()Noralf Trønnes
Use drm_fb_cma_fbdev_init_with_funcs() and drm_fb_cma_fbdev_fini() which relies on the fact that drm_device holds a pointer to the drm_fb_helper structure. This means that the driver doesn't have to keep track of that. Also use the drm_fb_helper functions directly. Remove todo entry. Cc: David Lechner <david@lechnology.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: David Lechner <david@lechnology.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by: David Lechner <david@lechnolgy.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171208193743.34450-11-noralf@tronnes.org
2017-12-01drm/tinydrm: export mipi_dbi_buf_copy and mipi_dbi_spi_cmd_max_speedDavid Lechner
This exports the mipi_dbi_buf_copy() and mipi_dbi_spi_cmd_max_speed() functions so that they can be shared with other drivers. Signed-off-by: David Lechner <david@lechnology.com> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/1511122328-31133-4-git-send-email-david@lechnology.com
2017-11-30drm/tinydrm: Use drm_mode_config_helper_suspend/resume()Noralf Trønnes
Replace driver's code with the generic helpers that do the same thing. Remove todo entry. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Stefan Agner <stefan@agner.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-6-noralf@tronnes.org
2017-11-11drm/tinydrm: Use drm_gem_cma_print_info()Noralf Trønnes
There is a new core debugfs file that prints fb/gem info: <debugfs>/dri/<n>/framebuffer Use drm_gem_cma_print_info() to provide info to that output instead of using drm_fb_cma_debugfs_show(). Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-12-noralf@tronnes.org
2017-08-09drm/tinydrm: Generalize tinydrm_xrgb8888_to_gray8()David Lechner
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 <david@lechnology.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/1502127581-10517-2-git-send-email-david@lechnology.com
2017-08-04drm/tinydrm: remove call to mipi_dbi_init() from mipi_dbi_spi_init()David Lechner
This removes the call to mipi_dbi_init() from mipi_dbi_spi_init() so that drivers can have a driver-specific implementation if needed. Suggested-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: David Lechner <david@lechnology.com> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/1501799630-1650-2-git-send-email-david@lechnology.com
2017-07-29drm/tinydrm: Use .dumb_map_offset and .dumb_destroy defaultsNoralf Trønnes
tinydrm can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/1500837417-40580-22-git-send-email-noralf@tronnes.org
2017-07-14drm/tinydrm: Add tinydrm_xrgb8888_to_gray8() helperNoralf Trønnes
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 <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/1496934875-51984-4-git-send-email-noralf@tronnes.org
2017-03-27drm/tinydrm: Fix drm_driver.fops.ownerNoralf Trønnes
drm_driver.fops can't be shared since the owner then becomes tinydrm.ko. Move the fops declaration to the driver. v2: Use DEFINE_DRM_GEM_CMA_FOPS Reported-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170326142529.16938-1-noralf@tronnes.org
2017-02-24drm/tinydrm: helpers: Properly fix backlight dependencyNoralf Trønnes
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 <noralf@tronnes.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-18drm/tinydrm: Add support for Multi-Inno MI0283QT displayNoralf Trønnes
Add driver to support the Multi-Inno MI0283QT display panel. It has an ILI9341 MIPI DBI compatible display controller. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Thierry Reding <treding@nvidia.com>
2017-02-18drm/tinydrm: Add MIPI DBI supportNoralf Trønnes
Add support for MIPI DBI compatible controllers. Interface type C option 1 and 3 are supported (SPI). Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Thierry Reding <treding@nvidia.com>
2017-02-18drm/tinydrm: Add helper functionsNoralf Trønnes
Add common functionality needed by many tinydrm drivers. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Thierry Reding <treding@nvidia.com>
2017-02-18drm: Add DRM support for tiny LCD displaysNoralf Trønnes
tinydrm provides helpers for very simple displays that can use CMA backed framebuffers and need flushing on changes. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Thierry Reding <treding@nvidia.com>