drm/atomic-helper: Make zpos property kerneldoc less misleading
Subsystems (2)
PATCH 1/1 drm/atomic-helper: Make zpos property kerneldoc less misleading
From: Thierry Reding <[email protected]>
kerneldoc for drm_plane_create_zpos_property() says that the DRM core will automatically calculate the normalized zpos values, but it doesn't actually do that. Instead, drivers are supposed to explicitly call the drm_atomic_normalize_zpos() function. Change the kerneldoc comment to reflect that.
--- drivers/gpu/drm/drm_blend.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_blend.c +5 -3
@@ -214,9 +214,11 @@ EXPORT_SYMBOL(drm_rotation_simplify);* This function initializes generic mutable zpos property and enables support * for it in drm core. Drivers can then attach this property to planes to enable * support for configurable planes arrangement during blending operation. -* Once mutable zpos property has been enabled, the DRM core will automatically -* calculate &drm_plane_state.normalized_zpos values. Usually min should be set -* to 0 and max to maximal number of planes for given crtc - 1. +* Drivers that attach a mutable zpos property to any plane should call the +* drm_atomic_normalize_zpos() helper during their implementation of +* &drm_mode_config_funcs.atomic_check(), which will update the normalized zpos +* values and store them in &drm_plane_state.normalized_zpos. Usually min +* should be set to 0 and max to maximal number of planes for given crtc - 1. * * If zpos of some planes cannot be changed (like fixed background or * cursor/topmost planes), driver should adjust min/max values and assign those
Signature · 6 lines
2.15.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 19 lines · Thierry Reding
From: Thierry Reding <[email protected]>
kerneldoc for
drm_plane_create_zpos_property()says that the DRM core will automatically calculate the normalized zpos values, but it doesn't actually do that. Instead, drivers are supposed to explicitly call thedrm_atomic_normalize_zpos()function. Change the kerneldoc comment to reflect that.Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/drm_blend.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/gpu/drm/drm_blend.c +0
-0@@ -214,9 +214,11 @@ EXPORT_SYMBOL(drm_rotation_simplify);* This function initializes generic mutable zpos property and enables support
drivers/gpu/drm/drm_blend.c EXPORT_SYMBOL(drm_rotation_simplify); · line 221
Quoted 10 lines
drivers/gpu/drm/drm_blend.c +5
-3* for it in drm core. Drivers can then attach this property to planes to enable * support for configurable planes arrangement during blending operation. -* Once mutable zpos property has been enabled, the DRM core will automatically -* calculate &drm_plane_state.normalized_zpos values. Usually min should be set -* to 0 and max to maximal number of planes for given crtc - 1. +* Drivers that attach a mutable zpos property to any plane should call the +* drm_atomic_normalize_zpos() helper during their implementation of +* &drm_mode_config_funcs.atomic_check(), which will update the normalized zpos +* values and store them in &drm_plane_state.normalized_zpos. Usually min +* should be set to 0 and max to maximal number of planes for given crtc - 1.
Maybe reference the commit that changed the code and forgot to update the kerneldoc in the commit message.
-Daniel
Quoted 6 lines
drivers/gpu/drm/drm_blend.c +0
-0* * If zpos of some planes cannot be changed (like fixed background or * cursor/topmost planes), driver should adjust min/max values and assign those Signature · 1 line
2.15.0
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 drm/atomic-helper: Make zpos property kerneldoc less misleading
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
kerneldoc for drm_plane_create_zpos_property() says that the DRM core will automatically calculate the normalized zpos values, but it doesn't actually do that anymore since commit 38d868e41c4b ("drm: Don't force all planes to be added to the state due to zpos"). Instead, drivers are supposed to explicitly call the drm_atomic_normalize_zpos() function. Change the kerneldoc comment to reflect that.
v2: reference the commit that introduced the kerneldoc unclarity
--- drivers/gpu/drm/drm_blend.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_blend.c +5 -3
@@ -214,9 +214,11 @@ EXPORT_SYMBOL(drm_rotation_simplify);* This function initializes generic mutable zpos property and enables support * for it in drm core. Drivers can then attach this property to planes to enable * support for configurable planes arrangement during blending operation. -* Once mutable zpos property has been enabled, the DRM core will automatically -* calculate &drm_plane_state.normalized_zpos values. Usually min should be set -* to 0 and max to maximal number of planes for given crtc - 1. +* Drivers that attach a mutable zpos property to any plane should call the +* drm_atomic_normalize_zpos() helper during their implementation of +* &drm_mode_config_funcs.atomic_check(), which will update the normalized zpos +* values and store them in &drm_plane_state.normalized_zpos. Usually min +* should be set to 0 and max to maximal number of planes for given crtc - 1. * * If zpos of some planes cannot be changed (like fixed background or * cursor/topmost planes), driver should adjust min/max values and assign those
Signature · 6 lines
2.15.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel