03 Jun, 2019
1 commit
-
drm_atomic_set_fence_for_plane() contains the main discussion from a
driver pov, link to that from more places.Cc: Pekka Paalanen
Reviewed-by: Pekka Paalanen
Signed-off-by: Daniel Vetter
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Sean Paul
Cc: David Airlie
Cc: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20190603142848.26487-1-daniel.vetter@ffwll.ch
05 Dec, 2018
2 commits
-
With fb_damage_clips blob property in drm_plane_state, this patch adds
helper iterator to traverse the damage clips that lie inside plane src.
Iterator will return full plane src as damage in case need full plane
update or damage is not specified.v2:
- Plane src clipping correction
- Handle no plane update case in iter_nextSigned-off-by: Deepak Rawat
Reviewed-by: Daniel Vetter
Reviewed-by: Thomas Hellstrom
Signed-off-by: Thomas Hellstrom -
FB_DAMAGE_CLIPS is an optional plane property to mark damaged regions
on the plane in framebuffer coordinates of the framebuffer attached to
the plane.The layout of blob data is simply an array of "struct drm_mode_rect".
Unlike plane src coordinates, damage clips are not in 16.16 fixed point.
As plane src in framebuffer cannot be negative so are damage clips. In
damage clip, x1/y1 are inclusive and x2/y2 are exclusive.This patch also exports the kernel internal drm_rect to userspace as
drm_mode_rect. This is because "struct drm_clip_rect" is not sufficient
to represent damage for current plane size.Driver which are interested in enabling FB_DAMAGE_CLIPS property for a
plane should enable this property using drm_plane_enable_damage_clips.v2:
- Input validation on damage clips against framebuffer size.
- Doc update, other minor changes.Signed-off-by: Lukasz Spintzyk
Signed-off-by: Deepak Rawat
Reviewed-by: Daniel Vetter
Reviewed-by: Thomas Hellstrom
Signed-off-by: Thomas Hellstrom
07 Nov, 2018
1 commit
-
Add a function to check whether there is at least one plane that
supports a specific format and modifier combination. Drivers can
use this to reject unsupported formats/modifiers in .fb_create().v2: Accept anyformat if the driver doesn't do planes (Eric)
s/planes_have_format/any_plane_has_format/ (Eric)
Check the modifier as well since we already have a function
that does both
v3: Don't do the check in the core since we may not know the
modifier yet, instead export the function and let drivers
call it themselvesCc: Eric Anholt
Cc: Dhinakaran Pandiyan
Signed-off-by: Ville Syrjälä
Reviewed-by: Dhinakaran Pandiyan
Link: https://patchwork.freedesktop.org/patch/msgid/20181029183453.28541-1-ville.syrjala@linux.intel.com
09 Sep, 2018
2 commits
-
Just a bit of missing includes and pre declarations.
v2: Compiles now, with drm/drm_util.h extracted.
v3: Rebase
v3: Fix up commit message (Sam Ravnborg)
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-3-daniel.vetter@ffwll.ch -
We have a bunch of neat little macros all over the place which should
move to kernel.h. But some of them died in bikesheds on lkml, and we
need a decent home for them.Start out by moving the for_each_if macro there.
v2: Rename to drm_util.h instead (Dave&Sean)
Cc: Sean Paul
Acked-by: Sean Paul
Cc: Dave Airlie
Acked-by: Dave Airlie
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-1-daniel.vetter@ffwll.ch
31 Aug, 2018
1 commit
-
Adds docs for pixel_blend_mode in drm_plane_state. Fixes the warning
found by kbuild test robot:htmldocs: include/drm/drm_plane.h:189: warning: Function parameter or member 'pixel_blend_mode' not described in 'drm_plane_state'
Cc: Daniel Vetter
Cc: Lowry Li
Reviewed-by: Maarten Lankhorst
Signed-off-by: Sean Paul
Link: https://patchwork.freedesktop.org/patch/msgid/20180831150934.202332-1-sean@poorly.run
25 Aug, 2018
1 commit
-
Pixel blend modes represent the alpha blending equation
selection, describing how the pixels from the current
plane are composited with the background.Adds a pixel_blend_mode to drm_plane_state and a
blend_mode_property to drm_plane, and related support
functions.Defines three blend modes in drm_blend.h.
Changes since v1:
- Moves the blending equation into the DOC comment
- Refines the comments of drm_plane_create_blend_mode_property to not
enumerate the #defines, but instead the string values
- Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha
Changes since v2:
- Refines the comments of drm_plane_create_blend_mode_property:
1) Puts the descriptions (after the ":") on a new line
2) Adds explaining why @supported_modes need PREMUL as default
Changes since v3:
- Refines drm_plane_create_blend_mode_property(). drm_property_add_enum()
can calculate the index itself just fine, so no point in having the
caller pass it in.
- Since the current DRM assumption is that alpha is premultiplied
as default, define DRM_MODE_BLEND_PREMULTI as 0 will be better.
- Refines some comments.
Changes since v4:
- Adds comments in drm_blend.h.
- Removes setting default value in drm_plane_create_blend_mode_property()
as it is already in __drm_atomic_helper_plane_reset().
- Fixes to use state->pixel_blend_mode instead of using
plane->state->pixel_blend_mode in reset function.
- Rebases on drm-misc-next.Reviewed-by: Liviu Dudau
Signed-off-by: Lowry Li
Signed-off-by: Ayan Kumar Halder
Reviewed-by: Sean Paul
Link: https://patchwork.freedesktop.org/patch/245734/
14 Jul, 2018
2 commits
-
And use that opportunity to polish the kernel doc all around:
- Beef up some of the documentation.
- Intro text for drm_plane and better links
- Fix all the hyperlinks!v2: Fix linebreaks.
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20180709084016.23750-10-daniel.vetter@ffwll.ch -
For consistency and to encourage more detailed documentation. While
doing this also beefed up a few of the comments, linking at least to
the setup function. Plus fixed all the hyperlinks.Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20180709084016.23750-9-daniel.vetter@ffwll.ch
02 Jul, 2018
1 commit
-
Add drm_plane_mask() which returns the 1<<<
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-1-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi
18 Jun, 2018
1 commit
-
This patch add checks for atomic_[duplicate/destroy]_state of
drm_[connector/crtc/plane]_funcs for atomic drivers in the relevant
drm_*_init functions since these callback are mandatory for atomic drivers.Update the kerneldoc comments for those callbacks.
Signed-off-by: Haneen Mohammed
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20180525012555.GA8448@haneen-vb
01 Jun, 2018
1 commit
-
For parameterized modifiers (Broadcom's SAND and UIF), we need to
allow the parameter fields to be filled in, while exposing only the
variant of the modifier with the parameter unfilled in the internal
arrays and the format blob.Signed-off-by: Eric Anholt
Cc: Ville Syrjälä
Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-1-eric@anholt.net
Reviewed-by: Ville Syrjälä
24 Apr, 2018
1 commit
-
Note that a pile of drivers don't seem to take implicit fencing into
account, or at least don't call drm_atoimc_set_fence_for_plane().
Cc'ing relevant people, or at least some. Some drivers also look like
they don't disable implicit fencing (e.g. amdgpu) because the explicit
fences and implicit fences are handled by entirely independent code
paths.I also wonder whether we shouldn't just make the recommended helpers
the default ones, since a lot of drivers don't bother to handle the
implicit fences at all it seems. The helpers won't blow up even for
non-GEM drivers or GEM drivers which don't fill out the gem bo
pointers in struct drm_framebuffer.v2: Comments from Eric.
Cc: Gerd Hoffmann
Cc: Alex Deucher
Cc: Harry Wentland
Cc: Sinclair Yeh
Cc: Thomas Hellstrom
Cc: Gustavo Padovan
Cc: Maarten Lankhorst
Cc: Sean Paul
Reviewed-by: Eric Anholt
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-7-daniel.vetter@ffwll.ch
17 Apr, 2018
1 commit
-
Some drivers duplicate the logic to create a property to store a per-plane
alpha.This is especially useful if we ever want to support extra protocols for
Wayland like:
https://lists.freedesktop.org/archives/wayland-devel/2017-August/034741.htmlLet's create a helper in order to move that to the core.
Acked-by: Maarten Lankhorst
Acked-by: Sean Paul
Reviewed-by: Boris Brezillon
Reviewed-by: Eric Anholt
Reviewed-by: Laurent Pinchart
Reviewed-by: Paul Kocialkowski
Signed-off-by: Maxime Ripard
Link: https://patchwork.freedesktop.org/patch/msgid/6e1ce0db78fcfc407e94913c64819e65109d034d.1523432341.git-series.maxime.ripard@bootlin.com
28 Mar, 2018
1 commit
-
Instead of drivers duplicating the drm_atomic_helper_check() code to be
able to normalize the zpos they can use the normalize_zpos flag to let the
drm core to do it.Signed-off-by: Peter Ujfalusi
Signed-off-by: Tomi Valkeinen
Link: https://patchwork.freedesktop.org/patch/msgid/20180321102029.15248-2-peter.ujfalusi@ti.com
02 Mar, 2018
1 commit
-
Add a standard optional properties to support different non RGB color
encodings in DRM planes. COLOR_ENCODING select the supported non RGB
color encoding, for instance ITU-R BT.709 YCbCr. COLOR_RANGE selects
the value ranges within the selected color encoding. The properties
are stored to drm_plane object to allow different set of supported
encoding for different planes on the device.v2: Add/fix kerneldocs, verify bitmasks (danvet)
Cc: Harry Wentland
Cc: Daniel Vetter
Cc: Daniel Stone
Cc: Russell King - ARM Linux
Cc: Ilia Mirkin
Cc: Hans Verkuil
Cc: Uma Shankar
Cc: Shashank Sharma
Reviewed-by: Ville Syrjälä
Signed-off-by: Jyri Sarha
[vsyrjala v2: Add/fix kerneldocs, verify bitmasks]
Signed-off-by: Ville Syrjälä
Link: https://patchwork.freedesktop.org/patch/msgid/20180219202823.10508-1-ville.syrjala@linux.intel.com
Acked-by: Harry Wentland
Reviewed-by: Daniel Vetter
21 Nov, 2017
1 commit
-
Bake in the conflict between the drm_print.h extraction and the
addition of DRM_DEBUG_LEASES since we lost it a few too many times.Also fix a new use of drm_plane_helper_check_state in msm to follow
Ville's conversion incommit a01cb8ba3f6282934cff65e89ab36b18b14cbe27
Author: Ville Syrjälä
Date: Wed Nov 1 22:16:19 2017 +0200drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c
Acked-by: Ville Syrjälä
Signed-off-by: Daniel Vetter
15 Nov, 2017
1 commit
-
Add the missing kerneldoc for modifiers and modifier_count.
Cc: Ben Widawsky
Cc: Daniel Vetter
Suggested-by: Daniel Vetter
Signed-off-by: Ville Syrjälä
Link: https://patchwork.freedesktop.org/patch/msgid/20171114191021.15591-3-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher
10 Nov, 2017
1 commit
-
The lease updates missed a few bits of docs, fixed up
the wrong name on the property lookup fn as well.Reviewed-by: Daniel Vetter
Signed-off-by: Dave Airlie
09 Nov, 2017
1 commit
-
Point at the equivalent atomic state and explain that atomic drivers
shouldn't really depend upon legacy state.Motivated by questions from Manasi about how this all is supposed to
work.Cc: Manasi Navare
Reviewed-by: Manasi Navare
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20171108203007.12274-1-daniel.vetter@ffwll.ch
12 Oct, 2017
1 commit
-
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.v2: Also fix up vboxvideo driver in staging
[airlied: merging early as this is an API change]
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
Signed-off-by: Dave Airlie
08 Sep, 2017
3 commits
-
Now that the last users have been converted, we can finally get rid of
for_each_obj_in_state, we have better macros to replace them with.Signed-off-by: Maarten Lankhorst
Cc: Daniel Vetter
Cc: Jani Nikula
Cc: Sean Paul
Cc: David Airlie
Link: https://patchwork.freedesktop.org/patch/msgid/20170719143920.25685-8-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter -
By always keeping track of the last commit in plane_state, we know
whether there is an active update on the plane or not. With that
information we can reject the fast update, and force the slowpath
to be used as was originally intended.We cannot use plane_state->crtc->state here, because this only mentions
the most recent commit for the crtc, but not the planes that were part
of it. We specifically care about what the last commit involving this
plane is, which can only be tracked with a pointer in the plane state.Changes since v1:
- Clean up the whole function here, instead of partially earlier.
- Add mention in the commit message why we need commit in plane_state.
- Swap plane->state in intel_legacy_cursor_update, instead of
reassigning all variables. With this commit We know that the cursor
is not part of any active commits so this hack can be removed.Cc: Gustavo Padovan
Signed-off-by: Maarten Lankhorst
Reviewed-by: Gustavo Padovan
Reviewed-by: Daniel Vetter #v1
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-7-maarten.lankhorst@linux.intel.com
[mlankhorst: Amend commit for merge conflicts with drm-intel] -
Currently we neatly track the crtc state, but forget to look at
plane/connector state.When doing a nonblocking modeset, immediately followed by a setprop
before the modeset completes, the setprop will see the modesets new
state as the old state and free it.This has to be solved by waiting for hw_done on the connector, even
if it's not assigned to a crtc. When a connector is unbound we take
the last crtc commit, and when it stays unbound we create a new
fake crtc commit for that gets signaled on hw_done for all the
planes/connectors.We wait for it the same way as we do for crtc's, which will make
sure we never run into a use-after-free situation.Changes since v1:
- Only create a single disable commit. (danvet)
- Fix leak in intel_legacy_cursor_update.
Changes since v2:
- Make reference counting in drm_atomic_helper_setup_commit
more obvious. (pinchartl)
- Call cleanup_done for fake commit. (danvet)
- Add comments to drm_atomic_helper_setup_commit. (danvet, pinchartl)
- Add comment to drm_atomic_helper_swap_state. (pinchartl)Signed-off-by: Maarten Lankhorst
Testcase: kms_atomic_transition.plane-use-after-nonblocking-unbind*
Cc: Laurent Pinchart
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-6-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter
08 Aug, 2017
1 commit
-
The reason behind the original indirection through the helper
functions was to allow existing drivers to overwrite how they handle
properties. For example when a vendor-specific userspace had
expectations that didn't match atomic. That seemed likely, since
atomic is standardizing a _lot_ more of the behaviour of a kms driver.But 20 drivers later there's no such need at all. Worse, this forces
all drivers to hook up the default behaviour, breaking userspace if
they forget to do that. And it forces us to export a bunch of core
function just for those helpers.And finally, these helpers are the last places using
drm_atomic_legacy_backoff() and the implicit acquire_ctx.This patch here just implements the new behaviour and updates the
docs. Follow-up patches will garbage-collect all the dead code.v2: Fixup docs even better!
v3: Make it actually work ...
v4: Drop the uses_atomic_modeset() checks from the previous patch
again, since they're now moved up in the callchain.Cc: Maarten Lankhorst
Reviewed-by: Archit Taneja (v3)
Reviewed-by: Maarten Lankhorst
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20170725120204.2107-1-daniel.vetter@ffwll.ch
02 Aug, 2017
1 commit
-
This is the plumbing for supporting fb modifiers on planes. Modifiers
have already been introduced to some extent, but this series will extend
this to allow querying modifiers per plane. Based on this, the client to
enable optimal modifications for framebuffers.This patch simply allows the DRM drivers to initialize their list of
supported modifiers upon initializing the plane.v2: A minor addition from Daniel
v3:
* Updated commit message
* s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
* Remove some excess newlines (Liviu)
* Update comment for > 64 modifiers (Liviu)v4: Minor comment adjustments (Liviu)
v5: Some new platforms added due to rebase
v6: Add some missed plane inits (or maybe they're new - who knows at
this point) (Daniel)Signed-off-by: Ben Widawsky
Reviewed-by: Daniel Stone (v2)
Reviewed-by: Liviu Dudau
Signed-off-by: Daniel Stone
29 Mar, 2017
3 commits
-
Nouveau had a few direct calls to ->disable_plane, I replaced those
with drm_plane_force_disable. Same story for shmob.Otherwise no code changes.
Cc: Ben Skeggs
Cc: Russell King
Cc: Laurent Pinchart
Reviewed-by: Harry Wentland
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-5-daniel.vetter@ffwll.ch -
Just rolling it out, no code change here.
Cc: Ben Skeggs
Cc: Russell King
Cc: Rob Clark
Cc: Laurent Pinchart
Cc: Eric Anholt
Reviewed-by: Harry Wentland
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-3-daniel.vetter@ffwll.ch -
The rules are getting real hard, better to dump my brain into text a
bit. This is by far not complete, but I think I reasonable start at
least.Some of the older kms structures would need a full doc review anyway
...Cc: Harry Wentland
Reviewed-by: Harry Wentland
Reviewed-by: Alex Deucher
Cc: Maarten Lankhorst
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170328155349.5972-2-daniel.vetter@ffwll.ch
24 Mar, 2017
1 commit
-
It's the default storage class for functions, entirely redundant. And
a lot of these headers are a bit inconsistent due to organically
grown.Reviewed-by: Gabriel Krisman Bertazi
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-2-daniel.vetter@ffwll.ch
26 Jan, 2017
1 commit
-
There's no late_unregister. While at it switch to the new canonical
reference style.Cc: Chris Wilson
Acked-by: Chris Wilson
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-14-daniel.vetter@ffwll.ch
25 Jan, 2017
1 commit
-
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).Also some minor drive-by polish where it makes sense, I read a lot
of docs ...v2: Review from Eric.
Cc: Jani Nikula
Cc: Chris Wilson
Reviewed-by: Eric Engestrom
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-4-daniel.vetter@ffwll.ch
30 Dec, 2016
1 commit
-
sed -e 's/\( \* .*\)struct &\([_a-z]*\)/\1\&struct \2/' -i
Originally I wasnt a friend of this style because I thought a
line-break between the "&struct" and "foo" part would break it. But a
quick test shows that " * &struct \n * foo\n" works pefectly well with
current kernel-doc. So time to mass-apply these changes!Cc: Jani Nikula
Cc: Chris Wilson
Reviewed-by: David Herrmann
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-6-git-send-email-daniel.vetter@ffwll.ch
08 Dec, 2016
1 commit
-
drm_universal_plane_init() and drm_plane_init() take "unsigned long
possible_crtcs" parameter, but then stuff it into uint32_t. Change the
parameter to uint32_t.Signed-off-by: Tomi Valkeinen
Cc: Ville Syrjälä
Reviewed-by: Laurent Pinchart
Reviewed-by: Ville Syrjälä
11 Nov, 2016
1 commit
-
- better atomic state debugging from Rob
- fence prep from gustavo
- sumits flushed out his backlog of pending dma-buf/fence patches from
various people
- drm_mm leak debugging plus trying to appease Kconfig (Chris)
- a few misc things all over* tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel: (35 commits)
drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT
drm/i915: Restrict DRM_DEBUG_MM automatic selection
drm: Restrict stackdepot usage to builtin drm.ko
drm/msm: module param to dump state on error irq
drm/msm/mdp5: add atomic_print_state support
drm/atomic: add debugfs file to dump out atomic state
drm/atomic: add new drm_debug bit to dump atomic state
drm: add helpers to go from plane state to drm_rect
drm: add helper for printing to log or seq_file
drm: helper macros to print composite types
reservation: revert "wait only with non-zero timeout specified (v3)" v2
drm/ttm: fix ttm_bo_wait
dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)
dma-buf/fence: make timeout handling in fence_default_wait consistent (v2)
drm/amdgpu: add the interface of waiting multiple fences (v4)
dma-buf: return index of the first signaled fence (v2)
MAINTAINERS: update Sync File Framework files
dma-buf/sw_sync: put fence reference from the fence creation
dma-buf/sw_sync: mark sync_timeline_create() static
drm: Add stackdepot include for DRM_DEBUG_MM
...
09 Nov, 2016
2 commits
-
The contents of drm_{plane,crtc,connector}_state is dumped before
commit. If a driver extends any of the state structs, it can implement
the corresponding funcs->atomic_print_state() to add it's own driver
specific state.Signed-off-by: Rob Clark
[seanpaul resolved conflict in drm_plane.h]
Signed-off-by: Sean Paul -
Signed-off-by: Rob Clark
Reviewed-by: Sean Paul
[seanpaul resolved conflict in drm_plane.h]
Signed-off-by: Sean Paul
08 Nov, 2016
2 commits
-
Some of the members of struct drm_plane had extra comments so for these
add inline kernel comment to consolidate all documentation in one place.Signed-off-by: Gustavo Padovan
[danvet: Bikeshed a bit more to have real paragraphs with real
sentences.]
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-4-git-send-email-gustavo@padovan.org -
This new function should be used by drivers when setting a implicit
fence for the plane. It abstracts the fact that the user might have
chosen explicit fencing instead.Signed-off-by: Gustavo Padovan
Reviewed-by: Daniel Vetter
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-1-git-send-email-gustavo@padovan.org