All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/fb-helper: Remove drm_mode_config_fb.
@ 2017-07-03 11:51 Maarten Lankhorst
  2017-07-03 12:07 ` ✗ Fi.CI.BAT: warning for " Patchwork
  2017-07-03 16:52 ` [PATCH] " Daniel Vetter
  0 siblings, 2 replies; 3+ messages in thread
From: Maarten Lankhorst @ 2017-07-03 11:51 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index e49bae10f0ee..0cd2035ac1d1 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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);
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ Fi.CI.BAT: warning for drm/fb-helper: Remove drm_mode_config_fb.
  2017-07-03 11:51 [PATCH] drm/fb-helper: Remove drm_mode_config_fb Maarten Lankhorst
@ 2017-07-03 12:07 ` Patchwork
  2017-07-03 16:52 ` [PATCH] " Daniel Vetter
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-07-03 12:07 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/fb-helper: Remove drm_mode_config_fb.
  2017-07-03 11:51 [PATCH] drm/fb-helper: Remove drm_mode_config_fb Maarten Lankhorst
  2017-07-03 12:07 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2017-07-03 16:52 ` Daniel Vetter
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2017-07-03 16:52 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: intel-gfx, dri-devel

On Mon, Jul 03, 2017 at 01:51:06PM +0200, Maarten Lankhorst wrote:
> 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.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Makes sense. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 22 ++++------------------
>  1 file changed, 4 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index e49bae10f0ee..0cd2035ac1d1 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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);
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-03 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03 11:51 [PATCH] drm/fb-helper: Remove drm_mode_config_fb Maarten Lankhorst
2017-07-03 12:07 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-07-03 16:52 ` [PATCH] " Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.