Lyude Paul
70612d0e12
drm/ttm: Remove pinned bos from LRU in ttm_bo_move_to_lru_tail() v2
...
Recently a regression was introduced which caused TTM's buffer eviction to
attempt to evict already-pinned BOs, causing issues with buffer eviction
under memory pressure along with suspend/resume:
nouveau 0000:1f:00.0: DRM: evicting buffers...
nouveau 0000:1f:00.0: DRM: Moving pinned object 00000000c428c3ff!
nouveau 0000:1f:00.0: fifo: fault 00 [READ] at 0000000000200000 engine 04
[BAR1] client 07 [HUB/HOST_CPU] reason 02 [PTE] on channel -1 [00ffeaa000
unknown]
nouveau 0000:1f:00.0: fifo: DROPPED_MMU_FAULT 00001000
nouveau 0000:1f:00.0: fifo: fault 01 [WRITE] at 0000000000020000 engine
0c [HOST6] client 07 [HUB/HOST_CPU] reason 02 [PTE] on channel 1
[00ffb28000 DRM]
nouveau 0000:1f:00.0: fifo: channel 1: killed
nouveau 0000:1f:00.0: fifo: runlist 0: scheduled for recovery
[TTM] Buffer eviction failed
nouveau 0000:1f:00.0: DRM: waiting for kernel channels to go idle...
nouveau 0000:1f:00.0: DRM: failed to idle channel 1 [DRM]
nouveau 0000:1f:00.0: DRM: resuming display...
After some bisection and investigation, it appears this resulted from the
recent changes to ttm_bo_move_to_lru_tail(). Previously when a buffer was
pinned, the buffer would be removed from the LRU once ttm_bo_unreserve
to maintain the LRU list when pinning or unpinning BOs. However, since:
commit 3d1a88e105 ("drm/ttm: cleanup LRU handling further")
We've been exiting from ttm_bo_move_to_lru_tail() at the very beginning of
the function if the bo we're looking at is pinned, resulting in the pinned
BO never getting removed from the lru and as a result - causing issues when
it eventually becomes time for eviction.
So, let's fix this by calling ttm_bo_del_from_lru() from
ttm_bo_move_to_lru_tail() in the event that we're dealing with a pinned
buffer.
v2 (chk): reduce to only the fixing one liner since we always want to
call the callback whenever we would move on the LRU.
Fixes: 3d1a88e105 ("drm/ttm: cleanup LRU handling further")
Cc: Dave Airlie <airlied@redhat.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210105114505.38210-1-christian.koenig@amd.com
2021-01-06 12:50:57 -05:00
Phil Elwell
545d9d7802
drm/v3d: Don't clear MMU control bits on exception
...
MMU exception conditions are reported in the V3D_MMU_CTRL register as
write-1-to-clear (W1C) bits. The MMU interrupt handling code clears any
exceptions, but does so by masking out any other bits and writing the
result back. There are some important control bits in that register,
including MMU_ENABLE, so a safer approach is to simply write back the
value just read unaltered.
Signed-off-by: Phil Elwell <phil@raspberrypi.org >
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/1608755714-18233-4-git-send-email-stefan.wahren@i2se.com
2021-01-06 18:38:57 +01:00
Phil Elwell
334dd38a38
drm/v3d: Set dma_mask as well as coherent_dma_mask
...
Both coherent_dma_mask and dma_mask act as constraints on allocations
and bounce buffer usage, so be sure to set dma_mask to the appropriate
value otherwise the effective mask could be incorrect.
Signed-off-by: Phil Elwell <phil@raspberrypi.org >
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/1608755714-18233-3-git-send-email-stefan.wahren@i2se.com
2021-01-06 18:38:57 +01:00
Nicolas Saenz Julienne
f4f3beb779
drm/v3d: Use platform_get_irq_optional() to get optional IRQs
...
Aside from being more correct, the non optional version of the function
prints an error when failing to find the IRQ.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/1608755714-18233-2-git-send-email-stefan.wahren@i2se.com
2021-01-06 18:38:57 +01:00
Thomas Zimmermann
840462e687
drm/vmwgfx: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Zack Rusin <zackr@vmware.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-20-tzimmermann@suse.de
2021-01-06 15:44:27 +01:00
Thomas Zimmermann
5bbacc2e7a
drm/virtgpu: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert virtgpu to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-19-tzimmermann@suse.de
2021-01-06 15:44:04 +01:00
Thomas Zimmermann
56492fe94a
drm/vboxvideo: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert vboxvideo to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Hans de Goede <hdegoede@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-18-tzimmermann@suse.de
2021-01-06 15:44:04 +01:00
Thomas Zimmermann
d86a41267b
drm/radeon: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert radeon to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-17-tzimmermann@suse.de
2021-01-06 15:43:46 +01:00
Thomas Zimmermann
abe3910886
drm/radeon: Fix trailing whitespaces
...
Adhere to kernel coding style.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-16-tzimmermann@suse.de
2021-01-06 15:43:23 +01:00
Thomas Zimmermann
dc3629ab04
drm/qxl: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert qxl to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-15-tzimmermann@suse.de
2021-01-06 15:43:14 +01:00
Thomas Zimmermann
0e6aadca11
drm/mgag200: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert mgag200 to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-13-tzimmermann@suse.de
2021-01-06 15:43:13 +01:00
Thomas Zimmermann
a2c68495b5
drm/gma500: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert gma500 to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-8-tzimmermann@suse.de
2021-01-06 15:43:13 +01:00
Thomas Zimmermann
ba596ee654
drm/gma500: Fix trailing whitespaces
...
Adhere to kernel coding style.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-7-tzimmermann@suse.de
2021-01-06 15:43:13 +01:00
Thomas Zimmermann
a33f187a3c
drm/cirrus: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert cirrus to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-6-tzimmermann@suse.de
2021-01-06 15:43:10 +01:00
Thomas Zimmermann
c72a313b51
drm/bochs: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert bochs to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-5-tzimmermann@suse.de
2021-01-06 15:42:55 +01:00
Thomas Zimmermann
46fb883c3d
drm/ast: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert ast to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-4-tzimmermann@suse.de
2021-01-06 15:38:30 +01:00
Simon Ser
cf9a4be47f
drm/doc: render drm.h uapi docs
...
It doesn't seem like drm.h docs are included anywhere. Render them next
to drm_mode.h, under the "Userspace API Structures" section.
This also allows references to e.g. DRM_CAP_* to be properly linkified
elsewhere in our docs.
Signed-off-by: Simon Ser <contact@emersion.fr >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201222133524.160842-6-contact@emersion.fr
2021-01-05 14:22:26 +01:00
Simon Ser
0e0dc44800
drm/doc: demote old doc-comments in drm.h
...
Sphinx doesn't like old doc-comments in drm.h and generates warnings
like:
./include/uapi/drm/drm.h:87: warning: cannot understand function prototype: 'struct drm_clip_rect '
./include/uapi/drm/drm.h:97: warning: cannot understand function prototype: 'struct drm_drawable_info '
./include/uapi/drm/drm.h:105: warning: cannot understand function prototype: 'struct drm_tex_region '
...
Demote these to regular comments, because converting all of them is
quite a lot of work (also requires documenting all of the struct fields
for instance). Also many of these structures aren't really used by
modern user-space.
We can easily convert these remaining old comments to Sphinx style on a
one-by-one basis.
Signed-off-by: Simon Ser <contact@emersion.fr >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201222133524.160842-5-contact@emersion.fr
2021-01-05 14:22:07 +01:00
Simon Ser
877c39acf5
drm/doc: re-format drm.h file comment
...
Our documentation build system chokes on \file comments:
./include/uapi/drm/drm.h:2: warning: Cannot understand * \file drm.h
on line 2 - I thought it was a doc line
Remove all of the slash-directives, and demote to a normal comment. Keep
the historical information because it predates Git.
v3: keep the comment (Daniel)
Signed-off-by: Simon Ser <contact@emersion.fr >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201222133524.160842-4-contact@emersion.fr
2021-01-05 14:21:35 +01:00
Simon Ser
9a01105389
drm: warn if cursor plane is set with legacy funcs
...
A driver must not set drm_crtc.cursor and any of the legacy funcs at the
same time, otherwise it's not clear which one DRM core should use for
legacy cursor updates.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201222134002.161613-1-contact@emersion.fr
2021-01-04 11:33:23 +01:00
Linus Walleij
1f20bf5921
drm/panel: s6e63m0: Support max-brightness
...
The "max-brightness" is a standard backlight property that
we need to support for the Samsung GT-I8190 Golden because
the display will go black if we crank up the brightness
too high.
As the platform needs this ability to give picture this is
a regression fix along with the addition of the property
to the GT-I8190 device tree.
Cc: Stephan Gerhold <stephan@gerhold.net >
Fixes: 9c3f0a0dd6 ("drm/panel: s6e63m0: Implement 28 backlight levels")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201214222210.238081-1-linus.walleij@linaro.org
2020-12-30 11:26:08 +01:00
Tian Tao
ce90f685bd
drm/tve200: remove unused including <linux/version.h>
...
Remove including <linux/version.h> that don't need it.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1609291023-46889-1-git-send-email-tiantao6@hisilicon.com
2020-12-30 11:25:05 +01:00
Tian Tao
72eab0ba6d
drm/hisilicon: Remove drm_dev_put in hibmc
...
Hibmc use the devm_drm_dev_alloc function in hibmc_pci_probe, if
hibmc_pci_probe returns non-zero, devm_drm_dev_alloc will call
devm_drm_dev_init, which will call devm_drm_dev_init_release to
release drm_dev_put. There is no need for hibmc to call
drm_dev_put separately.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1608638156-7879-1-git-send-email-tiantao6@hisilicon.com
2020-12-23 08:20:28 -05:00
Tian Tao
4c5d02d94c
drm/hisilicon: Use pcim_enable_device()
...
Using the managed function simplifies the error handling. After
unloading the driver, the PCI device should now get disabled as
well.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1608511522-3100-1-git-send-email-tiantao6@hisilicon.com
2020-12-22 22:30:44 -05:00
Chia-I Wu
b39100a55c
drm/virtio: align blob resources to page sizes
...
They trigger the BUG_ON() in drm_gem_private_object_init otherwise.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20201219031959.92932-1-olvaffe@gmail.com
Cc: Gurchetan Singh <gurchetansingh@chromium.org >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-22 13:43:30 +01:00
Tian Tao
d1f66f054b
drm/qxl: use flexible-array member instead of zero-length array
...
Use flexible-array member introduced in C99 instead of zero-length
array. Most of zero-length array was already taken care in previous
patch [1]. Now modified few more cases which were not handled earlier.
[1]. https://patchwork.kernel.org/patch/11394197/
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1607650349-28513-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-22 13:43:29 +01:00
Enrico Weigelt, metux IT consult
2077ec340c
drivers: gpu: drm: virtio: fix dependency of DRM_VIRTIO_GPU on VIRTIO
...
VIRTIO itself has no dependencies and therefore can easily be just
select'ed, instead of depending on it. The current depends on causes
any others trying to select VIRTIO to fail like this:
drivers/gpu/drm/Kconfig:74:error: recursive dependency detected!
drivers/gpu/drm/Kconfig:74: symbol DRM_KMS_HELPER is selected by DRM_VIRTIO_GPU
drivers/gpu/drm/virtio/Kconfig:2: symbol DRM_VIRTIO_GPU depends on VIRTIO
drivers/virtio/Kconfig:2: symbol VIRTIO is selected by GPIO_VIRTIO
drivers/gpio/Kconfig:1618: symbol GPIO_VIRTIO depends on GPIOLIB
drivers/gpio/Kconfig:14: symbol GPIOLIB is selected by I2C_MUX_LTC4306
drivers/i2c/muxes/Kconfig:47: symbol I2C_MUX_LTC4306 depends on I2C
drivers/i2c/Kconfig:8: symbol I2C is selected by FB_DDC
drivers/video/fbdev/Kconfig:63: symbol FB_DDC depends on FB
drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER
drivers/gpu/drm/Kconfig:80: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
It seems that having both 'depends on' as well as 'select' on the same symbol
sends us into big trouble, and Kconfig can't break up the circular dependency
(note that in the tested configuration, neither I2C, FB or DRM are enabled at
all). Perhaps we could consider this a bug in Kconfig, but the trouble can
easily be circumvented by changing 'depends on' into 'select'.
DRM_VIRTIO_GPU also depends on VIRTIO_MENU, so even after this change, that
option will only show up if the user already enabled virtio in the config.
This change didn't cause any changes in the .config after menuconfig run,
so we should be completely safe here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20201204131221.2827-1-info@metux.net
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-22 13:43:29 +01:00
Daniel Vetter
14c1e12ba6
drm/fb-helper: Add a FIXME that generic_setup is very confusing
...
I tried to fix this for real, but it's very sprawling and lots of
drivers get this mildly wrong one way or the other.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Acked-by: Simon Ser <contact@emersion.fr >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201211161113.3350061-2-daniel.vetter@ffwll.ch
2020-12-22 12:17:37 +01:00
Simon Ser
a1b766d1b3
drm/doc: atomic implicitly enables other caps
...
Document that enabling atomic also enables universal planes and aspect
ratio modes.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201217113220.102271-7-contact@emersion.fr
2020-12-17 17:06:26 +01:00
Simon Ser
96962e3de7
drm: require each CRTC to have a unique primary plane
...
User-space expects to be able to pick a primary plane for each CRTC
exposed by the driver. Make sure this assumption holds in
drm_mode_config_validate.
Use the legacy drm_crtc.primary field to check this, because it's
simpler and we require drivers to set it anyways. Accumulate a set of
primary planes which are already used for a CRTC in a bitmask. Error out
if a primary plane is re-used.
v2: new patch
v3:
- Use u64 instead of __u64 (Jani)
- Use `unsigned int` instead of `unsigned` (Jani)
v4:
- Use u32 instead of u64 for plane mask (Ville)
- Use drm_plane_mask instead of BIT (Ville)
- Fix typos (Ville)
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Acked-by: Ville Syrjala <ville.syrjala@linux.intel.com >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201211184634.74534-4-contact@emersion.fr
2020-12-17 17:03:42 +01:00
Simon Ser
a7ecf00346
drm/doc: fix reference to drm_format_modifier_blob
...
The documentation build system recognizes "struct XXX" references and
generates links for them.
Signed-off-by: Simon Ser <contact@emersion.fr >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201217113220.102271-4-contact@emersion.fr
2020-12-17 16:57:13 +01:00
Simon Ser
77a71abbdd
drm/doc: introduce new section for standard plane properties
...
Introduce a new "Standard Plane Properties" section for properties
defined in drm_plane.c. Move the mis-placed IN_FORMATS docs there.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201217113220.102271-3-contact@emersion.fr
2020-12-17 16:56:40 +01:00
Simon Ser
46f9be4c8a
drm/doc: the KMS properties section is for user-space devs
...
State that the "KMS Properties" section is mainly for user-space
developers.
Signed-off-by: Simon Ser <contact@emersion.fr >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201217113220.102271-2-contact@emersion.fr
2020-12-17 16:56:12 +01:00
Simon Ser
2189100c94
drm/doc: move color management functions under CRTC section
...
Move drm_color_mgmt function reference from the KMS properties
section to the CRTC abstraction section. This makes the KMS
properties section more readable for user-space developers.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201216202222.48146-5-contact@emersion.fr
2020-12-17 16:55:28 +01:00
Simon Ser
31c558f474
drm/doc: move damage tracking functions to new section
...
Move drm_damage_helper function reference from the KMS properties
section to the plane abstraction section. This makes the KMS
properties section more readable for user-space developers.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201216202222.48146-4-contact@emersion.fr
2020-12-17 16:54:56 +01:00
Simon Ser
9d8f78f6ae
drm/doc: move composition function docs to new section
...
Move drm_blend.c function reference from the KMS properties section to
the plane abstraction section. This makes the KMS properties section
more readable for user-space developers.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201216202222.48146-3-contact@emersion.fr
2020-12-17 16:54:26 +01:00
Simon Ser
e07f001ccc
drm/doc: rename FB_DAMAGE_CLIPS section
...
Make it more human-readable.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Cc: Pekka Paalanen <ppaalanen@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201216202222.48146-2-contact@emersion.fr
2020-12-17 16:53:36 +01:00
Tomi Valkeinen
31d49c657f
MAINTAINERS: Update addresses for TI display drivers
...
Update the maintainer email addresses for TI display drivers.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Acked-by: Jyri Sarha <jyri.sarha@iki.fi >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201216075917.17481-1-tomi.valkeinen@ti.com
2020-12-17 11:05:03 +02:00
Daniel Vetter
c545781e1c
dma-buf: doc polish for pin/unpin
...
Motivated by a discussion with Christian and Thomas: Try to untangle a
bit what's relevant for importers and what's relevant for exporters.
Also add an assert that really only dynamic importers use the api
function, anything else doesn't make sense.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201211155843.3348718-4-daniel.vetter@ffwll.ch
2020-12-16 11:28:34 +01:00
Daniel Vetter
8ccf0a29af
dma-buf: begin/end_cpu might lock the dma_resv lock
...
At least amdgpu and i915 do, so lets just document this as the rule.
v2: Works better with less typos (intel-gfx-ci)
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201214171622.3868883-1-daniel.vetter@ffwll.ch
2020-12-16 11:28:34 +01:00
Daniel Vetter
85804b70cc
dma-buf: some kerneldoc formatting fixes
...
Noticed while reviewing the output. Adds a bunch more links and fixes
the function interface quoting.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201211155843.3348718-2-daniel.vetter@ffwll.ch
2020-12-16 11:28:34 +01:00
Daniel Vetter
de9114ece5
dma-buf: Remove kmap kerneldoc vestiges
...
Also try to clarify a bit when dma_buf_begin/end_cpu_access should
be called.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201211155843.3348718-1-daniel.vetter@ffwll.ch
2020-12-16 11:28:34 +01:00
Maxime Ripard
ba8c0faebb
drm/vc4: hdmi: Enable 10/12 bpc output
...
The BCM2711 supports higher bpc count than just 8, so let's support it in
our driver.
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-10-maxime@cerno.tech
2020-12-16 10:11:58 +01:00
Maxime Ripard
24169a2b05
drm/vc4: hdmi: Limit the BCM2711 to the max without scrambling
...
Unlike the previous generations, the HSM clock limitation is way above
what we can reach without scrambling, so let's move the maximum
frequency we support to the maximum clock frequency without scrambling.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-9-maxime@cerno.tech
2020-12-16 10:11:53 +01:00
Maxime Ripard
d2a7dd004c
drm/vc4: hdmi: Use the connector state pixel rate for the PHY
...
The PHY initialisation parameters are not based on the pixel clock but
the TMDS clock rate which can be the pixel clock in the standard case,
but could be adjusted based on some parameters like the bits per color.
Since the TMDS clock rate is stored in our custom connector state
already, let's reuse it from there instead of computing it again.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-8-maxime@cerno.tech
2020-12-16 10:11:48 +01:00
Maxime Ripard
f623746f74
drm/vc4: hdmi: Store pixel frequency in the connector state
...
The pixel rate is for now quite simple to compute, but with more features
(30 and 36 bits output, YUV output, etc.) will depend on a bunch of
connectors properties.
Let's store the rate we have to run the pixel clock at in our custom
connector state, and compute it in atomic_check.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-7-maxime@cerno.tech
2020-12-16 10:11:43 +01:00
Maxime Ripard
fbe7271e47
drm/vc4: hdmi: Create a custom connector state
...
When run with a higher bpc than 8, the clock of the HDMI controller needs
to be adjusted. Let's create a connector state that will be used at
atomic_check and atomic_enable to compute and store the clock rate
associated to the state.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-6-maxime@cerno.tech
2020-12-16 10:11:37 +01:00
Maxime Ripard
e55a077511
drm/vc4: hdmi: Don't access the connector state in reset if kmalloc fails
...
drm_atomic_helper_connector_reset uses kmalloc which, from an API
standpoint, can fail, and thus setting connector->state to NULL.
However, our reset hook then calls drm_atomic_helper_connector_tv_reset
that will access connector->state without checking if it's a valid
pointer or not.
Make sure we don't end up accessing a NULL pointer.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Suggested-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-5-maxime@cerno.tech
2020-12-16 10:11:32 +01:00
Maxime Ripard
320e84dc61
drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check
...
Commit 63495f6b4a ("drm/vc4: hdmi: Make sure our clock rate is within
limits") was intended to compute the pixel rate to make sure we remain
within the boundaries of what the hardware can provide.
However, unlike what mode_valid was checking for, we forgot to take
into account the clock doubling flag that can be set for modes. Let's
honor that flag if it's there.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reported-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Fixes: 63495f6b4a ("drm/vc4: hdmi: Make sure our clock rate is within limits")
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-4-maxime@cerno.tech
2020-12-16 10:11:28 +01:00
Maxime Ripard
8d91474667
drm/vc4: Pass the atomic state to encoder hooks
...
We'll need to access the connector state in our encoder setup, so let's
just pass the whole DRM state to our private encoder hooks.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-3-maxime@cerno.tech
2020-12-16 10:11:22 +01:00