drm: revert solid fill support
Subsystems (3)
cover drm: revert solid fill support
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. Merging it was a fault of mine.
It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Revert this patchset until userspace obligations are fulfilled.
Dmitry Baryshkov (7):
Revert "drm/atomic: Loosen FB atomic checks" Revert "drm/atomic: Move framebuffer checks to helper" Revert "drm/atomic: Add solid fill data to plane state dump" Revert "drm/atomic: Add pixel source to plane state dump" Revert "drm: Add solid fill pixel source"
Revert "drm: Introduce solid fill DRM plane property" Revert "drm: Introduce pixel_source DRM plane property"
drivers/gpu/drm/drm_atomic.c | 148 +++++++++------------- drivers/gpu/drm/drm_atomic_helper.c | 39 +++--- drivers/gpu/drm/drm_atomic_state_helper.c | 10 -- drivers/gpu/drm/drm_atomic_uapi.c | 30 ----- drivers/gpu/drm/drm_blend.c | 133 ------------------- drivers/gpu/drm/drm_crtc_internal.h | 1 - drivers/gpu/drm/drm_plane.c | 27 +--- include/drm/drm_atomic_helper.h | 4 +- include/drm/drm_blend.h | 3 - include/drm/drm_plane.h | 90 ------------- include/uapi/drm/drm_mode.h | 24 ---- 11 files changed, 86 insertions(+), 423 deletions(-)
Signature · 1 line
2.42.0
PATCH 1/7 Revert "drm/atomic: Loosen FB atomic checks"
This reverts commit f1e75da5364e780905d9cd6043f9c74cdcf84073.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_atomic.c | 21 ++++++++-------- drivers/gpu/drm/drm_atomic_helper.c | 39 +++++++++++++---------------- include/drm/drm_atomic_helper.h | 4 +-- include/drm/drm_plane.h | 29 --------------------- 4 files changed, 29 insertions(+), 64 deletions(-)
drivers/gpu/drm/drm_atomic.c +10 -11
@@ -674,16 +674,17 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, {struct drm_plane *plane = new_plane_state->plane;struct drm_crtc *crtc = new_plane_state->crtc; +const struct drm_framebuffer *fb = new_plane_state->fb;int ret; -/* either *both* CRTC and pixel source must be set, or neither */ -if (crtc && !drm_plane_has_visible_data (new_plane_state)) { -drm_dbg_atomic (plane->dev,"[PLANE:%d:%s] CRTC set but no visible data\n" , +/* either *both* CRTC and FB must be set, or neither */ +if (crtc && !fb) { +drm_dbg_atomic (plane->dev,"[PLANE:%d:%s] CRTC set but no FB\n" , plane->base.id, plane->name);return -EINVAL ; - }else if (drm_plane_has_visible_data (new_plane_state) && !crtc) { -drm_dbg_atomic (plane->dev,"[PLANE:%d:%s] Source %d has visible data but no CRTC\n" , - plane->base.id, plane->name, new_plane_state->pixel_source); + }else if (fb && !crtc) { +drm_dbg_atomic (plane->dev,"[PLANE:%d:%s] FB set but no CRTC\n" , + plane->base.id, plane->name);return -EINVAL ; }
@@ -714,11 +715,9 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, } -if (new_plane_state->pixel_source ==DRM_PLANE_PIXEL_SOURCE_FB && new_plane_state->fb) { - ret =drm_atomic_plane_check_fb (new_plane_state); -if (ret) -return ret; - } + ret =drm_atomic_plane_check_fb (new_plane_state); +if (ret) +return ret;if (plane_switching_crtc (old_plane_state, new_plane_state)) { drm_dbg_atomic(plane->dev,
drivers/gpu/drm/drm_atomic_helper.c +17 -22
@@ -861,6 +861,7 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, bool can_position, bool can_update_disabled) { +struct drm_framebuffer *fb = plane_state->fb;struct drm_rect *src = &plane_state->src;struct drm_rect *dst = &plane_state->dst;unsigned int rotation = plane_state->rotation;
@@ -872,7 +873,7 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, *src =drm_plane_state_src (plane_state); *dst =drm_plane_state_dest (plane_state); -if (!drm_plane_has_visible_data (plane_state)) { +if (!fb) { plane_state->visible = false;return 0 ; }
@@ -889,31 +890,25 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,return -EINVAL ; } -/* Check that selected pixel source is valid */ -if (plane_state->pixel_source ==DRM_PLANE_PIXEL_SOURCE_FB && plane_state->fb) { -struct drm_framebuffer *fb = plane_state->fb; -drm_rect_rotate (src, fb->width <<16 , fb->height <<16 , rotation); +drm_rect_rotate (src, fb->width <<16 , fb->height <<16 , rotation); -/* Check scaling */ - hscale =drm_rect_calc_hscale (src, dst, min_scale, max_scale); - vscale =drm_rect_calc_vscale (src, dst, min_scale, max_scale); +/* Check scaling */ + hscale =drm_rect_calc_hscale (src, dst, min_scale, max_scale); + vscale =drm_rect_calc_vscale (src, dst, min_scale, max_scale); +if (hscale <0 || vscale <0 ) { +drm_dbg_kms (plane_state->plane->dev, +"Invalid scaling of plane\n" ); +drm_rect_debug_print ("src: " , &plane_state->src, true); +drm_rect_debug_print ("dst: " , &plane_state->dst, false); +return -ERANGE ; + } -if (hscale <0 || vscale <0 ) { -drm_dbg_kms (plane_state->plane->dev, -"Invalid scaling of plane\n" ); -drm_rect_debug_print ("src: " , &plane_state->src, true); -drm_rect_debug_print ("dst: " , &plane_state->dst, false); -return -ERANGE ; - } +if (crtc_state->enable) +drm_mode_get_hv_timing (&crtc_state->mode, &clip.x2, &clip.y2); -if (crtc_state->enable) -drm_mode_get_hv_timing (&crtc_state->mode, &clip.x2, &clip.y2); + plane_state->visible =drm_rect_clip_scaled (src, dst, &clip); - plane_state->visible =drm_rect_clip_scaled (src, dst, &clip); -drm_rect_rotate_inv (src, fb->width <<16 , fb->height <<16 , rotation); - }else if (drm_plane_solid_fill_enabled (plane_state)) { - plane_state->visible = true; - } +drm_rect_rotate_inv (src, fb->width <<16 , fb->height <<16 , rotation);if (!plane_state->visible)/*
include/drm/drm_atomic_helper.h +2 -2
@@ -256,8 +256,8 @@ drm_atomic_plane_disabling(struct drm_plane_state *old_plane_state,* Anything else should be considered a bug in the atomic core, so we * gently warn about it. */ -WARN_ON ((new_plane_state->crtc ==NULL &&drm_plane_has_visible_data (new_plane_state)) || - (new_plane_state->crtc !=NULL && !drm_plane_has_visible_data (new_plane_state))); +WARN_ON ((new_plane_state->crtc ==NULL && new_plane_state->fb !=NULL ) || + (new_plane_state->crtc !=NULL && new_plane_state->fb ==NULL ));return old_plane_state->crtc && !new_plane_state->crtc; }
include/drm/drm_plane.h +0 -29
@@ -1016,35 +1016,6 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,#define drm_for_each_plane (plane, dev) \ list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) -/** -* drm_plane_solid_fill_enabled - Check if solid fill is enabled on plane -* @state: plane state -* -* Returns: -* Whether the plane has been assigned a solid_fill_blob -*/ -static inline bool drm_plane_solid_fill_enabled (struct drm_plane_state *state) -{ -if (!state) -return false; -return state->pixel_source ==DRM_PLANE_PIXEL_SOURCE_SOLID_FILL && state->solid_fill_blob; -} - -static inline bool drm_plane_has_visible_data (const struct drm_plane_state *state) -{ -switch (state->pixel_source) { -case DRM_PLANE_PIXEL_SOURCE_NONE : -return false; -case DRM_PLANE_PIXEL_SOURCE_SOLID_FILL : -return state->solid_fill_blob !=NULL ; -case DRM_PLANE_PIXEL_SOURCE_FB : -default : -WARN_ON (state->pixel_source !=DRM_PLANE_PIXEL_SOURCE_FB ); - } - -return state->fb !=NULL ; -} -bool drm_any_plane_has_format (struct drm_device *dev,u32 format,u64 modifier);
Signature · 1 line
2.42.0
PATCH 2/7 Revert "drm/atomic: Move framebuffer checks to helper"
In reply to Dmitry BaryshkovThis reverts commit 4ba6b7a646321e740c7f2d80c90505019c4e8fce.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_atomic.c | 130 +++++++++++++++-------------------- 1 file changed, 57 insertions(+), 73 deletions(-)
drivers/gpu/drm/drm_atomic.c +57 -73
@@ -589,76 +589,6 @@ plane_switching_crtc(const struct drm_plane_state *old_plane_state,return true; } -static int drm_atomic_plane_check_fb (const struct drm_plane_state *state) -{ -struct drm_plane *plane = state->plane; -const struct drm_framebuffer *fb = state->fb; -struct drm_mode_rect *clips; - -uint32_t num_clips; -unsigned int fb_width, fb_height; -int ret; - -/* Check whether this plane supports the fb pixel format. */ - ret =drm_plane_check_pixel_format (plane, fb->format->format, - fb->modifier); - -if (ret) { -drm_dbg_atomic (plane->dev, -"[PLANE:%d:%s] invalid pixel format %p4cc, modifier 0x%llx\n" , - plane->base.id, plane->name, - &fb->format->format, fb->modifier); -return ret; - } - - fb_width = fb->width <<16 ; - fb_height = fb->height <<16 ; - -/* Make sure source coordinates are inside the fb. */ -if (state->src_w > fb_width || - state->src_x > fb_width - state->src_w || - state->src_h > fb_height || - state->src_y > fb_height - state->src_h) { -drm_dbg_atomic (plane->dev, -"[PLANE:%d:%s] invalid source coordinates " -"%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n" , - plane->base.id, plane->name, - state->src_w >>16 , - ((state->src_w &0xffff ) *15625 ) >>10 , - state->src_h >>16 , - ((state->src_h &0xffff ) *15625 ) >>10 , - state->src_x >>16 , - ((state->src_x &0xffff ) *15625 ) >>10 , - state->src_y >>16 , - ((state->src_y &0xffff ) *15625 ) >>10 , - fb->width, fb->height); -return -ENOSPC ; - } - - clips =__drm_plane_get_damage_clips (state); - num_clips =drm_plane_get_damage_clips_count (state); - -/* Make sure damage clips are valid and inside the fb. */ -while (num_clips >0 ) { -if (clips->x1 >= clips->x2 || - clips->y1 >= clips->y2 || - clips->x1 <0 || - clips->y1 <0 || - clips->x2 > fb_width || - clips->y2 > fb_height) { -drm_dbg_atomic (plane->dev, -"[PLANE:%d:%s] invalid damage clip %d %d %d %d\n" , - plane->base.id, plane->name, clips->x1, - clips->y1, clips->x2, clips->y2); -return -EINVAL ; - } - clips++; - num_clips--; - } - -return 0 ; -} -/** * drm_atomic_plane_check - check plane state * @old_plane_state: old plane state to check
@@ -675,6 +605,9 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state,struct drm_plane *plane = new_plane_state->plane;struct drm_crtc *crtc = new_plane_state->crtc;const struct drm_framebuffer *fb = new_plane_state->fb; +unsigned int fb_width, fb_height; +struct drm_mode_rect *clips; +uint32_t num_clips;int ret;/* either *both* CRTC and FB must be set, or neither */
@@ -701,6 +634,17 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state,return -EINVAL ; } +/* Check whether this plane supports the fb pixel format. */ + ret =drm_plane_check_pixel_format (plane, fb->format->format, + fb->modifier); +if (ret) { +drm_dbg_atomic (plane->dev, +"[PLANE:%d:%s] invalid pixel format %p4cc, modifier 0x%llx\n" , + plane->base.id, plane->name, + &fb->format->format, fb->modifier); +return ret; + } +/* Give drivers some help against integer overflows */ if (new_plane_state->crtc_w > INT_MAX || new_plane_state->crtc_x > INT_MAX - (int32_t) new_plane_state->crtc_w ||
@@ -714,10 +658,50 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state,return -ERANGE ; } + fb_width = fb->width <<16 ; + fb_height = fb->height <<16 ; - ret =drm_atomic_plane_check_fb (new_plane_state); -if (ret) -return ret; +/* Make sure source coordinates are inside the fb. */ +if (new_plane_state->src_w > fb_width || + new_plane_state->src_x > fb_width - new_plane_state->src_w || + new_plane_state->src_h > fb_height || + new_plane_state->src_y > fb_height - new_plane_state->src_h) { +drm_dbg_atomic (plane->dev, +"[PLANE:%d:%s] invalid source coordinates " +"%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n" , + plane->base.id, plane->name, + new_plane_state->src_w >>16 , + ((new_plane_state->src_w &0xffff ) *15625 ) >>10 , + new_plane_state->src_h >>16 , + ((new_plane_state->src_h &0xffff ) *15625 ) >>10 , + new_plane_state->src_x >>16 , + ((new_plane_state->src_x &0xffff ) *15625 ) >>10 , + new_plane_state->src_y >>16 , + ((new_plane_state->src_y &0xffff ) *15625 ) >>10 , + fb->width, fb->height); +return -ENOSPC ; + } + + clips =__drm_plane_get_damage_clips (new_plane_state); + num_clips =drm_plane_get_damage_clips_count (new_plane_state); + +/* Make sure damage clips are valid and inside the fb. */ +while (num_clips >0 ) { +if (clips->x1 >= clips->x2 || + clips->y1 >= clips->y2 || + clips->x1 <0 || + clips->y1 <0 || + clips->x2 > fb_width || + clips->y2 > fb_height) { +drm_dbg_atomic (plane->dev, +"[PLANE:%d:%s] invalid damage clip %d %d %d %d\n" , + plane->base.id, plane->name, clips->x1, + clips->y1, clips->x2, clips->y2); +return -EINVAL ; + } + clips++; + num_clips--; + }if (plane_switching_crtc (old_plane_state, new_plane_state)) { drm_dbg_atomic(plane->dev,
Signature · 1 line
2.42.0
PATCH 3/7 Revert "drm/atomic: Add solid fill data to plane state dump"
In reply to Dmitry BaryshkovThis reverts commit e86413f5442ee094e66b3e75f2d3419ed0df9520.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_atomic.c | 4 ---- drivers/gpu/drm/drm_plane.c | 8 -------- include/drm/drm_plane.h | 3 --- 3 files changed, 15 deletions(-)
drivers/gpu/drm/drm_atomic.c +0 -4
@@ -726,10 +726,6 @@ static void drm_atomic_plane_print_state(struct drm_printer *p,drm_printf (p,"\tfb=%u\n" , state->fb ? state->fb->base.id :0 );if (state->fb)drm_framebuffer_print_info (p,2 , state->fb); -drm_printf (p,"\tsolid_fill=%u\n" , - state->solid_fill_blob ? state->solid_fill_blob->base.id :0 ); -if (state->solid_fill_blob) -drm_plane_solid_fill_print_info (p,2 , state);drm_printf (p,"\tcrtc-pos=" DRM_RECT_FMT "\n" ,DRM_RECT_ARG (&dest));drm_printf (p,"\tsrc-pos=" DRM_RECT_FP_FMT "\n" ,DRM_RECT_FP_ARG (&src));drm_printf (p,"\trotation=%x\n" , state->rotation);
drivers/gpu/drm/drm_plane.c +0 -8
@@ -1641,14 +1641,6 @@ __drm_plane_get_damage_clips(const struct drm_plane_state *state) state->fb_damage_clips->data : NULL); } -void drm_plane_solid_fill_print_info (struct drm_printer *p,unsigned int indent, -const struct drm_plane_state *state) -{ -drm_printf_indent (p, indent,"r=0x%08x\n" , state->solid_fill.r); -drm_printf_indent (p, indent,"g=0x%08x\n" , state->solid_fill.g); -drm_printf_indent (p, indent,"b=0x%08x\n" , state->solid_fill.b); -} -/** * drm_plane_get_damage_clips - Returns damage clips. * @state: Plane state.
include/drm/drm_plane.h +0 -3
@@ -1025,9 +1025,6 @@ 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); -void drm_plane_solid_fill_print_info (struct drm_printer *p,unsigned int indent, -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.42.0
PATCH 4/7 Revert "drm/atomic: Add pixel source to plane state dump"
In reply to Dmitry BaryshkovThis reverts commit 8283ac7871a959848e09fc6593b8c12b8febfee6.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_atomic.c | 1 - drivers/gpu/drm/drm_blend.c | 1 - drivers/gpu/drm/drm_crtc_internal.h | 1 - 3 files changed, 3 deletions(-)
drivers/gpu/drm/drm_atomic.c +0 -1
@@ -722,7 +722,6 @@ static void drm_atomic_plane_print_state(struct drm_printer *p,drm_printf (p,"plane[%u]: %s\n" , plane->base.id, plane->name);drm_printf (p,"\tcrtc=%s\n" , state->crtc ? state->crtc->name :"(null)" ); -drm_printf (p,"\tpixel-source=%s\n" ,drm_get_pixel_source_name (state->pixel_source));drm_printf (p,"\tfb=%u\n" , state->fb ? state->fb->base.id :0 );if (state->fb)drm_framebuffer_print_info (p,2 , state->fb);
drivers/gpu/drm/drm_blend.c +0 -1
@@ -647,7 +647,6 @@ static const struct drm_prop_enum_list drm_pixel_source_enum_list[] = { { DRM_PLANE_PIXEL_SOURCE_FB, "FB" }, { DRM_PLANE_PIXEL_SOURCE_SOLID_FILL, "SOLID_FILL" }, }; -DRM_ENUM_NAME_FN (drm_get_pixel_source_name, drm_pixel_source_enum_list);/** * drm_plane_create_pixel_source_property - create a new pixel source property
drivers/gpu/drm/drm_crtc_internal.h +0 -1
@@ -269,7 +269,6 @@ int drm_plane_check_pixel_format(struct drm_plane *plane, u32 format, u64 modifier);struct drm_mode_rect *__drm_plane_get_damage_clips (const struct drm_plane_state *state); -const char *drm_get_pixel_source_name (int val);/* drm_bridge.c */ void drm_bridge_detach (struct drm_bridge *bridge);
Signature · 1 line
2.42.0
PATCH 5/7 Revert "drm: Add solid fill pixel source"
In reply to Dmitry BaryshkovThis reverts commit 4b64167042927531f4cfaf035b8f88c2f7a05f06.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_blend.c | 10 +--------- include/drm/drm_plane.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-)
drivers/gpu/drm/drm_blend.c +1 -9
@@ -204,9 +204,6 @@* "FB": * Framebuffer source set by the "FB_ID" property. * -* "SOLID_FILL": -* Solid fill color source set by the "solid_fill" property. -* * solid_fill: * solid_fill is set up with drm_plane_create_solid_fill_property(). It * contains pixel data that drivers can use to fill a plane.
@@ -645,7 +642,6 @@ EXPORT_SYMBOL(drm_plane_create_blend_mode_property);static const struct drm_prop_enum_list drm_pixel_source_enum_list[] = { {DRM_PLANE_PIXEL_SOURCE_NONE ,"NONE" }, {DRM_PLANE_PIXEL_SOURCE_FB ,"FB" }, - {DRM_PLANE_PIXEL_SOURCE_SOLID_FILL ,"SOLID_FILL" }, };/**
@@ -670,9 +666,6 @@ static const struct drm_prop_enum_list drm_pixel_source_enum_list[] = {* "FB": * Framebuffer pixel source * -* "SOLID_FILL": -* Solid fill color pixel source -* * Returns: * Zero on success, negative errno on failure. */
@@ -682,8 +675,7 @@ int drm_plane_create_pixel_source_property(struct drm_plane *plane,struct drm_device *dev = plane->dev;struct drm_property *prop;static const unsigned int valid_source_mask =BIT (DRM_PLANE_PIXEL_SOURCE_FB ) | -BIT (DRM_PLANE_PIXEL_SOURCE_NONE ) | -BIT (DRM_PLANE_PIXEL_SOURCE_SOLID_FILL ); +BIT (DRM_PLANE_PIXEL_SOURCE_NONE );int i;/* FB is supported by default */
include/drm/drm_plane.h +0 -1
@@ -43,7 +43,6 @@ enum drm_scaling_filter {enum drm_plane_pixel_source {DRM_PLANE_PIXEL_SOURCE_NONE ,DRM_PLANE_PIXEL_SOURCE_FB , -DRM_PLANE_PIXEL_SOURCE_SOLID_FILL ,DRM_PLANE_PIXEL_SOURCE_MAX };
Signature · 1 line
2.42.0
PATCH 6/7 Revert "drm: Introduce solid fill DRM plane property"
In reply to Dmitry BaryshkovThis reverts commit 85863a4e16e77079ee14865905ddc3ef9483a640.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_atomic_state_helper.c | 9 ------ drivers/gpu/drm/drm_atomic_uapi.c | 26 ---------------- drivers/gpu/drm/drm_blend.c | 30 ------------------- include/drm/drm_blend.h | 1 - include/drm/drm_plane.h | 36 ----------------------- include/uapi/drm/drm_mode.h | 24 --------------- 6 files changed, 126 deletions(-)
drivers/gpu/drm/drm_atomic_state_helper.c +0 -9
@@ -254,11 +254,6 @@ void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *plane_state, plane_state->pixel_blend_mode =DRM_MODE_BLEND_PREMULTI ; plane_state->pixel_source =DRM_PLANE_PIXEL_SOURCE_FB ; -if (plane_state->solid_fill_blob) { -drm_property_blob_put (plane_state->solid_fill_blob); - plane_state->solid_fill_blob =NULL ; - } - if (plane->color_encoding_property) { if (!drm_object_property_get_default_value(&plane->base, plane->color_encoding_property,
@@ -355,9 +350,6 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,if (state->fb)drm_framebuffer_get (state->fb); -if (state->solid_fill_blob) -drm_property_blob_get (state->solid_fill_blob); - state->fence =NULL ; state->commit =NULL ; state->fb_damage_clips =NULL ;
@@ -407,7 +399,6 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)drm_crtc_commit_put (state->commit);drm_property_blob_put (state->fb_damage_clips); -drm_property_blob_put (state->solid_fill_blob); }EXPORT_SYMBOL (__drm_atomic_helper_plane_destroy_state);
drivers/gpu/drm/drm_atomic_uapi.c +0 -26
@@ -316,20 +316,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, }EXPORT_SYMBOL (drm_atomic_set_crtc_for_connector); -static void drm_atomic_set_solid_fill_prop (struct drm_plane_state *state) -{ -struct drm_mode_solid_fill *user_info; - -if (!state->solid_fill_blob) -return ; - - user_info = (struct drm_mode_solid_fill *)state->solid_fill_blob->data; - - state->solid_fill.r = user_info->r; - state->solid_fill.g = user_info->g; - state->solid_fill.b = user_info->b; -} -static void set_out_fence_for_crtc (struct drm_atomic_state *state,struct drm_crtc *crtc,s32 __user *fence_ptr) {
@@ -578,15 +564,6 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, state->src_h = val; }else if (property == plane->pixel_source_property) { state->pixel_source = val; - }else if (property == plane->solid_fill_property) { - ret =drm_atomic_replace_property_blob_from_id (dev, - &state->solid_fill_blob, - val,sizeof (struct drm_mode_solid_fill ), --1 , &replaced); -if (ret) -return ret; - -drm_atomic_set_solid_fill_prop (state); }else if (property == plane->alpha_property) { state->alpha = val; }else if (property == plane->blend_mode_property) {
@@ -677,9 +654,6 @@ drm_atomic_plane_get_property(struct drm_plane *plane, *val = state->src_h; }else if (property == plane->pixel_source_property) { *val = state->pixel_source; - }else if (property == plane->solid_fill_property) { - *val = state->solid_fill_blob ? - state->solid_fill_blob->base.id :0 ; }else if (property == plane->alpha_property) { *val = state->alpha; }else if (property == plane->blend_mode_property) {
drivers/gpu/drm/drm_blend.c +0 -30
@@ -204,10 +204,6 @@* "FB": * Framebuffer source set by the "FB_ID" property. * -* solid_fill: -* solid_fill is set up with drm_plane_create_solid_fill_property(). It -* contains pixel data that drivers can use to fill a plane. -* * Note that all the property extensions described here apply either to the * plane or the CRTC (e.g. for the background color, which currently is not * exposed and assumed to be black).
@@ -713,29 +709,3 @@ int drm_plane_create_pixel_source_property(struct drm_plane *plane,return 0 ; }EXPORT_SYMBOL (drm_plane_create_pixel_source_property); - -/** -* drm_plane_create_solid_fill_property - create a new solid_fill property -* @plane: drm plane -* -* This creates a new property blob that holds pixel data for solid fill planes. -* The property is exposed to userspace as a property blob called "solid_fill". -* -* For information on what the blob contains, see `drm_mode_solid_fill`. -*/ -int drm_plane_create_solid_fill_property (struct drm_plane *plane) -{ -struct drm_property *prop; - - prop =drm_property_create (plane->dev, -DRM_MODE_PROP_ATOMIC |DRM_MODE_PROP_BLOB , -"solid_fill" ,0 ); -if (!prop) -return -ENOMEM ; - -drm_object_attach_property (&plane->base, prop,0 ); - plane->solid_fill_property = prop; - -return 0 ; -} -EXPORT_SYMBOL (drm_plane_create_solid_fill_property);
include/drm/drm_blend.h +0 -1
@@ -60,5 +60,4 @@ int drm_plane_create_blend_mode_property(struct drm_plane *plane, unsigned int supported_modes);int drm_plane_create_pixel_source_property (struct drm_plane *plane,unsigned long extra_sources); -int drm_plane_create_solid_fill_property (struct drm_plane *plane);#endif
include/drm/drm_plane.h +0 -36
@@ -46,18 +46,6 @@ enum drm_plane_pixel_source { DRM_PLANE_PIXEL_SOURCE_MAX }; -/** -* struct solid_fill_property - RGB values for solid fill plane -* -* TODO: Add solid fill source and corresponding pixel source -* that supports RGBA color -*/ -struct drm_solid_fill { -uint32_t r; -uint32_t g; -uint32_t b; -}; -/** * struct drm_plane_state - mutable plane state *
@@ -146,23 +134,6 @@ struct drm_plane_state {*/ enum drm_plane_pixel_source pixel_source; -/** -* @solid_fill_blob: -* -* Blob containing relevant information for a solid fill plane -* including RGB color values. See -* drm_plane_create_solid_fill_property() for more details. -*/ -struct drm_property_blob *solid_fill_blob; - -/** -* @solid_fill: -* -* Pixel data for solid fill planes. See -* drm_plane_create_solid_fill_property() for more details. -*/ -struct drm_solid_fill solid_fill; -/** * @alpha: * Opacity of the plane with 0 as completely transparent and 0xffff as
@@ -763,13 +734,6 @@ struct drm_plane {*/ struct drm_property *pixel_source_property; -/** -* @solid_fill_property: -* Optional solid_fill property for this plane. See -* drm_plane_create_solid_fill_property(). -*/ -struct drm_property *solid_fill_property; -/** * @alpha_property: * Optional alpha property for this plane. See
include/uapi/drm/drm_mode.h +0 -24
@@ -259,30 +259,6 @@ struct drm_mode_modeinfo {char name[DRM_DISPLAY_MODE_LEN ]; }; -/** -* struct drm_mode_solid_fill - User info for solid fill planes -* -* This is the userspace API solid fill information structure. -* -* Userspace can enable solid fill planes by assigning the plane "solid_fill" -* property to a blob containing a single drm_mode_solid_fill struct populated with an RGB323232 -* color and setting the pixel source to "SOLID_FILL". -* -* For information on the plane property, see drm_plane_create_solid_fill_property() -* -* @r: Red color value of single pixel -* @g: Green color value of single pixel -* @b: Blue color value of single pixel -* @pad: padding, must be zero -*/ -struct drm_mode_solid_fill { -__u32 r; -__u32 g; -__u32 b; -__u32 pad; -}; - -struct drm_mode_card_res {__u64 fb_id_ptr;__u64 crtc_id_ptr;
Signature · 1 line
2.42.0
PATCH 7/7 Revert "drm: Introduce pixel_source DRM plane property"
In reply to Dmitry BaryshkovThis reverts commit e50e5fed41c7eed2db4119645bf3480ec43fec11.
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled.
--- drivers/gpu/drm/drm_atomic_state_helper.c | 1 - drivers/gpu/drm/drm_atomic_uapi.c | 4 - drivers/gpu/drm/drm_blend.c | 94 ----------------------- drivers/gpu/drm/drm_plane.c | 19 +---- include/drm/drm_blend.h | 2 - include/drm/drm_plane.h | 21 ----- 6 files changed, 4 insertions(+), 137 deletions(-)
drivers/gpu/drm/drm_atomic_state_helper.c +0 -1
@@ -252,7 +252,6 @@ void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *plane_state, plane_state->alpha =DRM_BLEND_ALPHA_OPAQUE ; plane_state->pixel_blend_mode =DRM_MODE_BLEND_PREMULTI ; - plane_state->pixel_source =DRM_PLANE_PIXEL_SOURCE_FB ; if (plane->color_encoding_property) { if (!drm_object_property_get_default_value(&plane->base,
drivers/gpu/drm/drm_atomic_uapi.c +0 -4
@@ -562,8 +562,6 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, state->src_w = val; }else if (property == config->prop_src_h) { state->src_h = val; - }else if (property == plane->pixel_source_property) { - state->pixel_source = val; }else if (property == plane->alpha_property) { state->alpha = val; }else if (property == plane->blend_mode_property) {
@@ -652,8 +650,6 @@ drm_atomic_plane_get_property(struct drm_plane *plane, *val = state->src_w; }else if (property == config->prop_src_h) { *val = state->src_h; - }else if (property == plane->pixel_source_property) { - *val = state->pixel_source; }else if (property == plane->alpha_property) { *val = state->alpha; }else if (property == plane->blend_mode_property) {
drivers/gpu/drm/drm_blend.c +0 -94
103 lines not on this page · raw message
drivers/gpu/drm/drm_plane.c +4 -15
@@ -953,14 +953,6 @@ bool drm_any_plane_has_format(struct drm_device *dev, }EXPORT_SYMBOL (drm_any_plane_has_format); -static bool drm_plane_needs_disable (struct drm_plane_state *state,struct drm_framebuffer *fb) -{ -if (state->pixel_source ==DRM_PLANE_PIXEL_SOURCE_NONE ) -return true; - -return state->pixel_source ==DRM_PLANE_PIXEL_SOURCE_FB && fb ==NULL ; -} -/* * __setplane_internal - setplane handler for internal callers *
@@ -983,8 +975,8 @@ static int __setplane_internal(struct drm_plane *plane,WARN_ON (drm_drv_uses_atomic_modeset (plane->dev)); -/* No visible data means shut it down */ -if (drm_plane_needs_disable (plane->state, fb)) { +/* No fb means shut it down */ +if (!fb) { plane->old_fb = plane->fb; ret = plane->funcs->disable_plane (plane, ctx);if (!ret) {
@@ -1035,8 +1027,8 @@ static int __setplane_atomic(struct drm_plane *plane,WARN_ON (!drm_drv_uses_atomic_modeset (plane->dev)); -/* No visible data means shut it down */ -if (drm_plane_needs_disable (plane->state, fb)) +/* No fb means shut it down */ +if (!fb)return plane->funcs->disable_plane (plane, ctx);/*
@@ -1109,9 +1101,6 @@ int drm_mode_setplane(struct drm_device *dev, void *data,return -ENOENT ; } -if (plane->state) - plane->state->pixel_source =DRM_PLANE_PIXEL_SOURCE_FB ; -if (plane_req->fb_id) { fb =drm_framebuffer_lookup (dev, file_priv, plane_req->fb_id);if (!fb) {
include/drm/drm_blend.h +0 -2
@@ -58,6 +58,4 @@ int drm_atomic_normalize_zpos(struct drm_device *dev, struct drm_atomic_state *state);int drm_plane_create_blend_mode_property (struct drm_plane *plane,unsigned int supported_modes); -int drm_plane_create_pixel_source_property (struct drm_plane *plane, -unsigned long extra_sources);#endif
include/drm/drm_plane.h +0 -21
@@ -40,12 +40,6 @@ enum drm_scaling_filter { DRM_SCALING_FILTER_NEAREST_NEIGHBOR, }; -enum drm_plane_pixel_source { -DRM_PLANE_PIXEL_SOURCE_NONE , -DRM_PLANE_PIXEL_SOURCE_FB , -DRM_PLANE_PIXEL_SOURCE_MAX -}; -/** * struct drm_plane_state - mutable plane state *
@@ -126,14 +120,6 @@ struct drm_plane_state {/** @hotspot_y: y offset to mouse cursor hotspot */ int32_t hotspot_x, hotspot_y; -/** -* @pixel_source: -* -* Source of pixel information for the plane. See -* drm_plane_create_pixel_source_property() for more details. -*/ -enum drm_plane_pixel_source pixel_source; -/** * @alpha: * Opacity of the plane with 0 as completely transparent and 0xffff as
@@ -727,13 +713,6 @@ struct drm_plane {*/ struct drm_plane_state *state; -/* -* @pixel_source_property: -* Optional pixel_source property for this plane. See -* drm_plane_create_pixel_source_property(). -*/ -struct drm_property *pixel_source_property; -/** * @alpha_property: * Optional alpha property for this plane. See
Signature · 1 line
2.42.0
Quoted 7 lines · Dmitry Baryshkov
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. Merging it was a fault of mine.
It has neither corresponding open-source userspace implementation nor
[ ... ]
Thanks!
Maxime
Dmitry Baryshkov
AppliedQuoted 9 lines · Dmitry Baryshkov
Altough the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. Merging it was a fault of mine.
It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Revert this patchset until userspace obligations are fulfilled.
[...]
Applied to drm-misc-next, thanks!
[1/7] Revert "drm/atomic: Loosen FB atomic checks"
commit: 1c0a80f160965c88f16e73ff69015db2f044c486
[2/7] Revert "drm/atomic: Move framebuffer checks to helper"
commit: b881ba8faa5c7689eb1cb487ad891c46dbbed0e8
[3/7] Revert "drm/atomic: Add solid fill data to plane state dump"
commit: a513f095b941e9e96196f04f11f253d763310c08
[4/7] Revert "drm/atomic: Add pixel source to plane state dump"
commit: fe28421d4fedb90cadcef4932be0e8364f79283d
[5/7] Revert "drm: Add solid fill pixel source"
commit: 5fb1ad3f5725c5c4d1a0c24ba4f82f239dc6878d
[6/7] Revert "drm: Introduce solid fill DRM plane property"
commit: e5fba1ada1c1d676438138d815acd8f427a1eaf0
[7/7] Revert "drm: Introduce pixel_source DRM plane property"
commit: 90422201f8f2b4e26ab7bd43b92786a11c1ffebfBest regards,
Signature · 1 line
Dmitry Baryshkov <[email protected]>