Daniel Vetter
b8764eaf8a
drm/stm: Drop drm_gem_prime_export/import
...
They're the default.
Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.
Acked-by: Philippe Cornu <[email protected] >
Reviewed-by: Eric Anholt <[email protected] >
Reviewed-by: Emil Velikov <[email protected] >
Signed-off-by: Daniel Vetter <[email protected] >
Cc: Yannick Fertre <[email protected] >
Cc: Philippe Cornu <[email protected] >
Cc: Benjamin Gaignard <[email protected] >
Cc: Vincent Abriou <[email protected] >
Cc: Maxime Coquelin <[email protected] >
Cc: Alexandre Torgue <[email protected] >
Cc: [email protected]
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-21 20:10:10 +02:00
Daniel Vetter
0424fdaf88
drm/prime: Actually remove DRIVER_PRIME everywhere
...
Split out to make the functional changes stick out more.
All places where DRIVER_PRIME was used have been removed in previous
patches already.
v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE.
v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE.
v4: Don't add a space in i915_drv.c (Sam)
v5: Add note that previous patches removed all the DRIVER_PRIME users
already (Emil).
v6: Fixupe ingenic (new driver) while applying.
Cc: Sam Ravnborg <[email protected] >
Reviewed-by: Emil Velikov <[email protected] >
Reviewed-by: Eric Anholt <[email protected] >
Signed-off-by: Daniel Vetter <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: NXP Linux Team <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: VMware Graphics <[email protected] >
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-21 17:30:32 +02:00
Yannick Fertré
2b5d74fa3c
drm/stm: drv: fix suspend/resume
...
Without this fix, the system can not go in "suspend" mode
due to an error in drv_suspend function.
Fixes: 35ab6cfbf2 ("drm/stm: support runtime power management")
Signed-off-by: Yannick Fertré <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Signed-off-by: Benjamin Gaignard <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-20 17:03:24 +02:00
Yannick Fertré
35ab6cfbf2
drm/stm: support runtime power management
...
This patch enables runtime power management (runtime PM) support for
the display controller. pm_runtime_enable() and pm_runtime_disable()
are added during ltdc load and unload respectively.
pm_runtime_get_sync() and pm_runtime_put_sync() are added for ltdc
register access.
Signed-off-by: Yannick Fertré <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Signed-off-by: Benjamin Gaignard <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-07 14:45:22 +02:00
Yannick Fertré
df61c77665
drm/stm: add sleep power management
...
Implements system sleep power management ops.
Signed-off-by: Yannick Fertré <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Signed-off-by: Benjamin Gaignard <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-04-01 11:00:18 +02:00
Daniel Vetter
fcd70cd36b
drm: Split out drm_probe_helper.h
...
Having the probe helper stuff (which pretty much everyone needs) in
the drm_crtc_helper.h file (which atomic drivers should never need) is
confusing. Split them out.
To make sure I actually achieved the goal here I went through all
drivers. And indeed, all atomic drivers are now free of
drm_crtc_helper.h includes.
v2: Make it compile. There was so much compile fail on arm drivers
that I figured I'll better not include any of the acks on v1.
v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
there was still one, which this patch largely removes. Which means
rolling out lots more includes all over.
This will also conflict with ongoing drmP.h cleanup by others I
expect.
v3: Rebase on top of atomic bochs.
v4: Review from Laurent for bridge/rcar/omap/shmob/core bits:
- (re)move some of the added includes, use the better include files in
other places (all suggested from Laurent adopted unchanged).
- sort alphabetically
v5: Actually try to sort them, and while at it, sort all the ones I
touch.
v6: Rebase onto i915 changes.
v7: Rebase once more.
Acked-by: Harry Wentland <[email protected] >
Acked-by: Sam Ravnborg <[email protected] >
Cc: Sam Ravnborg <[email protected] >
Cc: Jani Nikula <[email protected] >
Cc: Laurent Pinchart <[email protected] >
Acked-by: Rodrigo Vivi <[email protected] >
Acked-by: Benjamin Gaignard <[email protected] >
Acked-by: Jani Nikula <[email protected] >
Acked-by: Neil Armstrong <[email protected] >
Acked-by: Oleksandr Andrushchenko <[email protected] >
Acked-by: CK Hu <[email protected] >
Acked-by: Alex Deucher <[email protected] >
Acked-by: Sam Ravnborg <[email protected] >
Reviewed-by: Laurent Pinchart <[email protected] >
Acked-by: Liviu Dudau <[email protected] >
Signed-off-by: Daniel Vetter <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-24 13:20:42 +01:00
Sam Ravnborg
2a6b4990b1
drm/stm: prepare for drmP.h removal from drm_modeset_helper.h
...
The use of drmP.h is discouraged and removal of it from
drm_modeset_helper.h caused drm/stm to fail to build.
This patch introduce the necessary fixes to prepare for the
drmP.h removal from drm_modeset_helper.h.
Build tested on arm and x86 allmodconfig
v2:
- sort list of include files
Signed-off-by: Sam Ravnborg <[email protected] >
Acked-by: Benjamin Gaignard <[email protected] >
Cc: Yannick Fertre <[email protected] >
Cc: Philippe Cornu <[email protected] >
Cc: Vincent Abriou <[email protected] >
Cc: David Airlie <[email protected] >
Cc: Daniel Vetter <[email protected] >
Signed-off-by: Daniel Vetter <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-24 13:06:35 +01:00
Noralf Trønnes
e0ce0e2a5d
drm/stm: Use drm_fbdev_generic_setup()
...
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.
drm_fbdev_generic_setup() handles mode_config.num_connector being zero.
In that case it retries fbdev setup on the next .output_poll_changed.
Cc: Yannick Fertre <[email protected] >
Cc: Philippe Cornu <[email protected] >
Cc: Benjamin Gaignard <[email protected] >
Cc: Vincent Abriou <[email protected] >
Signed-off-by: Noralf Trønnes <[email protected] >
Acked-by: Yannick Fertré <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-10-25 17:00:28 +02:00
Benjamin Gaignard
53273b5222
drm: stm: implement get_scanout_position function
...
Hardware allow to read the position in scanout buffer so
we can use this information to make wait of vblank more accurate.
Active area bounds (start, end, total height) have already been
computed and written in ltdc registers, read them and get the
current line position to compute vpos value.
Signed-off-by: Benjamin Gaignard <[email protected] >
Reviewed-by: Yannick Fertré <[email protected] >
Tested-by: Yannick Fertré <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-09-27 15:04:26 +02:00
Thomas Zimmermann
a1a6fa3dcd
drm/stm: Replace drm_dev_unref with drm_dev_put
...
This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Signed-off-by: Benjamin Gaignard <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-07-13 10:11:02 +02:00
Philippe CORNU
c8da819478
drm/stm: move enable/disable_vblank to crtc
...
enable/disable_vblank() functions at drm_driver level
are deprecated. Move them to the ltdc drm_crtc_funcs
structure.
Signed-off-by: Philippe Cornu <[email protected] >
Reviewed-by: Vincent Abriou <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-19 12:03:11 +02:00
Benjamin Gaignard
879659bb87
drm/stm: check pitch and size calculations even if !CONFIG_MMU
...
In all cases we have to check pitch and size calculations to speed up
data transfer.
Fixes: 21f815bf77 ("drm/stm: drv: Improve data transfers")
Signed-off-by: Benjamin Gaignard <[email protected] >
Tested-by: Philippe Cornu <[email protected] >
Reviewed-by: Philippe Cornu <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-02-23 09:37:12 +01:00
Philippe Cornu
21f815bf77
drm/stm: drv: Improve data transfers
...
To optimize data transfers, align pitch on 128 bytes & height
on 4 bytes. This optimization is not applicable on hw without MMU.
Signed-off-by: Yannick Fertre <[email protected] >
Signed-off-by: Vincent Abriou <[email protected] >
Signed-off-by: Philippe Cornu <[email protected] >
Signed-off-by: Benjamin Gaignard <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-01-30 11:45:15 +01:00
Noralf Trønnes
068b393c1a
drm/stm: Use drm_fb_cma_fbdev_init/fini()
...
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.
Remove duplicate ldev assignment.
Cc: Yannick Fertre <[email protected] >
Cc: Philippe Cornu <[email protected] >
Cc: Benjamin Gaignard <[email protected] >
Cc: Vincent Abriou <[email protected] >
Signed-off-by: Noralf Trønnes <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-12-08 14:47:41 +01:00
Benjamin Gaignard
ec17f0341d
gpu: drm: stm: Adopt SPDX identifiers
...
Add SPDX identifiers to files under stm directory
Signed-off-by: Benjamin Gaignard <[email protected] >
Acked-by: Vincent Abriou <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-12-06 15:51:37 +01:00
Noralf Trønnes
4930a4334e
drm/stm: Use drm_gem_fb_create()
...
drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.
Cc: Yannick Fertre <[email protected] >
Cc: Philippe Cornu <[email protected] >
Cc: Benjamin Gaignard <[email protected] >
Cc: Vincent Abriou <[email protected] >
Signed-off-by: Noralf Trønnes <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Tested-by: Philippe Cornu <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-09-02 14:23:27 +02:00
Noralf Trønnes
58ba9aabb8
drm/stm: Use .dumb_map_offset and .dumb_destroy defaults
...
This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.
Cc: Yannick Fertre <[email protected] >
Cc: Philippe Cornu <[email protected] >
Cc: Benjamin Gaignard <[email protected] >
Cc: Vincent Abriou <[email protected] >
Signed-off-by: Noralf Trønnes <[email protected] >
Tested-by: Philippe Cornu <[email protected] >
Acked-by: Philippe Cornu <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-29 13:57:51 +02:00
Philippe CORNU
af5125de7a
drm/stm: drv: Rename platform driver name
...
Rename the platform driver name from "stm" to "stm32-display"
for a better readability in /sys/bus/platform/drivers entries.
Note: We keep "stm" as drm_driver.name because it is better
when using "modetest -M stm ..." (even if recent modetest patch
avoids using -M).
Signed-off-by: Philippe CORNU <[email protected] >
Reviewed-by: Benjamin Gaignard <[email protected] >
Signed-off-by: Benjamin Gaignard <[email protected] >
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-26 15:01:24 +02:00
Yannick Fertre
b759012c5f
drm/stm: Add STM32 LTDC driver
...
This controller provides output signals to interface directly a variety
of LCD and TFT panels. These output signals are: RGB signals
(up to 24bpp), vertical & horizontal synchronisations, data enable and
the pixel clock.
Reviewed-by: Eric Anholt <[email protected] >
Signed-off-by: Yannick Fertre <[email protected] >
Signed-off-by: Eric Anholt <[email protected] >
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Neil Armstrong <[email protected] >
Reviewed-by: Eric Anholt <[email protected] >
2017-04-14 11:30:29 -07:00