Noralf Trønnes
2afd9fcba6
drm/tinydrm: Remove tinydrm_device
...
No more users left so it can go alongside its helpers.
Update the tinydrm docs description and remove todo entry.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190225144232.20761-7-noralf@tronnes.org
2019-03-04 15:31:27 +01:00
Noralf Trønnes
af74138160
drm/tinydrm: Use damage helper for dirtyfb
...
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-17 10:57:15 +01:00
Noralf Trønnes
b051b3459b
drm/tinydrm: Use struct drm_rect
...
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
2019-01-17 10:57:03 +01:00
Noralf Trønnes
3db8d37dd8
drm/tinydrm: Use DRM_GEM_CMA_VMAP_DRIVER_OPS
...
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-11-20 14:58:19 +01:00
Ville Syrjälä
e85d30060e
drm/tinydrm: Make fb_dirty into a lower level hook
...
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-28 19:19:32 +03:00
Meghana Madhyastha
d1a2e7004b
drm/tinydrm: Replace tinydrm_of_find_backlight with of_find_backlight
...
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-20 11:07:22 -05:00
Meghana Madhyastha
414147e8a3
drm/tinydrm: Convert tinydrm_enable/disable_backlight to 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-02-20 11:07:22 -05:00
Harsha Sharma
b7fa1bdb10
drm/tinydrm: Replace list_for_each with list_for_each_entry
...
Replace use of list_for_each with list_for_each_entry to simplify the
code and remove variables that are used only in list_for_each.
Done with following coccinelle patch:
@r@
identifier fn,i,f,p;
expression e;
iterator name list_for_each, list_for_each_entry;
type T;
@@
fn(...) {
++ T *i;
<+...
- list_for_each(p,e)
+ list_for_each_entry(i,e,f)
{
...
- T *i = list_entry(p,T,f);
...
}
...+>
}
@@
identifier r.fn,r.p;
@@
fn(...) {
...
- struct list_head *p;
... when != p
}
@@
identifier r.fn,r.i,r.f;
expression r.e;
statement S;
@@
fn(...) {
<...
list_for_each_entry(i,e,f)
- {
S
- }
...>
}
@s@
identifier i,f,p;
expression e;
type T;
@@
- list_for_each(p,e)
+ list_for_each_entry(i,e,f)
{
... when != T *i;
- i = list_entry(p,T,f);
...
}
@@
identifier s.p;
@@
- struct list_head *p;
... when != p
@@
identifier s.i,s.f;
expression s.e;
statement S;
@@
list_for_each_entry(i,e,f)
- {
S
- }
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171014202823.29230-1-harshasharmaiitr@gmail.com
2017-10-21 16:28:41 +02:00
David Lechner
8941a7cbcc
drm/tinydrm: Generalize tinydrm_xrgb8888_to_gray8()
...
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-09 17:55:50 +02:00
Noralf Trønnes
379ea9a1a5
drm/tinydrm: Add tinydrm_xrgb8888_to_gray8() helper
...
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-07-14 19:29:59 +02:00
kbuild test robot
8c47c0860b
drm/tinydrm: fix semicolon.cocci warnings
...
drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:454:2-3: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170223164647.GA2519@lkp-ws02
2017-02-26 22:55:41 +01:00
Noralf Trønnes
9f69eb5c36
drm/tinydrm: Add helper functions
...
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-18 18:04:59 +01:00