diff mbox series

[2/2] drm/i915: Don't hide the intel_crtc_atomic_check() call

Message ID 20200925121749.708-2-ville.syrjala@linux.intel.com
State New
Headers show
Series [1/2] drm/i915: Make intel_{enable, disable}_sagv() static | expand

Commit Message

Ville Syrjälä Sept. 25, 2020, 12:17 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Move the intel_crtc_atomic_check() call out from the variable
declarations to a place where we can actually see it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Souza, Jose Sept. 26, 2020, 12:28 a.m. UTC | #1
On Fri, 2020-09-25 at 15:17 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <
> ville.syrjala@linux.intel.com
> >
> 
> Move the intel_crtc_atomic_check() call out from the variable
> declarations to a place where we can actually see it.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Signed-off-by: Ville Syrjälä <
> ville.syrjala@linux.intel.com
> >
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 5a9d933e425a..11862de3d772 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -14844,8 +14844,10 @@ static int intel_atomic_check_crtcs(struct intel_atomic_state *state)
>  	int i;
>  
>  	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
> -		int ret = intel_crtc_atomic_check(state, crtc);
>  		struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> +		int ret;
> +
> +		ret = intel_crtc_atomic_check(state, crtc);
>  		if (ret) {
>  			drm_dbg_atomic(&i915->drm,
>  				       "[CRTC:%d:%s] atomic driver check failed\n",
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 5a9d933e425a..11862de3d772 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -14844,8 +14844,10 @@  static int intel_atomic_check_crtcs(struct intel_atomic_state *state)
 	int i;
 
 	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
-		int ret = intel_crtc_atomic_check(state, crtc);
 		struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+		int ret;
+
+		ret = intel_crtc_atomic_check(state, crtc);
 		if (ret) {
 			drm_dbg_atomic(&i915->drm,
 				       "[CRTC:%d:%s] atomic driver check failed\n",