aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/tinydrm (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-28drm/tinydrm: Make fb_dirty into a lower level hookVille Syrjälä3-1/+12
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 Vetter1-1/+1
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 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 <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 backlight_enable/disableMeghana Madhyastha1-2/+0
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ønnes1-2/+0
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ønnes1-0/+2
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ønnes1-0/+1
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ønnes1-54/+0
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ønnes1-3/+0
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 Lechner1-1/+3
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ønnes1-4/+0
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ønnes1-0/+1
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 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 <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 Lechner1-5/+1
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ønnes1-3/+1
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ø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 <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ønnes1-3/+1
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ø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 <noralf@tronnes.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-18drm/tinydrm: Add support for Multi-Inno MI0283QT displayNoralf Trønnes1-0/+54
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ønnes1-0/+107
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ønnes1-0/+100
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ønnes1-0/+115
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>