Age | Commit message (Collapse) | Author | Files | Lines |
|
We need the total frame refresh time to check if we are too close to
vertical sync when updating the two framebuffer DMA registers and risk
a collision. This new method is more accurate that the previous that
based on mode's vrefresh value, which itself is inaccurate or may not
even be initialized.
Reported-by: Kevin Hao <[email protected]>
Fixes: 11abbc9f39e0 ("drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled")
Cc: <[email protected]> # v4.11+
Signed-off-by: Jyri Sarha <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
|
|
Use tilcdc_crtc_shutdown() instead of tilcdc_crtc_disable() in
tilcdc_crtc_destroy() and remove the modeset locking.
Signed-off-by: Jyri Sarha <[email protected]>
|
|
Remove WARN_ON(!drm_modeset_is_locked(&crtc->mutex)) checks from
tilcdc_crtc_enable(), tilcdc_crtc_disable(), and
tilcdc_crtc_update_fb().
Signed-off-by: Jyri Sarha <[email protected]>
|
|
This forces the HW to be in sync with the empty state. This should
help with the problem when LCDC is already enabled (e.g. by the
bootloader) at the initialization phase and the enable fails when a
new mode is applied.
Signed-off-by: Jyri Sarha <[email protected]>
|
|
drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() adn should not be
used by new code. So convert all users of compatibility functions to use
the new APIs.
Signed-off-by: Cihangir Akturk <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
|
|
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
1496 592 0 2088 828 drivers/gpu/drm/tilcdc/tilcdc_tfp410.o
File size after constify:
text data bss dec hex filename
1880 176 0 2056 808 drivers/gpu/drm/tilcdc/tilcdc_tfp410.o
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
|
|
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
1531 592 0 2123 84b drivers/gpu/drm/tilcdc/tilcdc_panel.o
File size after constify:
text data bss dec hex filename
1915 176 0 2091 82b drivers/gpu/drm/tilcdc/tilcdc_panel.o
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
|
|
For maintaining consistency with kernel coding style replace
reference/unreference in ref counting functions with get/put.
The following cocci script was used to generate the tilcdc patch:
@@
expression ex;
@@
(
-drm_framebuffer_unreference(ex);
+drm_framebuffer_put(ex);
|
-drm_dev_unref(ex);
+drm_dev_put(ex);
|
-drm_framebuffer_reference(ex);
+drm_framebuffer_get(ex);
)
Signed-off-by: Aishwarya Pant <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/3f2f592f6ea28adfea3fd8b70421b2fab38f0b94.1506413698.git.aishpant@gmail.com
|
|
drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.
Cc: Jyri Sarha <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Signed-off-by: Noralf Trønnes <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
It's dead code, the core handles all this directly now.
The only special case is nouveau and tda988x which used one function
for both legacy modeset code and -nv50 atomic world instead of 2
vtables. But amounts to exactly the same.
v2: Rebase over the panel/brideg refactorings in stm/ltdc.
Signed-off-by: Daniel Vetter <[email protected]>
Cc: Archit Taneja <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Peter Senna Tschudin <[email protected]>
Cc: Martin Donnelly <[email protected]>
Cc: Martyn Welch <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Cc: Seung-Woo Kim <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Alison Wang <[email protected]>
Cc: Russell King <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Carlo Caione <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Eric Anholt <[email protected]>
Cc: Mark Yao <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Benjamin Gaignard <[email protected]>
Cc: Vincent Abriou <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: Philippe Cornu <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Jonathan Hunter <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Cc: Jeffy Chen <[email protected]>
Cc: Tomeu Vizoso <[email protected]>
Cc: Yakir Yang <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Romain Perier <[email protected]>
Cc: Kieran Bingham <[email protected]>
Cc: Xinliang Liu <[email protected]>
Cc: Alexey Brodkin <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Rongrong Zou <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Hai Li <[email protected]>
Cc: "Noralf Trønnes" <[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: zain wang <[email protected]>
Cc: Baoyou Xie <[email protected]>
Cc: Boris Brezillon <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Acked-by: Neil Armstrong <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Acked-by: Archit Taneja <[email protected]>
Tested-by: Philippe Cornu <[email protected]> (on stm)
Reviewed-by: Laurent Pinchart <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Acked-by: Noralf Trønnes <[email protected]>
Acked-by: Vincent Abriou <[email protected]>
|
|
It's dead code, the core handles all this directly now. This also
allows us to unexport drm_atomic_plane_set_property.
Signed-off-by: Daniel Vetter <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Brian Starkey <[email protected]>
Cc: Mali DP Maintainers <[email protected]>
Cc: Boris Brezillon <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Cc: Seung-Woo Kim <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Benjamin Gaignard <[email protected]>
Cc: Vincent Abriou <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: Philippe Cornu <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: "Ville Syrjälä" <[email protected]>
Cc: Rongrong Zou <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Alexey Brodkin <[email protected]>
Cc: Eric Engestrom <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Archit Taneja <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Thomas Hellstrom <[email protected]>
Cc: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Archit Taneja <[email protected]>
Acked-by: Philippe Cornu <[email protected]>
Tested-by: Philippe Cornu <[email protected]>
Acked-by: Liviu Dudau <[email protected]>
Acked-by: Vincent Abriou <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
|
|
This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.
Cc: Jyri Sarha <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Signed-off-by: Noralf Trønnes <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: Rob Herring <[email protected]>
Cc: Russell King <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Cc: Seung-Woo Kim <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: Xinliang Liu <[email protected]>
Cc: Rongrong Zou <[email protected]>
Cc: Xinwei Kong <[email protected]>
Cc: Chen Feng <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Carlo Caione <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mark Yao <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Partially-Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
[seanpaul changed subject prefix and fixed conflict in stm/ltdc.c]
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
|
|
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Signed-off-by: Maarten Lankhorst <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
|
|
The CRTC .disable() helper operation is deprecated for atomic drivers,
the new .atomic_disable() helper operation being preferred. Convert all
atomic drivers to .atomic_disable() to avoid cargo-cult use of
.disable() in new drivers.
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Maxime Ripard <[email protected]> # for sun4i
Acked-by: Philipp Zabel <[email protected]> # for mediatek
Acked-by: Alexey Brodkin <[email protected]> # for arcpgu
Acked-by: Boris Brezillon <[email protected]> # for atmel-hlcdc
Tested-by: Philippe Cornu <[email protected]> # for stm
Acked-by: Philippe Cornu <[email protected]> # for stm
Acked-by: Vincent Abriou <[email protected]> # for sti
Reviewed-by: Thomas Hellstrom <[email protected]> # for vmwgfx
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
The old state is useful for drivers that need to perform operations at
enable time that depend on the transition between the old and new
states.
While at it, rename the operation to .atomic_enable() to be consistent
with .atomic_disable(), as the .enable() operation is used by atomic
helpers only.
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Maxime Ripard <[email protected]> # for sun4i
Acked-by: Philipp Zabel <[email protected]> # for imx-drm and mediatek
Acked-by: Alexey Brodkin <[email protected]> # for arcpgu
Acked-by: Boris Brezillon <[email protected]> # for atmel-hlcdc
Acked-by: Liviu Dudau <[email protected]> # for hdlcd and mali-dp
Acked-by: Stefan Agner <[email protected]> # for fsl-dcu
Tested-by: Philippe Cornu <[email protected]> # for stm
Acked-by: Philippe Cornu <[email protected]> # for stm
Acked-by: Vincent Abriou <[email protected]> # for sti
Reviewed-by: Thomas Hellstrom <[email protected]> # for vmwgfx
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Include <drm/*.h> instead of relative path from include/drm, then
remove the -Iinclude/drm compiler flag.
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Convert drivers to use the new of_graph_get_remote_node() helper
instead of parsing the endpoint node and then getting the remote device
node. Now drivers can just specify the device node and which
port/endpoint and get back the connected remote device node. The details
of the graph binding are nicely abstracted into the core OF graph code.
This changes some error messages to debug messages (in the graph core).
Graph connections are often "no connects" depending on the particular
board, so we want to avoid spurious messages. Plus the kernel is not a
DT validator.
Signed-off-by: Rob Herring <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Tested-by: Liviu Dudau <[email protected]>
Tested-by: Eric Anholt <[email protected]>
Tested-by: Jyri Sarha <[email protected]>
Tested by: Archit Taneja <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
|
|
Again this is an internal helper, not the official way to lock a crtc.
Cc: Jyri Sarha <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Linux 4.11-rc3 as requested by Daniel
|
|
Less code ftw.
This converts all drivers except the tinydrm helper module. That one
needs more work, since it gets the THIS_MODULE reference from
tinydrm.ko instead of the actual driver module like it should.
Probably needs a similar trick like I used here with generating the
entire struct with a macro.
Cc: Noralf Trønnes <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Reviewed-by: Liviu Dudau <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Touching HW while clocks are off is a serious error and for instance
breaks suspend functionality. After this patch tilcdc_crtc_update_fb()
always updates the primary plane's framebuffer pointer, increases fb's
reference count and stores vblank event. tilcdc_crtc_update_fb() only
writes the fb's DMA address to HW if the crtc is enabled, as
tilcdc_crtc_enable() takes care of writing the address on enable.
This patch also refactors the tilcdc_crtc_update_fb() a bit. Number of
subsequent small changes had made it almost unreadable. There should
be no other functional changes but checking the CRTC's enable
state. However, the locking goes a bit differently and some of the
redundant checks have been removed in this new version.
The enable_lock should be enough to protect the access to
tilcdc_crtc->enabled. The irq_lock protects the access to last_vblank
and next_fb. The check for vrefresh and last_vblank being valid is
redundant, as the vrefresh should be always valid if the CRTC is
enabled and now last_vblank should be too, because it is initialized
to current time when CRTC raster is enabled. If for some reason the
values are not correctly initialized the division by zero warning is
quite appropriate.
Signed-off-by: Jyri Sarha <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
|
|
Fix badly hardcoded return return value under fail-label. All goto
branches to the label set the "ret"-variable accordingly.
Signed-off-by: Jyri Sarha <[email protected]>
Reviewed-by: Gabriel Krisman Bertazi <[email protected]>
|
|
drm-misc-next
Merge Laurent's drm_platform removal code. Only conflict is with the
drm_pci.h extraction, which allows me to fix up the misplayed
drm_platform_init fumble that 0day and Stephen Rothwell reported.
Signed-off-by: Daniel Vetter <[email protected]>
|
|
The field contains a pointer to the parent platform device of the DRM
device. As struct drm_device also contains a dev pointer to the struct
device embedded in the platform_device structure, the platformdev field
is redundant. Remove it and use the dev pointer directly.
Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Acked-by: Vincent Abriou <[email protected]> # For sti
Acked-by: Russell King <[email protected]> # For armada
Acked-by: Rob Clark <[email protected]> # For msm
Acked-by: Xinwei Kong<[email protected]>
|
|
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
While at it, the 'return' of .disable_vblank is dropped to fix the
following checkpatch warning.
WARNING: void function return statements are not generally useful
Signed-off-by: Shawn Guo <[email protected]>
Cc: Jyri Sarha <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Core code already makes drm_driver.get_vblank_counter hook optional by
letting drm_vblank_no_hw_counter be the default implementation for the
function hook. So the drm_vblank_no_hw_counter assignment in the driver
code becomes redundant and can be removed now.
Signed-off-by: Shawn Guo <[email protected]>
Cc: Alexey Brodkin <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Mali DP Maintainers <[email protected]>
Cc: Russell King <[email protected]>
Cc: Boris Brezillon <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Xinliang Liu <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mark Yao <[email protected]>
Cc: Benjamin Gaignard <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: Eric Anholt <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Acked-by: Russell King <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Acked-by: Alexey Brodkin <[email protected]>
Acked-by: Liviu Dudau <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Instead of receiving the num_crts as a parameter, we can read it
directly from the mode_config structure. I audited the drivers that
invoke this helper and I believe all of them initialize the mode_config
struct accordingly, prior to calling the fb_helper.
I used the following coccinelle hack to make this transformation, except
for the function headers and comment updates. The first and second
rules are split because I couldn't find a way to remove the unused
temporary variables at the same time I removed the parameter.
// <smpl>
@r@
expression A,B,D,E;
identifier C;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
@@
identifier r.C;
type T;
expression V;
@@
- T C;
<...
when != C
- C = V;
...>
// </smpl>
Changes since v1:
- Rebased on top of the tip of drm-misc-next.
- Remove mention to sti since a proper fix got merged.
Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
git://anongit.freedesktop.org/git/drm-misc into drm-next
Another round of -misc stuff:
- Noralf debugfs cleanup cleanup (not yet everything, some more driver
patches awaiting acks).
- More doc work.
- edid/infoframe fixes from Ville.
- misc 1-patch fixes all over, as usual
Noralf needs this for his tinydrm pull request.
* tag 'drm-misc-next-2017-01-30' of git://anongit.freedesktop.org/git/drm-misc: (48 commits)
drm/vc4: Remove vc4_debugfs_cleanup()
dma/fence: Export enable-signaling tracepoint for emission by drivers
drm/tilcdc: Remove tilcdc_debugfs_cleanup()
drm/tegra: Remove tegra_debugfs_cleanup()
drm/sti: Remove drm_debugfs_remove_files() calls
drm/radeon: Remove drm_debugfs_remove_files() call
drm/omap: Remove omap_debugfs_cleanup()
drm/hdlcd: Remove hdlcd_debugfs_cleanup()
drm/etnaviv: Remove etnaviv_debugfs_cleanup()
drm/etnaviv: allow build with COMPILE_TEST
drm/amd/amdgpu: Remove drm_debugfs_remove_files() call
drm/prime: Clarify DMA-BUF/GEM Object lifetime
drm/ttm: Make sure BOs being swapped out are cacheable
drm/atomic: Remove drm_atomic_debugfs_cleanup()
drm: drm_minor_register(): Clean up debugfs on failure
drm: debugfs: Remove all files automatically on cleanup
drm/fourcc: add vivante tiled layout format modifiers
drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F
drm/edid: Set AVI infoframe Q even when QS=0
drm/edid: Introduce drm_hdmi_avi_infoframe_quant_range()
...
|
|
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so the drm_driver.debugfs_cleanup callback is not
needed. Also remove the unused tilcdc_module_ops.debugfs_cleanup()
callback. drm_debugfs_cleanup() removes all debugfs files using
debugfs_remove_recursive(), so there should be no need for such a
callback in the future.
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Noralf Trønnes <[email protected]>
Reviewed-by: Jyri Sarha <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge Linus master to get the connector locking revert.
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: (645 commits)
sysctl: fix proc_doulongvec_ms_jiffies_minmax()
Revert "drm/probe-helpers: Drop locking from poll_enable"
MAINTAINERS: add Dan Streetman to zbud maintainers
MAINTAINERS: add Dan Streetman to zswap maintainers
mm: do not export ioremap_page_range symbol for external module
mn10300: fix build error of missing fpu_save()
romfs: use different way to generate fsid for BLOCK or MTD
frv: add missing atomic64 operations
mm, page_alloc: fix premature OOM when racing with cpuset mems update
mm, page_alloc: move cpuset seqcount checking to slowpath
mm, page_alloc: fix fast-path race with cpuset update or removal
mm, page_alloc: fix check for NULL preferred_zone
kernel/panic.c: add missing \n
fbdev: color map copying bounds checking
frv: add atomic64_add_unless()
mm/mempolicy.c: do not put mempolicy before using its nodemask
radix-tree: fix private list warnings
Documentation/filesystems/proc.txt: add VmPin
mm, memcg: do not retry precharge charges
proc: add a schedule point in proc_pid_readdir()
...
|
|
git://anongit.freedesktop.org/git/drm-misc into drm-next
Back to regular -misc pulls with reasonable sizes:
- dma_fence error clarification (Chris)
- drm_crtc_from_index helper (Shawn), pile more patches on the m-l to roll
this out to drivers
- mmu-less support for fbdev helpers from Benjamin
- piles of kerneldoc work
- some polish for crc support from Tomeu and Benjamin
- odd misc stuff all over
* tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc: (48 commits)
dma-fence: Introduce drm_fence_set_error() helper
dma-fence: Wrap querying the fence->status
dma-fence: Clear fence->status during dma_fence_init()
drm: fix compilations issues introduced by "drm: allow to use mmuless SoC"
drm: Change the return type of the unload hook to void
drm: add more document for drm_crtc_from_index()
drm: remove useless parameters from drm_pick_cmdline_mode function
drm: crc: Call wake_up_interruptible() each time there is a new CRC entry
drm: allow to use mmuless SoC
drm: compile drm_vm.c only when needed
fbmem: add a default get_fb_unmapped_area function
drm: crc: Wait for a frame before returning from open()
drm: Move locking into drm_debugfs_crtc_crc_add
drm/imx: imx-tve: Remove unused variable
Revert "drm: nouveau: fix build when LEDS_CLASS=m"
drm: Add kernel-doc for drm_crtc_commit_get/put
drm/atomic: Fix outdated comment.
drm: reference count event->completion
gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
drm: Document deprecated load/unload hook
...
|
|
git://anongit.freedesktop.org/git/drm-misc into drm-next
First -misc pull for 4.11:
- drm_mm rework + lots of selftests (Chris Wilson)
- new connector_list locking+iterators
- plenty of kerneldoc updates
- format handling rework from Ville
- atomic helper changes from Maarten for better plane corner-case handling
in drivers, plus the i915 legacy cursor patch that needs this
- bridge cleanup from Laurent
- plus plenty of small stuff all over
- also contains a merge of the 4.10 docs tree so that we could apply the
dma-buf kerneldoc patches
It's a lot more than usual, but due to the merge window blackout it also
covers about 4 weeks, so all in line again on a per-week basis. The more
annoying part with no pull request for 4 weeks is managing cross-tree
work. The -intel pull request I'll follow up with does conflict quite a
bit with -misc here. Longer-term (if drm-misc keeps growing) a
drm-next-queued to accept pull request for the next merge window during
this time might be useful.
I'd also like to backmerge -rc2+this into drm-intel next week, we have
quite a pile of patches waiting for the stuff in here.
* tag 'drm-misc-next-2016-12-30' of git://anongit.freedesktop.org/git/drm-misc: (126 commits)
drm: Add kerneldoc markup for new @scan parameters in drm_mm
drm/mm: Document locking rules
drm: Use drm_mm_insert_node_in_range_generic() for everyone
drm: Apply range restriction after color adjustment when allocation
drm: Wrap drm_mm_node.hole_follows
drm: Apply tight eviction scanning to color_adjust
drm: Simplify drm_mm scan-list manipulation
drm: Optimise power-of-two alignments in drm_mm_scan_add_block()
drm: Compute tight evictions for drm_mm_scan
drm: Fix application of color vs range restriction when scanning drm_mm
drm: Unconditionally do the range check in drm_mm_scan_add_block()
drm: Rename prev_node to hole in drm_mm_scan_add_block()
drm: Fix O= out-of-tree builds for selftests
drm: Extract struct drm_mm_scan from struct drm_mm
drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()
drm: Simplify drm_mm_clean()
drm: Detect overflow in drm_mm_reserve_node()
drm: Fix kerneldoc for drm_mm_scan_remove_block()
drm: Promote drm_mm alignment to u64
drm: kselftest for drm_mm and restricted color eviction
...
|
|
tilcdc fixes for v4.10.
* tag 'tilcdc-4.10-fixes' of https://github.com/jsarha/linux:
drm: tilcdc: simplify the recovery from sync lost error on rev1
|
|
Revision 2 of LCDC suffers from an issue where a SYNC_LOST error
caused by limited memory bandwidth may leave the picture shifted a
couple pixels to the right.
This issue has not been observed on revision 1, while the recovery
mechanism introduces a different issue, where the END_OF_FRAME
interrupt doesn't fire while drm is waiting for vblanks.
On rev1: recover from sync lost errors by simply clearing the
RASTER_ENABLE bit in the RASTER_CTRL register and re-enabling it
again as is suggested by the datasheet.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Reviewed-by: Jyri Sarha <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
|
|
Including all drivers. I thought about keeping small compat functions
to avoid having to change all drivers. But I really like the
drm_printer idea, so figured spreading it more widely is a good thing.
v2: Review from Chris:
- Natural argument order and better name for drm_mm_print.
- show_mm() macro in the selftest.
Cc: Rob Clark <[email protected]>
Cc: Russell King <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Jyri Sarha <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
needs to be converted. For anything where the Seconds argument is 0, this
is pointless and can be replaced with a simple assignment.
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Peter Zijlstra <[email protected]>
|
|
Instead of linking encoders and bridges in every driver (and getting it
wrong half of the time, as many drivers forget to set the drm_bridge
encoder pointer), do so in core code. The drm_bridge_attach() function
needs the encoder and optional previous bridge to perform that task,
update all the callers.
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Stefan Agner <[email protected]> # For DCU
Acked-by: Boris Brezillon <[email protected]> # For atmel-hlcdc
Acked-by: Vincent Abriou <[email protected]> # For STI
Acked-by: Maxime Ripard <[email protected]> # For sun4i
Acked-by: Xinliang Liu <[email protected]> # For hisilicon
Acked-by: Jyri Sarha <[email protected]> # For tilcdc
Reviewed-by: Daniel Vetter <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com
|
|
Rather than compare the format u32s of two format infos, we can direclty
compare the format info pointers themselves. Noramlly all the ->format
pointers all point to somwehere in the big array, so this is a valid
way to test for equality.
Also drivers may want to point ->format at a private format info struct
instead (eg. for special compressed formats with extra planes), so
just comparing the pixel format values wouldn't necessaritly even work.
But comparing the pointers will also take care of that case.
@@
struct drm_framebuffer *a;
struct drm_framebuffer *b;
@@
(
- a->format->format != b->format->format
+ a->format != b->format
|
- a->format->format == b->format->format
+ a->format == b->format
)
@@
struct drm_plane_state *a;
struct drm_plane_state *b;
@@
(
- a->fb->format->format != b->fb->format->format
+ a->fb->format != b->fb->format
|
- a->fb->format->format == b->fb->format->format
+ a->fb->format == b->fb->format
)
@@
struct drm_crtc *crtc;
struct drm_framebuffer *x;
@@
(
- crtc->primary->fb->format->format != x->format->format
+ crtc->primary->fb->format != x->format
|
- x->format->format != crtc->primary->fb->format->format
+ x->format != crtc->primary->fb->format
)
@@
struct drm_mode_set *set;
@@
- set->fb->format->format != set->crtc->primary->fb->format->format
+ set->fb->format != set->crtc->primary->fb->format
Cc: Laurent Pinchart <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Laurent Pinchart <[email protected]>
|
|
Replace uses of fb->pixel_format with fb->format->format.
Less duplicated information is a good thing.
Note that coccinelle failed to eliminate the
"/* fourcc format */" comment from drm_framebuffer.h, so I had
to do that part manually.
@@
struct drm_framebuffer *FB;
expression E;
@@
drm_helper_mode_fill_fb_struct(...) {
...
- FB->pixel_format = E;
...
}
@@
struct drm_framebuffer *FB;
expression E;
@@
i9xx_get_initial_plane_config(...) {
...
- FB->pixel_format = E;
...
}
@@
struct drm_framebuffer *FB;
expression E;
@@
ironlake_get_initial_plane_config(...) {
...
- FB->pixel_format = E;
...
}
@@
struct drm_framebuffer *FB;
expression E;
@@
skylake_get_initial_plane_config(...) {
...
- FB->pixel_format = E;
...
}
@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
@@
(
- a->pixel_format
+ a->format->format
|
- b.pixel_format
+ b.format->format
)
@@
struct drm_plane_state *a;
struct drm_plane_state b;
@@
(
- a->fb->pixel_format
+ a->fb->format->format
|
- b.fb->pixel_format
+ b.fb->format->format
)
@@
struct drm_crtc *CRTC;
@@
(
- CRTC->primary->fb->pixel_format
+ CRTC->primary->fb->format->format
|
- CRTC->primary->state->fb->pixel_format
+ CRTC->primary->state->fb->format->format
)
@@
struct drm_mode_set *set;
@@
(
- set->fb->pixel_format
+ set->fb->format->format
|
- set->crtc->primary->fb->pixel_format
+ set->crtc->primary->fb->format->format
)
@@
@@
struct drm_framebuffer {
...
- uint32_t pixel_format;
...
};
v2: Fix commit message (Laurent)
Rebase due to earlier removal of many fb->pixel_format uses,
including the 'fb->format = drm_format_info(fb->format->format);'
snafu
v3: Adjusted the semantic patch a bit and regenerated due to code
changes
Cc: Laurent Pinchart <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Alex Deucher <[email protected]> (v1)
Reviewed-by: Laurent Pinchart <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Replace drm_format_plane_cpp(fb->pixel_format) with just
fb->format->cpp[]. Avoids the expensive format info lookup.
@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
expression E;
@@
(
- drm_format_plane_cpp(a->pixel_format, E)
+ a->format->cpp[E]
|
- drm_format_plane_cpp(b.pixel_format, E)
+ b.format->cpp[E]
)
@@
struct drm_plane_state *a;
struct drm_plane_state b;
expression E;
@@
(
- drm_format_plane_cpp(a->fb->pixel_format, E)
+ a->fb->format->cpp[E]
|
- drm_format_plane_cpp(b.fb->pixel_format, E)
+ b.fb->format->cpp[E]
)
@@
struct drm_framebuffer *a;
identifier T;
expression E;
@@
T = a->pixel_format
<+...
- drm_format_plane_cpp(T, E)
+ a->format->cpp[E]
...+>
@@
struct drm_framebuffer b;
identifier T;
expression E;
@@
T = b.pixel_format
<+...
- drm_format_plane_cpp(T, E)
+ b.format->cpp[E]
...+>
v2: Rerun spatch due to code changes
Cc: Laurent Pinchart <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Backmerge v4.9-rc8 to get at
commit e94bd1736f1f60e916a85a80c0b0ebeaae36cce5
Author: Michel Dänzer <[email protected]>
Date: Wed Nov 30 17:30:01 2016 +0900
drm: Don't call drm_for_each_crtc with a non-KMS driver
so I can apply Michel's follow-up patch.
Signed-off-by: Daniel Vetter <[email protected]>
|
|
Many drivers (21 to be exact) create connectors that are always
connected (for instance to an LVDS or DSI panel). Instead of forcing
them to implement a dummy .detect() handler, make the callback optional
and consider the connector as always connected in that case.
Reviewed-by: Alex Deucher <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Acked-by: Vincent Abriou <[email protected]>
Acked-by: Alexey Brodkin <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
[seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c]
Signed-off-by: Sean Paul <[email protected]>
|
|
The DT binding for tildc is not consistent with the driver code: there
are two options - 'max-width' and 'max-pixelclock' specified in the
documentation which are parsed as 'ti,max-width' and
'ti,max-pixelclock' respectively.
Make the driver code consistent with the binding.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Reviewed-by: Jyri Sarha <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
|
|
We should wait for the last frame to complete before shutting things
down also on LCDC rev 1.
Signed-off-by: Jyri Sarha <[email protected]>
Tested-by: Bartosz Golaszewski <[email protected]>
|
|
Configure video mode to HW in enable() call back. There is no reason
to do it before that. This makes PM functions way easier because there
is no HW context to save when screen is for instance blanked. This
patch removes mode_set_nofb() call back from tilcdc.
Signed-off-by: Jyri Sarha <[email protected]>
Tested-by: Bartosz Golaszewski <[email protected]>
|
|
Load palette at the end of mode_set_nofb(). Moving the palette loading
to mode_set_nofb() saves us from storing and restoring of framebuffer
addresses in dma registers that were just recently written there.
Signed-off-by: Jyri Sarha <[email protected]>
Tested-by: Bartosz Golaszewski <[email protected]>
|
|
Add timeout wait for palette loadind to complete. We do not want to
hang forever if palette loaded interrupt does not arrive for some
reason.
Signed-off-by: Jyri Sarha <[email protected]>
Tested-by: Bartosz Golaszewski <[email protected]>
|
|
The LCDC revision 2 documentation also mentions the mandatory palette
for true color modes. Even if the rev 2 LCDC appears to work just fine
without the palette being loaded loading it helps in testing the
feature.
Signed-off-by: Jyri Sarha <[email protected]>
Tested-by: Bartosz Golaszewski <[email protected]>
|
|
Set LCDC_PALETTE_LOAD_MODE bit-field with new tilcdc_write_mask()
instead of tilcdc_set(). Setting a bit-fields with tilcdc_set() is
fundamentally broken.
Signed-off-by: Jyri Sarha <[email protected]>
Tested-by: Bartosz Golaszewski <[email protected]>
|