drm/fb-helper: Remove drm_mode_config_fb.
Subsystems (2)
Maarten Lankhorst
maintainerPATCH 1/1 drm/fb-helper: Remove drm_mode_config_fb.
Remove drm_mode_config_fb, I don't see the point of it.
To make it clear that it's ok to use plane->fb directly, move up drm_drv_uses_atomic_modeset so the code is skipped for atomic drivers that require plane_state->fb.
--- drivers/gpu/drm/drm_fb_helper.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +4 -18
@@ -322,20 +322,6 @@ int drm_fb_helper_debug_enter(struct fb_info *info) }EXPORT_SYMBOL (drm_fb_helper_debug_enter); -/* Find the real fb for a given fb helper CRTC */ -static struct drm_framebuffer *drm_mode_config_fb (struct drm_crtc *crtc) -{ -struct drm_device *dev = crtc->dev; -struct drm_crtc *c; - -drm_for_each_crtc (c, dev) { -if (crtc->base.id == c->base.id) -return c->primary->fb; - } - -return NULL ; -} -/** * drm_fb_helper_debug_leave - implementation for &fb_ops.fb_debug_leave * @info: fbdev registered by the helper
@@ -352,8 +338,11 @@ int drm_fb_helper_debug_leave(struct fb_info *info)struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; crtc = mode_set->crtc; +if (drm_drv_uses_atomic_modeset (crtc->dev)) +continue ; + funcs = crtc->helper_private; - fb =drm_mode_config_fb (crtc); + fb = crtc->primary->fb;if (!crtc->enabled)continue ;
@@ -366,9 +355,6 @@ int drm_fb_helper_debug_leave(struct fb_info *info)if (funcs->mode_set_base_atomic ==NULL )continue ; -if (drm_drv_uses_atomic_modeset (crtc->dev)) -continue ; -drm_fb_helper_restore_lut_atomic (mode_set->crtc); funcs->mode_set_base_atomic (mode_set->crtc, fb, crtc->x, crtc->y,LEAVE_ATOMIC_MODE_SET );
Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: warning for drm/fb-helper: Remove drm_mode_config_fb.
== Series Details ==
== Series Details ==
Series: drm/fb-helper: Remove drm_mode_config_fb.
URL : https://patchwork.freedesktop.org/series/26740/
State : warning
== Summary ==
Series 26740v1 drm/fb-helper: Remove drm_mode_config_fb.
https://patchwork.freedesktop.org/api/1.0/series/26740/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100125
Test gem_ringfill:
Subgroup basic-default:
pass -> SKIP (fi-glk-2a)fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fi-bdw-5557u total:279 pass:264 dwarn:0 dfail:0 fail:3 skip:11 time:437s fi-bdw-gvtdvm total:279 pass:257 dwarn:8 dfail:0 fail:0 skip:14 time:429s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:352s fi-bsw-n3050 total:279 pass:239 dwarn:0 dfail:0 fail:3 skip:36 time:522s fi-bxt-j4205 total:279 pass:256 dwarn:0 dfail:0 fail:3 skip:19 time:504s fi-byt-j1900 total:279 pass:250 dwarn:1 dfail:0 fail:3 skip:24 time:481s fi-byt-n2820 total:279 pass:246 dwarn:1 dfail:0 fail:3 skip:28 time:478s fi-glk-2a total:279 pass:255 dwarn:0 dfail:0 fail:3 skip:20 time:585s fi-hsw-4770 total:279 pass:259 dwarn:0 dfail:0 fail:3 skip:16 time:432s fi-hsw-4770r total:279 pass:259 dwarn:0 dfail:0 fail:3 skip:16 time:407s fi-ilk-650 total:279 pass:225 dwarn:0 dfail:0 fail:3 skip:50 time:412s fi-ivb-3520m total:279 pass:257 dwarn:0 dfail:0 fail:3 skip:18 time:493s fi-ivb-3770 total:279 pass:257 dwarn:0 dfail:0 fail:3 skip:18 time:471s fi-kbl-7500u total:279 pass:257 dwarn:0 dfail:0 fail:3 skip:18 time:460s fi-kbl-7560u total:279 pass:265 dwarn:0 dfail:0 fail:3 skip:10 time:559s fi-kbl-r total:279 pass:256 dwarn:1 dfail:0 fail:3 skip:18 time:562s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:555s fi-skl-6260u total:279 pass:265 dwarn:0 dfail:0 fail:3 skip:10 time:454s fi-skl-6700hq total:279 pass:219 dwarn:1 dfail:0 fail:33 skip:24 time:303s fi-skl-6700k total:279 pass:257 dwarn:0 dfail:0 fail:3 skip:18 time:463s fi-skl-6770hq total:279 pass:265 dwarn:0 dfail:0 fail:3 skip:10 time:470s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:436s fi-snb-2520m total:279 pass:247 dwarn:0 dfail:0 fail:3 skip:28 time:536s fi-snb-2600 total:279 pass:245 dwarn:0 dfail:0 fail:4 skip:29 time:398s
f74d8b31009401f5c871870ada49230a3ee12f66 drm-tip: 2017y-07m-03d-10h-03m-28s UTC integration manifest be80ea2 drm/fb-helper: Remove drm_mode_config_fb.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5090/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Maarten Lankhorst
Remove
drm_mode_config_fb, I don't see the point of it.
To make it clear that it's ok to useplane->fbdirectly, move updrm_drv_uses_atomic_modesetso the code is skipped for atomic drivers that requireplane_state->fb.Signed-off-by Maarten Lankhorst <[email protected]>
Makes sense. Reviewed-by: Daniel Vetter <[email protected]>
Quoted 59 lines
--- drivers/gpu/drm/drm_fb_helper.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-)drivers/gpu/drm/drm_fb_helper.c +4
-18@@ -322,20 +322,6 @@ int drm_fb_helper_debug_enter(struct fb_info *info) }EXPORT_SYMBOL (drm_fb_helper_debug_enter); -/* Find the real fb for a given fb helper CRTC */ -static struct drm_framebuffer *drm_mode_config_fb (struct drm_crtc *crtc) -{ -struct drm_device *dev = crtc->dev; -struct drm_crtc *c; - -drm_for_each_crtc (c, dev) { -if (crtc->base.id == c->base.id) -return c->primary->fb; - } - -return NULL ; -} -/** * drm_fb_helper_debug_leave - implementation for &fb_ops.fb_debug_leave * @info: fbdev registered by the helper @@ -352,8 +338,11 @@ int drm_fb_helper_debug_leave(struct fb_info *info)struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; crtc = mode_set->crtc; +if (drm_drv_uses_atomic_modeset (crtc->dev)) +continue ; + funcs = crtc->helper_private; - fb =drm_mode_config_fb (crtc); + fb = crtc->primary->fb;if (!crtc->enabled)continue ;@@ -366,9 +355,6 @@ int drm_fb_helper_debug_leave(struct fb_info *info)if (funcs->mode_set_base_atomic ==NULL )continue ; -if (drm_drv_uses_atomic_modeset (crtc->dev)) -continue ; -drm_fb_helper_restore_lut_atomic (mode_set->crtc); funcs->mode_set_base_atomic (mode_set->crtc, fb, crtc->x, crtc->y,LEAVE_ATOMIC_MODE_SET );Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx