diff mbox

[v2,1/2] drm/i915: pass mode to ELD write vfuncs

Message ID 1381916088-23330-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Oct. 16, 2013, 9:34 a.m. UTC
This will be needed for setting the HDMI pixel clock for audio
config. No functional changes.

v2: Now with a commit message.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h      |    3 ++-
 drivers/gpu/drm/i915/intel_display.c |   11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

Comments

Jani Nikula Oct. 16, 2013, 9:38 a.m. UTC | #1
Mengdong, I meant to CC you on these two patches. Please have a look.

I also screwed up in-reply-to, was meant to be 
http://mid.gmane.org/cover.1381765995.git.jani.nikula@intel.com

BR,
Jani.


On Wed, 16 Oct 2013, Jani Nikula <jani.nikula@intel.com> wrote:
> This will be needed for setting the HDMI pixel clock for audio
> config. No functional changes.
>
> v2: Now with a commit message.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |    3 ++-
>  drivers/gpu/drm/i915/intel_display.c |   11 +++++++----
>  2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 6106d3d..caee590 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -379,7 +379,8 @@ struct drm_i915_display_funcs {
>  	void (*crtc_disable)(struct drm_crtc *crtc);
>  	void (*off)(struct drm_crtc *crtc);
>  	void (*write_eld)(struct drm_connector *connector,
> -			  struct drm_crtc *crtc);
> +			  struct drm_crtc *crtc,
> +			  struct drm_display_mode *mode);
>  	void (*fdi_link_train)(struct drm_crtc *crtc);
>  	void (*init_clock_gating)(struct drm_device *dev);
>  	int (*queue_flip)(struct drm_device *dev, struct drm_crtc *crtc,
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4f1b636..55740f2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6752,7 +6752,8 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
>  }
>  
>  static void g4x_write_eld(struct drm_connector *connector,
> -			  struct drm_crtc *crtc)
> +			  struct drm_crtc *crtc,
> +			  struct drm_display_mode *mode)
>  {
>  	struct drm_i915_private *dev_priv = connector->dev->dev_private;
>  	uint8_t *eld = connector->eld;
> @@ -6792,7 +6793,8 @@ static void g4x_write_eld(struct drm_connector *connector,
>  }
>  
>  static void haswell_write_eld(struct drm_connector *connector,
> -				     struct drm_crtc *crtc)
> +			      struct drm_crtc *crtc,
> +			      struct drm_display_mode *mode)
>  {
>  	struct drm_i915_private *dev_priv = connector->dev->dev_private;
>  	uint8_t *eld = connector->eld;
> @@ -6879,7 +6881,8 @@ static void haswell_write_eld(struct drm_connector *connector,
>  }
>  
>  static void ironlake_write_eld(struct drm_connector *connector,
> -				     struct drm_crtc *crtc)
> +			       struct drm_crtc *crtc,
> +			       struct drm_display_mode *mode)
>  {
>  	struct drm_i915_private *dev_priv = connector->dev->dev_private;
>  	uint8_t *eld = connector->eld;
> @@ -6974,7 +6977,7 @@ void intel_write_eld(struct drm_encoder *encoder,
>  	connector->eld[6] = drm_av_sync_delay(connector, mode) / 2;
>  
>  	if (dev_priv->display.write_eld)
> -		dev_priv->display.write_eld(connector, crtc);
> +		dev_priv->display.write_eld(connector, crtc, mode);
>  }
>  
>  static void i845_update_cursor(struct drm_crtc *crtc, u32 base)
> -- 
> 1.7.9.5
>
Rodrigo Vivi Oct. 17, 2013, 12:02 p.m. UTC | #2
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

On Wed, Oct 16, 2013 at 6:34 AM, Jani Nikula <jani.nikula@intel.com> wrote:
> This will be needed for setting the HDMI pixel clock for audio
> config. No functional changes.
>
> v2: Now with a commit message.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |    3 ++-
>  drivers/gpu/drm/i915/intel_display.c |   11 +++++++----
>  2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 6106d3d..caee590 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -379,7 +379,8 @@ struct drm_i915_display_funcs {
>         void (*crtc_disable)(struct drm_crtc *crtc);
>         void (*off)(struct drm_crtc *crtc);
>         void (*write_eld)(struct drm_connector *connector,
> -                         struct drm_crtc *crtc);
> +                         struct drm_crtc *crtc,
> +                         struct drm_display_mode *mode);
>         void (*fdi_link_train)(struct drm_crtc *crtc);
>         void (*init_clock_gating)(struct drm_device *dev);
>         int (*queue_flip)(struct drm_device *dev, struct drm_crtc *crtc,
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4f1b636..55740f2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6752,7 +6752,8 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
>  }
>
>  static void g4x_write_eld(struct drm_connector *connector,
> -                         struct drm_crtc *crtc)
> +                         struct drm_crtc *crtc,
> +                         struct drm_display_mode *mode)
>  {
>         struct drm_i915_private *dev_priv = connector->dev->dev_private;
>         uint8_t *eld = connector->eld;
> @@ -6792,7 +6793,8 @@ static void g4x_write_eld(struct drm_connector *connector,
>  }
>
>  static void haswell_write_eld(struct drm_connector *connector,
> -                                    struct drm_crtc *crtc)
> +                             struct drm_crtc *crtc,
> +                             struct drm_display_mode *mode)
>  {
>         struct drm_i915_private *dev_priv = connector->dev->dev_private;
>         uint8_t *eld = connector->eld;
> @@ -6879,7 +6881,8 @@ static void haswell_write_eld(struct drm_connector *connector,
>  }
>
>  static void ironlake_write_eld(struct drm_connector *connector,
> -                                    struct drm_crtc *crtc)
> +                              struct drm_crtc *crtc,
> +                              struct drm_display_mode *mode)
>  {
>         struct drm_i915_private *dev_priv = connector->dev->dev_private;
>         uint8_t *eld = connector->eld;
> @@ -6974,7 +6977,7 @@ void intel_write_eld(struct drm_encoder *encoder,
>         connector->eld[6] = drm_av_sync_delay(connector, mode) / 2;
>
>         if (dev_priv->display.write_eld)
> -               dev_priv->display.write_eld(connector, crtc);
> +               dev_priv->display.write_eld(connector, crtc, mode);
>  }
>
>  static void i845_update_cursor(struct drm_crtc *crtc, u32 base)
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6106d3d..caee590 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -379,7 +379,8 @@  struct drm_i915_display_funcs {
 	void (*crtc_disable)(struct drm_crtc *crtc);
 	void (*off)(struct drm_crtc *crtc);
 	void (*write_eld)(struct drm_connector *connector,
-			  struct drm_crtc *crtc);
+			  struct drm_crtc *crtc,
+			  struct drm_display_mode *mode);
 	void (*fdi_link_train)(struct drm_crtc *crtc);
 	void (*init_clock_gating)(struct drm_device *dev);
 	int (*queue_flip)(struct drm_device *dev, struct drm_crtc *crtc,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4f1b636..55740f2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6752,7 +6752,8 @@  static bool intel_eld_uptodate(struct drm_connector *connector,
 }
 
 static void g4x_write_eld(struct drm_connector *connector,
-			  struct drm_crtc *crtc)
+			  struct drm_crtc *crtc,
+			  struct drm_display_mode *mode)
 {
 	struct drm_i915_private *dev_priv = connector->dev->dev_private;
 	uint8_t *eld = connector->eld;
@@ -6792,7 +6793,8 @@  static void g4x_write_eld(struct drm_connector *connector,
 }
 
 static void haswell_write_eld(struct drm_connector *connector,
-				     struct drm_crtc *crtc)
+			      struct drm_crtc *crtc,
+			      struct drm_display_mode *mode)
 {
 	struct drm_i915_private *dev_priv = connector->dev->dev_private;
 	uint8_t *eld = connector->eld;
@@ -6879,7 +6881,8 @@  static void haswell_write_eld(struct drm_connector *connector,
 }
 
 static void ironlake_write_eld(struct drm_connector *connector,
-				     struct drm_crtc *crtc)
+			       struct drm_crtc *crtc,
+			       struct drm_display_mode *mode)
 {
 	struct drm_i915_private *dev_priv = connector->dev->dev_private;
 	uint8_t *eld = connector->eld;
@@ -6974,7 +6977,7 @@  void intel_write_eld(struct drm_encoder *encoder,
 	connector->eld[6] = drm_av_sync_delay(connector, mode) / 2;
 
 	if (dev_priv->display.write_eld)
-		dev_priv->display.write_eld(connector, crtc);
+		dev_priv->display.write_eld(connector, crtc, mode);
 }
 
 static void i845_update_cursor(struct drm_crtc *crtc, u32 base)