diff mbox

[v2,09/17] drm/i915: Make __intel_set_mode() take only atomic state as argument

Message ID 1431548627-2527-10-git-send-email-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst May 13, 2015, 8:23 p.m. UTC
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>

The last remaining portion that required the modeset_crtc argument is
converted to deal with all crtcs in the state that need_modeset(). By
doing that, __intel_set_mode() is generic enough, behaving like a commit
function for the atomic state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Ander Conselvan de Oliveira May 15, 2015, 7:42 a.m. UTC | #1
On Wed, 2015-05-13 at 22:23 +0200, Maarten Lankhorst wrote:
> From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> 
> The last remaining portion that required the modeset_crtc argument is
> converted to deal with all crtcs in the state that need_modeset(). By
> doing that, __intel_set_mode() is generic enough, behaving like a commit
> function for the atomic state.

Now that I read this I realized I didn't do a good job writing that
commit message. It refers to the move drm_calc_timestamping_constants()
into intel_modeset_update_state(), which is not part of this patch
anymore, so the text makes even less sense now.

Ander

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index ec548cbb06ee..1c706623f99c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12224,12 +12224,10 @@ static int __intel_set_mode_checks(struct drm_atomic_state *state)
>  	return 0;
>  }
>  
> -static int __intel_set_mode(struct drm_crtc *modeset_crtc,
> -			    struct intel_crtc_state *pipe_config)
> +static int __intel_set_mode(struct drm_atomic_state *state)
>  {
> -	struct drm_device *dev = modeset_crtc->dev;
> +	struct drm_device *dev = state->dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> -	struct drm_atomic_state *state = pipe_config->base.state;
>  	struct drm_crtc *crtc;
>  	struct drm_crtc_state *crtc_state;
>  	int ret = 0;
> @@ -12289,7 +12287,7 @@ static int intel_set_mode_with_config(struct drm_crtc *crtc,
>  {
>  	int ret;
>  
> -	ret = __intel_set_mode(crtc, pipe_config);
> +	ret = __intel_set_mode(pipe_config->base.state);
>  
>  	if (ret == 0)
>  		intel_modeset_check_state(crtc->dev);
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ec548cbb06ee..1c706623f99c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12224,12 +12224,10 @@  static int __intel_set_mode_checks(struct drm_atomic_state *state)
 	return 0;
 }
 
-static int __intel_set_mode(struct drm_crtc *modeset_crtc,
-			    struct intel_crtc_state *pipe_config)
+static int __intel_set_mode(struct drm_atomic_state *state)
 {
-	struct drm_device *dev = modeset_crtc->dev;
+	struct drm_device *dev = state->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct drm_atomic_state *state = pipe_config->base.state;
 	struct drm_crtc *crtc;
 	struct drm_crtc_state *crtc_state;
 	int ret = 0;
@@ -12289,7 +12287,7 @@  static int intel_set_mode_with_config(struct drm_crtc *crtc,
 {
 	int ret;
 
-	ret = __intel_set_mode(crtc, pipe_config);
+	ret = __intel_set_mode(pipe_config->base.state);
 
 	if (ret == 0)
 		intel_modeset_check_state(crtc->dev);