dff1c7032f
drm/tinydrm: Use drm_fbdev_generic_setup()
...
Make full use of the generic fbdev client.
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/20180703160354.59955-8-noralf@tronnes.org
2018-07-10 14:54:33 +02:00
ccc3b2b348
drm: Move simple_display_pipe prepare_fb helper into gem fb helpers
...
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-04-24 13:57:22 +02:00
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
0c9c7fd00e
drm/simple-kms-helper: Plumb plane state to the enable hook
...
tinydrm enable hook wants to play around with the new fb in
.atomic_enable(), thus we'll need access to the plane state.
Performed with coccinelle:
@r1@
identifier F =~ ".*enable$";
identifier P, CS;
@@
F(
struct drm_simple_display_pipe *P
,struct drm_crtc_state *CS
+ ,struct drm_plane_state *plane_state
)
{
...
}
@@
struct drm_simple_display_pipe *P;
expression E;
@@
{
+ struct drm_plane *plane;
...
+ plane = &P->plane;
P->funcs->enable(P
,E
+ ,plane->state
);
...
}
@@
identifier P, CS;
@@
struct drm_simple_display_pipe_funcs {
...
void (*enable)(struct drm_simple_display_pipe *P
,struct drm_crtc_state *CS
+ ,struct drm_plane_state *plane_state
);
...
};
v2: Pimp the commit message (David)
Cc: Marek Vasut <marex@denx.de >
Cc: Eric Anholt <eric@anholt.net >
Cc: David Lechner <david@lechnology.com >
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Cc: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180322202738.25817-1-ville.syrjala@linux.intel.com
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
2018-03-28 19:19:32 +03:00
070ab1283a
drm/tinydrm/mipi-dbi: Add poweron-reset functions
...
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-15 15:13:47 +01:00
22edc8d38b
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
2018-01-15 15:10:28 +01:00
d3820952ea
drm/tinydrm: Use drm_fb_cma_fbdev_init_with_funcs/fini()
...
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-10 15:37:07 +01:00
e43e81810c
drm/tinydrm: Replace dev_error with DRM_DEV_ERROR
...
Convert instances of dev_error to DRM_DEV_ERROR as we have
DRM_DEV_ERROR variants of drm print macros.
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171006221738.30200-1-harshasharmaiitr@gmail.com
2017-10-13 17:34:42 +02:00
cce1a87788
drm/tinydrm: Use drm_gem_framebuffer_helper
...
Use drm_gem_framebuffer_helper directly instead of the cma
library wrappers.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-2-git-send-email-noralf@tronnes.org
2017-10-01 16:59:49 +02:00
95a0cfe98c
drm/tinydrm: Drop driver registered message
...
No need to put out a driver registered message since drm_dev_register()
does that now. SPI speed is an important metric when dealing with
display problems, so retain that info.
Cc: David Lechner <david@lechnology.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: David Lechner <david@lechnology.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1504883250-43487-8-git-send-email-noralf@tronnes.org
2017-09-16 14:07:59 +02:00
f3bbc908e8
drm/tinydrm: make function st7586_pipe_enable static
...
The function st7586_pipe_enable is local to the source
and does not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol 'st7586_pipe_enable' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Acked-By: David Lechner <david@lechnology.com >
[noralf: fixed: Alignment should match open parenthesis]
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20170816092306.10969-1-colin.king@canonical.com
2017-08-16 21:39:26 +02:00
eac99d4a20
drm/tinydrm: add support for LEGO MINDSTORMS EV3 LCD
...
LEGO MINDSTORMS EV3 has an LCD with a ST7586 controller. This adds a new
module for the ST7586 controller with parameters for the LEGO MINDSTORMS
EV3 LCD display.
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/1502127581-10517-4-git-send-email-david@lechnology.com
2017-08-11 18:30:19 +02:00