Re: [Intel-gfx] [PATCH 1/7] drm/i915/fbc: move the intel_fbc_can_choose() call out of the loop

2016-11-11 Thread Chris Wilson
On Fri, Nov 11, 2016 at 02:57:35PM -0200, Paulo Zanoni wrote:
> We can just call it earlier, so do it. The goal of the loop is to get
> the plane's CRTC state, and we don't need it in order to call
> intel_fbc_can_choose().
> 
> Signed-off-by: Paulo Zanoni 
Reviewed-by: Chris Wilson 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 1/7] drm/i915/fbc: move the intel_fbc_can_choose() call out of the loop

2016-11-11 Thread Paulo Zanoni
We can just call it earlier, so do it. The goal of the loop is to get
the plane's CRTC state, and we don't need it in order to call
intel_fbc_can_choose().

Signed-off-by: Paulo Zanoni 
---
 drivers/gpu/drm/i915/intel_fbc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index e230d48..ded77bd 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1096,6 +1096,9 @@ void intel_fbc_choose_crtc(struct drm_i915_private 
*dev_priv,
if (!intel_plane_state->base.visible)
continue;
 
+   if (!intel_fbc_can_choose(to_intel_crtc(plane_state->crtc)))
+   continue;
+
for_each_crtc_in_state(state, crtc, crtc_state, j) {
struct intel_crtc_state *intel_crtc_state =
to_intel_crtc_state(crtc_state);
@@ -1103,9 +1106,6 @@ void intel_fbc_choose_crtc(struct drm_i915_private 
*dev_priv,
if (plane_state->crtc != crtc)
continue;
 
-   if (!intel_fbc_can_choose(to_intel_crtc(crtc)))
-   break;
-
intel_crtc_state->enable_fbc = true;
goto out;
}
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx