aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tve200 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-09-25drm/tve200: Use drm_fbdev_generic_setup()Noralf Trønnes1-8/+6
The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-18-noralf@tronnes.org
2018-04-24drm/tve200: Use simple_display_pipe prepare_fb helperDaniel Vetter1-7/+1
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-4-daniel.vetter@ffwll.ch
2018-03-28drm/simple-kms-helper: Plumb plane state to the enable hookVille Syrjälä1-1/+2
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-02-22drm/tve200: Do not use deprecated drm_driver.{enable|disable)_vblankOleksandr Andrushchenko3-7/+8
Do not use deprecated drm_driver.{enable|disable)_vblank callbacks, but use drm_simple_kms_helpe's pipe callbacks instead. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Cc: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-4-git-send-email-andr2000@gmail.com
2017-12-08drm/tve200: Use drm_fb_cma_fbdev_init/fini()Noralf Trønnes2-13/+4
Use drm_fb_cma_fbdev_init() 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. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-17-noralf@tronnes.org
2017-10-01drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()Noralf Trønnes2-2/+4
drm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now, use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-10-git-send-email-noralf@tronnes.org
2017-10-01drm/tve200: Check for IS_ERR instead of NULL in probeDan Carpenter1-1/+1
devm_ioremap_resource() returns error pointer, it never returns NULL on error. Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170925102520.a7spymwqqbsczzz2@mwanda
2017-10-01drm/tve200: make two functions staticColin Ian King1-2/+2
The functions tve200_display_disable and tve200_display_funcs are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'tve200_display_disable' was not declared. Should it be static? symbol 'tve200_display_funcs' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170922160516.16283-1-colin.king@canonical.com
2017-09-11drm/tve200: Clean up panel bridgingLinus Walleij3-21/+13
This makes use of the drm_simple_display_pipe_attach_bridge() call and removes the two calls removing the bridge, which were erroneous: they unregister the bridge which is not what we want, we just want to unreference it and that is already handled by the core. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170910220801.28588-1-linus.walleij@linaro.org
2017-09-02drm/tve200: Replace custom connector with panel bridgeLinus Walleij6-163/+59
This replaces the custom connector in the TVE200 with the panel bridge helper. As long as we're just using panels and no other bridges, this works just fine. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170902200711.29298-1-linus.walleij@linaro.org
2017-08-30drm/tve200: Pass NULL format_modifier to drm_simple_display_pipe_initRodrigo Vivi1-0/+1
This Fixes build on branches where we already have format-modifier. Reference: https://lists.freedesktop.org/archives/dri-devel/2017-August/151044.html Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Janet Morgan <janet.morgan@intel.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Daniel Stone <daniels@collabora.com> (v2) Cc: Liviu Dudau <Liviu.Dudau@arm.com> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20170825201612.23056-1-rodrigo.vivi@intel.com
2017-08-23drm/tve200: Add new driver for TVE200Linus Walleij6-0/+896
This adds a new DRM driver for the Faraday Technology TVE200 block. This "TV Encoder" encodes a ITU-T BT.656 stream and can be found in the StorLink SL3516 (later Cortina Systems CS3516) as well as the Grain Media GM8180. I do not have definitive word from anyone at Faraday that this IP block is theirs, but it bears the hallmark of their 3-digit version code (200) and is used in two SoCs from completely different companies. (Grain Media was fully owned by Faraday until it was transferred to NovoTek this january, and Faraday did lots of work on the StorLink SoCs.) The D-Link DIR-685 uses this in connection with the Ilitek ILI9322 panel driver that supports BT.656 input, while the GM8180 apparently has been used with the Cirrus Logic CS4954 digital video encoder. The oldest user seems to be something called Techwall 2835. This driver is heavily inspired by Eric Anholt's PL111 driver and therefore I have mentioned all the ancestor authors in the header file. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170820100557.24991-2-linus.walleij@linaro.org