drm/plane: remove drm_helper_get_plane_damage_clips
Subsystems (3)
PATCH 1/3 drm/plane: remove drm_helper_get_plane_damage_clips
It's not used. Drivers should instead use the helpers anyway.
Currently both vbox and i915 hand-roll this and it's not the greatest. vbox looks buggy, and i915 does a bit much that helpers would take care of I think.
Also improve the kerneldocs while we're at it.
--- drivers/gpu/drm/drm_damage_helper.c | 2 +- include/drm/drm_damage_helper.h | 17 ----------------- include/drm/drm_plane.h | 10 +++++++--- include/drm/drm_rect.h | 3 +++ 4 files changed, 11 insertions(+), 21 deletions(-)
drivers/gpu/drm/drm_damage_helper.c +1 -1
@@ -282,7 +282,7 @@ drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter,if (!state || !state->crtc || !state->fb || !state->visible)return ; - iter->clips =drm_helper_get_plane_damage_clips (state); + iter->clips = (struct drm_rect *)drm_plane_get_damage_clips (state); iter->num_clips =drm_plane_get_damage_clips_count (state);/* Round down for x1/y1 and round up for x2/y2 to catch all pixels */
include/drm/drm_damage_helper.h +0 -17
@@ -82,21 +82,4 @@ bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state,struct drm_plane_state *state, struct drm_rect *rect); -/** -* drm_helper_get_plane_damage_clips - Returns damage clips in &drm_rect. -* @state: Plane state. -* -* Returns plane damage rectangles in internal &drm_rect. Currently &drm_rect -* can be obtained by simply typecasting &drm_mode_rect. This is because both -* are signed 32 and during drm_atomic_check_only() it is verified that damage -* clips are inside fb. -* -* Return: Clips in plane fb_damage_clips blob property. -*/ -static inline struct drm_rect * -drm_helper_get_plane_damage_clips (const struct drm_plane_state *state) -{ -return (struct drm_rect *)drm_plane_get_damage_clips (state); -} -#endif
include/drm/drm_plane.h +7 -3
@@ -186,6 +186,9 @@ struct drm_plane_state {* since last plane update) as an array of &drm_mode_rect in framebuffer * coodinates of the attached framebuffer. Note that unlike plane src, * damage clips are not in 16.16 fixed point. +* +* See drm_plane_get_damage_clips() and +* drm_plane_get_damage_clips_count() for accessing these. */ struct drm_property_blob *fb_damage_clips;
@@ -914,9 +917,10 @@ drm_plane_get_damage_clips_count(const struct drm_plane_state *state)* drm_plane_get_damage_clips - Returns damage clips. * @state: Plane state. * -* Note that this function returns uapi type &drm_mode_rect. Drivers might -* instead be interested in internal &drm_rect which can be obtained by calling -* drm_helper_get_plane_damage_clips(). +* Note that this function returns uapi type &drm_mode_rect. Drivers might want +* to use the helper functions drm_atomic_helper_damage_iter_init() and +* drm_atomic_helper_damage_iter_next() or drm_atomic_helper_damage_merged() if +* the driver can only handle a single damage region at most. * * Return: Damage clips in plane fb_damage_clips blob property. */
include/drm/drm_rect.h +3 -0
@@ -39,6 +39,9 @@* @x2: horizontal ending coordinate (exclusive) * @y1: vertical starting coordinate (inclusive) * @y2: vertical ending coordinate (exclusive) +* +* Note that this must match the layout of struct drm_mode_rect or the damage +* helpers like drm_atomic_helper_damage_iter_init() break. */ struct drm_rect {int x1, y1, x2, y2;
Signature · 1 line
2.32.0
PATCH 2/3 drm/plane: check that fb_damage is set up when used
There's two stages of manual upload/invalidate displays:
- just handling dirtyfb and uploading the entire fb all the time
- looking at damage clips
In the latter case we support it through fbdev emulation (with fb_defio), atomic property, and with the dirtfy clip rects.
Make sure at least the atomic property is set up as the main official interface for this. Ideally we'd also check that drm_atomic_helper_dirtyfb() is used and that fbdev defio is set up, but that's quite a bit harder to do. Ideas very much welcome.
From a cursor audit drivers seem to be getting this right mostly, but better to make sure. At least no one is bypassing the accessor function.
--- drivers/gpu/drm/drm_plane.c | 42 +++++++++++++++++++++++++++++++++++++ include/drm/drm_plane.h | 36 ++++--------------------------- 2 files changed, 46 insertions(+), 32 deletions(-)
drivers/gpu/drm/drm_plane.c +42 -0
@@ -1397,6 +1397,48 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,return ret; } +/** +* drm_plane_get_damage_clips_count - Returns damage clips count. +* @state: Plane state. +* +* Simple helper to get the number of &drm_mode_rect clips set by user-space +* during plane update. +* +* Return: Number of clips in plane fb_damage_clips blob property. +*/ +unsigned int +drm_plane_get_damage_clips_count (const struct drm_plane_state *state) +{ +return (state && state->fb_damage_clips) ? + state->fb_damage_clips->length/sizeof (struct drm_mode_rect ) :0 ; +} +EXPORT_SYMBOL (drm_plane_get_damage_clips_count); + +/** +* drm_plane_get_damage_clips - Returns damage clips. +* @state: Plane state. +* +* Note that this function returns uapi type &drm_mode_rect. Drivers might want +* to use the helper functions drm_atomic_helper_damage_iter_init() and +* drm_atomic_helper_damage_iter_next() or drm_atomic_helper_damage_merged() if +* the driver can only handle a single damage region at most. +* +* Return: Damage clips in plane fb_damage_clips blob property. +*/ +struct drm_mode_rect * +drm_plane_get_damage_clips (const struct drm_plane_state *state) +{ +struct drm_mode_config *config = &state->plane->dev->mode_config; + +/* check that drm_plane_enable_fb_damage_clips() was called */ +WARN_ON_ONCE (!drm_mode_obj_find_prop_id (&state->plane->base, + config->prop_fb_damage_clips->base.id)); + +return (struct drm_mode_rect *)((state && state->fb_damage_clips) ? + state->fb_damage_clips->data :NULL ); +} +EXPORT_SYMBOL (drm_plane_get_damage_clips); +struct drm_property *drm_create_scaling_filter_prop (struct drm_device *dev,unsigned int supported_filters)
include/drm/drm_plane.h +4 -32
@@ -897,39 +897,11 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,bool drm_any_plane_has_format (struct drm_device *dev,u32 format,u64 modifier); -/** -* drm_plane_get_damage_clips_count - Returns damage clips count. -* @state: Plane state. -* -* Simple helper to get the number of &drm_mode_rect clips set by user-space -* during plane update. -* -* Return: Number of clips in plane fb_damage_clips blob property. -*/ -static inline unsigned int -drm_plane_get_damage_clips_count (const struct drm_plane_state *state) -{ -return (state && state->fb_damage_clips) ? - state->fb_damage_clips->length/sizeof (struct drm_mode_rect ) :0 ; -} +unsigned int +drm_plane_get_damage_clips_count (const struct drm_plane_state *state); -/** -* drm_plane_get_damage_clips - Returns damage clips. -* @state: Plane state. -* -* Note that this function returns uapi type &drm_mode_rect. Drivers might want -* to use the helper functions drm_atomic_helper_damage_iter_init() and -* drm_atomic_helper_damage_iter_next() or drm_atomic_helper_damage_merged() if -* the driver can only handle a single damage region at most. -* -* Return: Damage clips in plane fb_damage_clips blob property. -*/ -static inline struct drm_mode_rect * -drm_plane_get_damage_clips (const struct drm_plane_state *state) -{ -return (struct drm_mode_rect *)((state && state->fb_damage_clips) ? - state->fb_damage_clips->data :NULL ); -} +struct drm_mode_rect * +drm_plane_get_damage_clips (const struct drm_plane_state *state);int drm_plane_create_scaling_filter_property (struct drm_plane *plane,unsigned int supported_filters);
Signature · 1 line
2.32.0
Re: [PATCH 2/3] drm/plane: check that fb_damage is set up when used
Quoted 65 lines · Daniel Vetter
There's two stages of manual upload/invalidate displays:
- just handling dirtyfb and uploading the entire fb all the time
- looking at damage clipsIn the latter case we support it through fbdev emulation (with
fb_defio), atomic property, and with the dirtfy clip rects.Make sure at least the atomic property is set up as the main official interface for this. Ideally we'd also check that
drm_atomic_helper_dirtyfb()is used and that fbdev defio is set up, but that's quite a bit harder to do. Ideas very much welcome.From a cursor audit drivers seem to be getting this right mostly, but better to make sure. At least no one is bypassing the accessor function.
Cc Ville Syrjälä <[email protected]>Cc Gwan-gyeong Mun <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Hans de Goede <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_plane.c | 42 +++++++++++++++++++++++++++++++++++++ include/drm/drm_plane.h | 36 ++++--------------------------- 2 files changed, 46 insertions(+), 32 deletions(-)drivers/gpu/drm/drm_plane.c +26
-0@@ -1397,6 +1397,48 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,return ret; } +/** +* drm_plane_get_damage_clips_count - Returns damage clips count. +* @state: Plane state. +* +* Simple helper to get the number of &drm_mode_rect clips set by user-space +* during plane update. +* +* Return: Number of clips in plane fb_damage_clips blob property. +*/ +unsigned int +drm_plane_get_damage_clips_count (const struct drm_plane_state *state) +{ +return (state && state->fb_damage_clips) ? + state->fb_damage_clips->length/sizeof (struct drm_mode_rect ) :0 ; +} +EXPORT_SYMBOL (drm_plane_get_damage_clips_count); + +/** +* drm_plane_get_damage_clips - Returns damage clips. +* @state: Plane state. +* +* Note that this function returns uapi type &drm_mode_rect. Drivers might want +* to use the helper functions drm_atomic_helper_damage_iter_init() and +* drm_atomic_helper_damage_iter_next() or drm_atomic_helper_damage_merged() if +* the driver can only handle a single damage region at most. +*
drivers/gpu/drm/drm_plane.c int drm_mode_page_flip_ioctl(struct drm_device *dev, · line 1435
Quoted 10 lines
drivers/gpu/drm/drm_plane.c +10
-0+* Return: Damage clips in plane fb_damage_clips blob property. +*/ +struct drm_mode_rect * +drm_plane_get_damage_clips (const struct drm_plane_state *state) +{ +struct drm_mode_config *config = &state->plane->dev->mode_config; + +/* check that drm_plane_enable_fb_damage_clips() was called */ +WARN_ON_ONCE (!drm_mode_obj_find_prop_id (&state->plane->base, + config->prop_fb_damage_clips->base.id));
Changing to drm_warn_once()
Quoted 47 lines
drivers/gpu/drm/drm_plane.c +6
-0+ +return (struct drm_mode_rect *)((state && state->fb_damage_clips) ? + state->fb_damage_clips->data :NULL ); +} +EXPORT_SYMBOL (drm_plane_get_damage_clips); +struct drm_property *drm_create_scaling_filter_prop (struct drm_device *dev,unsigned int supported_filters)include/drm/drm_plane.h +2
-27@@ -897,39 +897,11 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,bool drm_any_plane_has_format (struct drm_device *dev,u32 format,u64 modifier); -/** -* drm_plane_get_damage_clips_count - Returns damage clips count. -* @state: Plane state. -* -* Simple helper to get the number of &drm_mode_rect clips set by user-space -* during plane update. -* -* Return: Number of clips in plane fb_damage_clips blob property. -*/ -static inline unsigned int -drm_plane_get_damage_clips_count (const struct drm_plane_state *state) -{ -return (state && state->fb_damage_clips) ? - state->fb_damage_clips->length/sizeof (struct drm_mode_rect ) :0 ; -} +unsigned int +drm_plane_get_damage_clips_count (const struct drm_plane_state *state); -/** -* drm_plane_get_damage_clips - Returns damage clips. -* @state: Plane state. -* -* Note that this function returns uapi type &drm_mode_rect. Drivers might want -* to use the helper functions drm_atomic_helper_damage_iter_init() and -* drm_atomic_helper_damage_iter_next() or drm_atomic_helper_damage_merged() if -* the driver can only handle a single damage region at most. -* -* Return: Damage clips in plane fb_damage_clips blob property. -*/ -static inline struct drm_mode_rect *
include/drm/drm_plane.h static inline struct drm_plane *drm_plane_find(struct drm_device *dev, · line 907
Quoted 10 lines
include/drm/drm_plane.h +2
-5-drm_plane_get_damage_clips(const struct drm_plane_state *state) -{ -return (struct drm_mode_rect *)((state && state->fb_damage_clips) ? - state->fb_damage_clips->data :NULL ); -} +struct drm_mode_rect * +drm_plane_get_damage_clips (const struct drm_plane_state *state);int drm_plane_create_scaling_filter_property (struct drm_plane *plane,unsigned int supported_filters);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/plane: Move drm_plane_enable_fb_damage_clips into core
In reply to Daniel VetterWe're trying to have a fairly strict split between core functionality that defines the uapi, including the docs, and the helper functions to implement it.
Move drm_plane_enable_fb_damage_clips and associated kerneldoc into drm_plane from drm_damage_helper.c to fix this.
--- Documentation/gpu/drm-kms.rst | 4 +-- drivers/gpu/drm/drm_damage_helper.c | 54 ----------------------------- drivers/gpu/drm/drm_plane.c | 54 +++++++++++++++++++++++++++++ include/drm/drm_damage_helper.h | 1 - include/drm/drm_plane.h | 3 +- 5 files changed, 58 insertions(+), 58 deletions(-)
Documentation/gpu/drm-kms.rst +2 -2
@@ -508,8 +508,8 @@ Plane Composition Properties Damage Tracking Properties -------------------------- -.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c - :doc: overview +.. kernel-doc:: drivers/gpu/drm/drm_plane.c + :doc: damage tracking Color Management Properties ---------------------------
drivers/gpu/drm/drm_damage_helper.c +0 -54
66 lines not on this page · raw message
drivers/gpu/drm/drm_plane.c +54 -0
60 lines not on this page · raw message
include/drm/drm_damage_helper.h +0 -1
@@ -64,7 +64,6 @@ struct drm_atomic_helper_damage_iter {bool full_update; }; -void drm_plane_enable_fb_damage_clips (struct drm_plane *plane);void drm_atomic_helper_check_plane_damage (struct drm_atomic_state *state,struct drm_plane_state *plane_state); int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb,
include/drm/drm_plane.h +2 -1
@@ -897,9 +897,10 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,bool drm_any_plane_has_format (struct drm_device *dev,u32 format,u64 modifier); + +void drm_plane_enable_fb_damage_clips (struct drm_plane *plane);unsigned int drm_plane_get_damage_clips_count (const struct drm_plane_state *state); -struct drm_mode_rect *drm_plane_get_damage_clips (const struct drm_plane_state *state);
Signature · 6 lines
2.32.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/plane: Move drm_plane_enable_fb_damage_clips into core
Quoted 6 lines · Daniel Vetter
We're trying to have a fairly strict split between core functionality that defines the uapi, including the docs, and the helper functions to implement it.
Move
drm_plane_enable_fb_damage_clipsand associated kerneldoc intodrm_planefromdrm_damage_helper.cto fix this.
Quoted 189 lines
Cc Ville Syrjälä <[email protected]>Cc Gwan-gyeong Mun <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Hans de Goede <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- Documentation/gpu/drm-kms.rst | 4 +-- drivers/gpu/drm/drm_damage_helper.c | 54 ----------------------------- drivers/gpu/drm/drm_plane.c | 54 +++++++++++++++++++++++++++++ include/drm/drm_damage_helper.h | 1 - include/drm/drm_plane.h | 3 +- 5 files changed, 58 insertions(+), 58 deletions(-)Documentation/gpu/drm-kms.rst +2
-2@@ -508,8 +508,8 @@ Plane Composition Properties Damage Tracking Properties -------------------------- -.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c - :doc: overview +.. kernel-doc:: drivers/gpu/drm/drm_plane.c + :doc: damage tracking Color Management Properties ---------------------------drivers/gpu/drm/drm_damage_helper.c +0
-54@@ -34,44 +34,6 @@#include <drm/drm_damage_helper.h> #include <drm/drm_device.h> -/** -* DOC: overview -* -* FB_DAMAGE_CLIPS is an optional plane property which provides a means to -* specify a list of damage rectangles on a plane in framebuffer coordinates of -* the framebuffer attached to the plane. In current context damage is the area -* of plane framebuffer that has changed since last plane update (also called -* page-flip), irrespective of whether currently attached framebuffer is same as -* framebuffer attached during last plane update or not. -* -* FB_DAMAGE_CLIPS is a hint to kernel which could be helpful for some drivers -* to optimize internally especially for virtual devices where each framebuffer -* change needs to be transmitted over network, usb, etc. -* -* Since FB_DAMAGE_CLIPS is a hint so it is an optional property. User-space can -* ignore damage clips property and in that case driver will do a full plane -* update. In case damage clips are provided then it is guaranteed that the area -* inside damage clips will be updated to plane. For efficiency driver can do -* full update or can update more than specified in damage clips. Since driver -* is free to read more, user-space must always render the entire visible -* framebuffer. Otherwise there can be corruptions. Also, if a user-space -* provides damage clips which doesn't encompass the actual damage to -* framebuffer (since last plane update) can result in incorrect rendering. -* -* FB_DAMAGE_CLIPS is a blob property with the layout of blob data is simply an -* array of &drm_mode_rect. Unlike plane &drm_plane_state.src coordinates, -* damage clips are not in 16.16 fixed point. Similar to plane src in -* framebuffer, damage clips cannot be negative. In damage clip, x1/y1 are -* inclusive and x2/y2 are exclusive. While kernel does not error for overlapped -* damage clips, it is strongly discouraged. -* -* Drivers that are interested in damage interface for plane should enable -* FB_DAMAGE_CLIPS property by calling drm_plane_enable_fb_damage_clips(). -* Drivers implementing damage can use drm_atomic_helper_damage_iter_init() and -* drm_atomic_helper_damage_iter_next() helper iterator function to get damage -* rectangles clipped to &drm_plane_state.src. -*/ -static void convert_clip_rect_to_rect (const struct drm_clip_rect *src,struct drm_mode_rect *dest,uint32_t num_clips,uint32_t src_inc)@@ -87,22 +49,6 @@ static void convert_clip_rect_to_rect(const struct drm_clip_rect *src, } } -/** -* drm_plane_enable_fb_damage_clips - Enables plane fb damage clips property. -* @plane: Plane on which to enable damage clips property. -* -* This function lets driver to enable the damage clips property on a plane. -*/ -void drm_plane_enable_fb_damage_clips (struct drm_plane *plane) -{ -struct drm_device *dev = plane->dev; -struct drm_mode_config *config = &dev->mode_config; - -drm_object_attach_property (&plane->base, config->prop_fb_damage_clips, -0 ); -} -EXPORT_SYMBOL (drm_plane_enable_fb_damage_clips); -/** * drm_atomic_helper_check_plane_damage - Verify plane damage on atomic_check. * @state: The driver state object. drivers/gpu/drm/drm_plane.c +54
-0@@ -1397,6 +1397,60 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,return ret; } +/** +* DOC: damage tracking +* +* FB_DAMAGE_CLIPS is an optional plane property which provides a means to +* specify a list of damage rectangles on a plane in framebuffer coordinates of +* the framebuffer attached to the plane. In current context damage is the area +* of plane framebuffer that has changed since last plane update (also called +* page-flip), irrespective of whether currently attached framebuffer is same as +* framebuffer attached during last plane update or not. +* +* FB_DAMAGE_CLIPS is a hint to kernel which could be helpful for some drivers +* to optimize internally especially for virtual devices where each framebuffer +* change needs to be transmitted over network, usb, etc. +* +* Since FB_DAMAGE_CLIPS is a hint so it is an optional property. User-space can +* ignore damage clips property and in that case driver will do a full plane +* update. In case damage clips are provided then it is guaranteed that the area +* inside damage clips will be updated to plane. For efficiency driver can do +* full update or can update more than specified in damage clips. Since driver +* is free to read more, user-space must always render the entire visible +* framebuffer. Otherwise there can be corruptions. Also, if a user-space +* provides damage clips which doesn't encompass the actual damage to +* framebuffer (since last plane update) can result in incorrect rendering. +* +* FB_DAMAGE_CLIPS is a blob property with the layout of blob data is simply an +* array of &drm_mode_rect. Unlike plane &drm_plane_state.src coordinates, +* damage clips are not in 16.16 fixed point. Similar to plane src in +* framebuffer, damage clips cannot be negative. In damage clip, x1/y1 are +* inclusive and x2/y2 are exclusive. While kernel does not error for overlapped +* damage clips, it is strongly discouraged. +* +* Drivers that are interested in damage interface for plane should enable +* FB_DAMAGE_CLIPS property by calling drm_plane_enable_fb_damage_clips(). +* Drivers implementing damage can use drm_atomic_helper_damage_iter_init() and +* drm_atomic_helper_damage_iter_next() helper iterator function to get damage +* rectangles clipped to &drm_plane_state.src. +*/ + +/** +* drm_plane_enable_fb_damage_clips - Enables plane fb damage clips property. +* @plane: Plane on which to enable damage clips property. +* +* This function lets driver to enable the damage clips property on a plane. +*/ +void drm_plane_enable_fb_damage_clips (struct drm_plane *plane) +{ +struct drm_device *dev = plane->dev; +struct drm_mode_config *config = &dev->mode_config; + +drm_object_attach_property (&plane->base, config->prop_fb_damage_clips, +0 ); +} +EXPORT_SYMBOL (drm_plane_enable_fb_damage_clips); +/** * drm_plane_get_damage_clips_count - Returns damage clips count. * @state: Plane state. include/drm/drm_damage_helper.h +0
-1@@ -64,7 +64,6 @@ struct drm_atomic_helper_damage_iter {bool full_update; }; -void drm_plane_enable_fb_damage_clips (struct drm_plane *plane);void drm_atomic_helper_check_plane_damage (struct drm_atomic_state *state,struct drm_plane_state *plane_state); int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb,include/drm/drm_plane.h +0
-0@@ -897,9 +897,10 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,
include/drm/drm_plane.h static inline struct drm_plane *drm_plane_find(struct drm_device *dev, · line 906
Quoted 10 lines
include/drm/drm_plane.h +2
-1bool drm_any_plane_has_format (struct drm_device *dev,u32 format,u64 modifier); + +void drm_plane_enable_fb_damage_clips (struct drm_plane *plane);unsigned int drm_plane_get_damage_clips_count (const struct drm_plane_state *state); -struct drm_mode_rect *drm_plane_get_damage_clips (const struct drm_plane_state *state);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/plane: remove drm_helper_get_plane_damage_clips
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/plane: remove drm_helper_get_plane_damage_clips
URL : https://patchwork.freedesktop.org/series/92822/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip fc061e34c557 drm/plane: remove drm_helper_get_plane_damage_clips -:108: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: Daniel Vetter <[email protected]>' != 'Signed-off-by: Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 60 lines checked c11741a8ac84 drm/plane: check that fb_damage is set up when used -:57: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #57: FILE: drivers/gpu/drm/drm_plane.c:1413:
+ state->fb_damage_clips->length/sizeof(struct drm_mode_rect) : 0;
^
-:136: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: Daniel Vetter <[email protected]>' != 'Signed-off-by: Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 1 checks, 91 lines checkeda896b164d83b drm/plane: Move drm_plane_enable_fb_damage_clips into core
-:206: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: Daniel Vetter <[email protected]>' != 'Signed-off-by: Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 154 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for series starting with [1/3] drm/plane: remove drm_helper_get_plane_damage_clips
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/plane: remove drm_helper_get_plane_damage_clips
URL : https://patchwork.freedesktop.org/series/92822/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Excess function parameter 'jump_whitelist' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Excess function parameter 'shadow_map' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Excess function parameter 'batch_map' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Function parameter or member 'trampoline' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Excess function parameter 'jump_whitelist' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Excess function parameter 'shadow_map' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1436: warning: Excess function parameter 'batch_map' description in 'intel_engine_cmd_parser'
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/plane: remove drm_helper_get_plane_damage_clips
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/plane: remove drm_helper_get_plane_damage_clips
URL : https://patchwork.freedesktop.org/series/92822/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_10365 -> Patchwork_20663
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_20663 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_20663, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_20663:
### IGT changes ###
#### Possible regressions ####
* igt@kms_force_connector_basic@force-connector-state:
- fi-kbl-7567u: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10365/fi-kbl-7567u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-7567u/igt@[email protected]
- fi-kbl-guc: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10365/fi-kbl-guc/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-guc/igt@[email protected]
* igt@runner@aborted:
- fi-ilk-650: NOTRUN -> [FAIL][5]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-ilk-650/igt@[email protected]
- fi-snb-2520m: NOTRUN -> [FAIL][6]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-snb-2520m/igt@[email protected]
- fi-bdw-5557u: NOTRUN -> [FAIL][7]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-bdw-5557u/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [FAIL][8]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-ivb-3770/igt@[email protected]
- fi-elk-e7500: NOTRUN -> [FAIL][9]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-elk-e7500/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@kms_force_connector_basic@force-connector-state:
- {fi-hsw-gt1}: [PASS][10] -> [DMESG-WARN][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10365/fi-hsw-gt1/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-hsw-gt1/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_20663 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@runner@aborted:
- fi-pnv-d510: NOTRUN -> [FAIL][12] ([i915#2403] / [i915#2505])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-pnv-d510/igt@[email protected]
- fi-kbl-x1275: NOTRUN -> [FAIL][13] ([i915#1569] / [i915#192] / [i915#193] / [i915#194] / [i915#3363])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-x1275/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [FAIL][14] ([i915#1610])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-bsw-kefka/igt@[email protected]
- fi-cfl-8700k: NOTRUN -> [FAIL][15] ([i915#3363] / [k.org#202107] / [k.org#202109])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-cfl-8700k/igt@[email protected]
- fi-cfl-8109u: NOTRUN -> [FAIL][16] ([i915#3363] / [k.org#202107] / [k.org#202109])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-cfl-8109u/igt@[email protected]
- fi-glk-dsi: NOTRUN -> [FAIL][17] ([i915#3363] / [k.org#202321])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-glk-dsi/igt@[email protected]
- fi-kbl-8809g: NOTRUN -> [FAIL][18] ([i915#1569] / [i915#192] / [i915#193] / [i915#194] / [i915#3363])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-8809g/igt@[email protected]
- fi-bwr-2160: NOTRUN -> [FAIL][19] ([i915#2505])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-bwr-2160/igt@[email protected]
- fi-kbl-soraka: NOTRUN -> [FAIL][20] ([i915#1569] / [i915#192] / [i915#193] / [i915#194] / [i915#3363])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-soraka/igt@[email protected]
- fi-hsw-4770: NOTRUN -> [FAIL][21] ([i915#192] / [i915#193] / [i915#194] / [i915#2505])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-hsw-4770/igt@[email protected]
- fi-kbl-7500u: NOTRUN -> [FAIL][22] ([i915#1569] / [i915#192] / [i915#193] / [i915#194] / [i915#3363])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-7500u/igt@[email protected]
- fi-kbl-guc: NOTRUN -> [FAIL][23] ([i915#3363])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-guc/igt@[email protected]
- fi-cml-u2: NOTRUN -> [FAIL][24] ([i915#3363])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-cml-u2/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [FAIL][25] ([i915#2426] / [i915#3363])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-bxt-dsi/igt@[email protected]
- fi-cfl-guc: NOTRUN -> [FAIL][26] ([i915#3363] / [k.org#202107] / [k.org#202109])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-cfl-guc/igt@[email protected]
- fi-icl-y: NOTRUN -> [FAIL][27] ([i915#1569])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-icl-y/igt@[email protected]
- fi-kbl-7567u: NOTRUN -> [FAIL][28] ([i915#3363])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-kbl-7567u/igt@[email protected]
- fi-skl-guc: NOTRUN -> [FAIL][29] ([i915#3363])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-skl-guc/igt@[email protected]
- fi-skl-6700k2: NOTRUN -> [FAIL][30] ([i915#3363])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-skl-6700k2/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [FAIL][31] ([i915#1610])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-bsw-n3050/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s0:
- fi-tgl-u2: [FAIL][32] ([i915#1888]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10365/fi-tgl-u2/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-tgl-u2/igt@[email protected]
#### Warnings ####
* igt@runner@aborted:
- fi-icl-u2: [FAIL][34] ([i915#1814] / [i915#3363]) -> [FAIL][35] ([i915#1569] / [i915#3363])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10365/fi-icl-u2/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/fi-icl-u2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1569]: https://gitlab.freedesktop.org/drm/intel/issues/1569
[i915#1610]: https://gitlab.freedesktop.org/drm/intel/issues/1610
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#192]: https://gitlab.freedesktop.org/drm/intel/issues/192
[i915#193]: https://gitlab.freedesktop.org/drm/intel/issues/193
[i915#194]: https://gitlab.freedesktop.org/drm/intel/issues/194
[i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2505]: https://gitlab.freedesktop.org/drm/intel/issues/2505
[i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
[i915#3626]: https://gitlab.freedesktop.org/drm/intel/issues/3626
[k.org#202107]: https://bugzilla.kernel.org/show_bug.cgi?id=202107
[k.org#202109]: https://bugzilla.kernel.org/show_bug.cgi?id=202109
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321
Participating hosts (38 -> 35)
------------------------------
Missing (3): fi-ilk-m540 fi-bdw-samus fi-hsw-4200u
Build changes
-------------
* Linux: CI_DRM_10365 -> Patchwork_20663
CI-20190529: 20190529
CI_DRM_10365: ac586c6a6b56905df2af88699c1e6d28416dd9a4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6146: 6caef22e4aafed275771f564d4ea4cab09896ebc @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20663: a896b164d83b0bf080708759af777d6b43a74615 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
a896b164d83b drm/plane: Move drm_plane_enable_fb_damage_clips into core c11741a8ac84 drm/plane: check that fb_damage is set up when used fc061e34c557 drm/plane: remove drm_helper_get_plane_damage_clips
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20663/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Daniel Vetter
It's not used. Drivers should instead use the helpers anyway.
Currently both vbox and i915 hand-roll this and it's not the greatest. vbox looks buggy, and i915 does a bit much that helpers would take care of I think.
Also improve the kerneldocs while we're at it.
Quoted 90 lines
Cc Ville Syrjälä <[email protected]>Cc Gwan-gyeong Mun <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Hans de Goede <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_damage_helper.c | 2 +- include/drm/drm_damage_helper.h | 17 ----------------- include/drm/drm_plane.h | 10 +++++++--- include/drm/drm_rect.h | 3 +++ 4 files changed, 11 insertions(+), 21 deletions(-)drivers/gpu/drm/drm_damage_helper.c +1
-1@@ -282,7 +282,7 @@ drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter,if (!state || !state->crtc || !state->fb || !state->visible)return ; - iter->clips =drm_helper_get_plane_damage_clips (state); + iter->clips = (struct drm_rect *)drm_plane_get_damage_clips (state); iter->num_clips =drm_plane_get_damage_clips_count (state);/* Round down for x1/y1 and round up for x2/y2 to catch all pixels */ include/drm/drm_damage_helper.h +0
-17@@ -82,21 +82,4 @@ bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state,struct drm_plane_state *state, struct drm_rect *rect); -/** -* drm_helper_get_plane_damage_clips - Returns damage clips in &drm_rect. -* @state: Plane state. -* -* Returns plane damage rectangles in internal &drm_rect. Currently &drm_rect -* can be obtained by simply typecasting &drm_mode_rect. This is because both -* are signed 32 and during drm_atomic_check_only() it is verified that damage -* clips are inside fb. -* -* Return: Clips in plane fb_damage_clips blob property. -*/ -static inline struct drm_rect * -drm_helper_get_plane_damage_clips (const struct drm_plane_state *state) -{ -return (struct drm_rect *)drm_plane_get_damage_clips (state); -} -#endif include/drm/drm_plane.h +7
-3@@ -186,6 +186,9 @@ struct drm_plane_state {* since last plane update) as an array of &drm_mode_rect in framebuffer * coodinates of the attached framebuffer. Note that unlike plane src, * damage clips are not in 16.16 fixed point. +* +* See drm_plane_get_damage_clips() and +* drm_plane_get_damage_clips_count() for accessing these. */ struct drm_property_blob *fb_damage_clips;@@ -914,9 +917,10 @@ drm_plane_get_damage_clips_count(const struct drm_plane_state *state)* drm_plane_get_damage_clips - Returns damage clips. * @state: Plane state. * -* Note that this function returns uapi type &drm_mode_rect. Drivers might -* instead be interested in internal &drm_rect which can be obtained by calling -* drm_helper_get_plane_damage_clips(). +* Note that this function returns uapi type &drm_mode_rect. Drivers might want +* to use the helper functions drm_atomic_helper_damage_iter_init() and +* drm_atomic_helper_damage_iter_next() or drm_atomic_helper_damage_merged() if +* the driver can only handle a single damage region at most. * * Return: Damage clips in plane fb_damage_clips blob property. */ include/drm/drm_rect.h +0
-0
include/drm/drm_rect.h line 47
Quoted 9 lines
include/drm/drm_rect.h +3
-0@@ -39,6 +39,9 @@* @x2: horizontal ending coordinate (exclusive) * @y1: vertical starting coordinate (inclusive) * @y2: vertical ending coordinate (exclusive) +* +* Note that this must match the layout of struct drm_mode_rect or the damage +* helpers like drm_atomic_helper_damage_iter_init() break. */ struct drm_rect {int x1, y1, x2, y2;
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx