public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
@ 2017-05-18 19:38 ville.syrjala
  2017-05-18 19:38 ` [PATCH 2/2] drm/i915: Constify load detect mode ville.syrjala
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: ville.syrjala @ 2017-05-18 19:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm_atomic_set_mode_for_crtc() doesn't modify the passed mode, so let's
make it const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic.c | 2 +-
 include/drm/drm_atomic.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index cdec19a86af3..21cb78202c90 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -328,7 +328,7 @@ static s32 __user *get_out_fence_for_crtc(struct drm_atomic_state *state,
  * Zero on success, error code on failure. Cannot return -EDEADLK.
  */
 int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
-				 struct drm_display_mode *mode)
+				 const struct drm_display_mode *mode)
 {
 	struct drm_mode_modeinfo umode;
 
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 8645dcdef031..0196f264a418 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -520,7 +520,7 @@ __drm_atomic_get_current_plane_state(struct drm_atomic_state *state,
 
 int __must_check
 drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
-			     struct drm_display_mode *mode);
+			     const struct drm_display_mode *mode);
 int __must_check
 drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 				  struct drm_property_blob *blob);
-- 
2.10.2

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

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

* [PATCH 2/2] drm/i915: Constify load detect mode
  2017-05-18 19:38 [PATCH 1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() ville.syrjala
@ 2017-05-18 19:38 ` ville.syrjala
  2017-05-22  7:42   ` [Intel-gfx] " Daniel Vetter
  2017-05-18 19:59 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() Patchwork
  2017-05-22  7:41 ` [PATCH 1/2] " Daniel Vetter
  2 siblings, 1 reply; 6+ messages in thread
From: ville.syrjala @ 2017-05-18 19:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Make the mode used for load detection const, and adjust all relevant
functions to accept a const mode.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
 drivers/gpu/drm/i915/intel_drv.h     |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8217ed0e7132..6c08a7d6a0de 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9538,7 +9538,7 @@ static void i9xx_disable_cursor(struct intel_plane *plane,
 
 
 /* VESA 640x480x72Hz mode to set on the pipe */
-static struct drm_display_mode load_detect_mode = {
+static const struct drm_display_mode load_detect_mode = {
 	DRM_MODE("640x480", DRM_MODE_TYPE_DEFAULT, 31500, 640, 664,
 		 704, 832, 0, 480, 489, 491, 520, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
 };
@@ -9573,7 +9573,7 @@ intel_framebuffer_pitch_for_width(int width, int bpp)
 }
 
 static u32
-intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp)
+intel_framebuffer_size_for_mode(const struct drm_display_mode *mode, int bpp)
 {
 	u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp);
 	return PAGE_ALIGN(pitch * mode->vdisplay);
@@ -9581,7 +9581,7 @@ intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp)
 
 static struct drm_framebuffer *
 intel_framebuffer_create_for_mode(struct drm_device *dev,
-				  struct drm_display_mode *mode,
+				  const struct drm_display_mode *mode,
 				  int depth, int bpp)
 {
 	struct drm_framebuffer *fb;
@@ -9608,7 +9608,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev,
 
 static struct drm_framebuffer *
 mode_fits_in_fbdev(struct drm_device *dev,
-		   struct drm_display_mode *mode)
+		   const struct drm_display_mode *mode)
 {
 #ifdef CONFIG_DRM_FBDEV_EMULATION
 	struct drm_i915_private *dev_priv = to_i915(dev);
@@ -9641,7 +9641,7 @@ mode_fits_in_fbdev(struct drm_device *dev,
 
 static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
 					   struct drm_crtc *crtc,
-					   struct drm_display_mode *mode,
+					   const struct drm_display_mode *mode,
 					   struct drm_framebuffer *fb,
 					   int x, int y)
 {
@@ -9675,7 +9675,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
 }
 
 int intel_get_load_detect_pipe(struct drm_connector *connector,
-			       struct drm_display_mode *mode,
+			       const struct drm_display_mode *mode,
 			       struct intel_load_detect_pipe *old,
 			       struct drm_modeset_acquire_ctx *ctx)
 {
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index bd500977b3fc..d2aa92fa7ec4 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1398,7 +1398,7 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
 			 struct intel_digital_port *dport,
 			 unsigned int expected_mask);
 int intel_get_load_detect_pipe(struct drm_connector *connector,
-			       struct drm_display_mode *mode,
+			       const struct drm_display_mode *mode,
 			       struct intel_load_detect_pipe *old,
 			       struct drm_modeset_acquire_ctx *ctx);
 void intel_release_load_detect_pipe(struct drm_connector *connector,
-- 
2.10.2

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

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
  2017-05-18 19:38 [PATCH 1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() ville.syrjala
  2017-05-18 19:38 ` [PATCH 2/2] drm/i915: Constify load detect mode ville.syrjala
@ 2017-05-18 19:59 ` Patchwork
  2017-05-22  7:41 ` [PATCH 1/2] " Daniel Vetter
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-05-18 19:59 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
URL   : https://patchwork.freedesktop.org/series/24645/
State : success

== Summary ==

Series 24645v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/24645/revisions/1/mbox/

Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                fail       -> PASS       (fi-snb-2600) fdo#100007

fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:441s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:436s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:597s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:514s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:491s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:482s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:419s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:413s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:421s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:498s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:459s
fi-kbl-7500u     total:278  pass:255  dwarn:5   dfail:0   fail:0   skip:18  time:461s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:465s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time:580s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:468s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:512s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:443s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:534s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time:400s

ab08cb2750e769d074b2f147c8298ccd0cd08340 drm-tip: 2017y-05m-18d-15h-36m-17s UTC integration manifest
49bb451 drm/i915: Constify load detect mode
1b4c55b drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4748/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
  2017-05-18 19:38 [PATCH 1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() ville.syrjala
  2017-05-18 19:38 ` [PATCH 2/2] drm/i915: Constify load detect mode ville.syrjala
  2017-05-18 19:59 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() Patchwork
@ 2017-05-22  7:41 ` Daniel Vetter
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2017-05-22  7:41 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx, dri-devel

On Thu, May 18, 2017 at 10:38:36PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm_atomic_set_mode_for_crtc() doesn't modify the passed mode, so let's
> make it const.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/drm_atomic.c | 2 +-
>  include/drm/drm_atomic.h     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index cdec19a86af3..21cb78202c90 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -328,7 +328,7 @@ static s32 __user *get_out_fence_for_crtc(struct drm_atomic_state *state,
>   * Zero on success, error code on failure. Cannot return -EDEADLK.
>   */
>  int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
> -				 struct drm_display_mode *mode)
> +				 const struct drm_display_mode *mode)
>  {
>  	struct drm_mode_modeinfo umode;
>  
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index 8645dcdef031..0196f264a418 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -520,7 +520,7 @@ __drm_atomic_get_current_plane_state(struct drm_atomic_state *state,
>  
>  int __must_check
>  drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
> -			     struct drm_display_mode *mode);
> +			     const struct drm_display_mode *mode);
>  int __must_check
>  drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
>  				  struct drm_property_blob *blob);
> -- 
> 2.10.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

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

* Re: [Intel-gfx] [PATCH 2/2] drm/i915: Constify load detect mode
  2017-05-18 19:38 ` [PATCH 2/2] drm/i915: Constify load detect mode ville.syrjala
@ 2017-05-22  7:42   ` Daniel Vetter
  2017-09-05 18:25     ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2017-05-22  7:42 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx, dri-devel

On Thu, May 18, 2017 at 10:38:37PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Make the mode used for load detection const, and adjust all relevant
> functions to accept a const mode.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
>  drivers/gpu/drm/i915/intel_drv.h     |  2 +-
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8217ed0e7132..6c08a7d6a0de 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9538,7 +9538,7 @@ static void i9xx_disable_cursor(struct intel_plane *plane,
>  
>  
>  /* VESA 640x480x72Hz mode to set on the pipe */
> -static struct drm_display_mode load_detect_mode = {
> +static const struct drm_display_mode load_detect_mode = {
>  	DRM_MODE("640x480", DRM_MODE_TYPE_DEFAULT, 31500, 640, 664,
>  		 704, 832, 0, 480, 489, 491, 520, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
>  };
> @@ -9573,7 +9573,7 @@ intel_framebuffer_pitch_for_width(int width, int bpp)
>  }
>  
>  static u32
> -intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp)
> +intel_framebuffer_size_for_mode(const struct drm_display_mode *mode, int bpp)
>  {
>  	u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp);
>  	return PAGE_ALIGN(pitch * mode->vdisplay);
> @@ -9581,7 +9581,7 @@ intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp)
>  
>  static struct drm_framebuffer *
>  intel_framebuffer_create_for_mode(struct drm_device *dev,
> -				  struct drm_display_mode *mode,
> +				  const struct drm_display_mode *mode,
>  				  int depth, int bpp)
>  {
>  	struct drm_framebuffer *fb;
> @@ -9608,7 +9608,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev,
>  
>  static struct drm_framebuffer *
>  mode_fits_in_fbdev(struct drm_device *dev,
> -		   struct drm_display_mode *mode)
> +		   const struct drm_display_mode *mode)
>  {
>  #ifdef CONFIG_DRM_FBDEV_EMULATION
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> @@ -9641,7 +9641,7 @@ mode_fits_in_fbdev(struct drm_device *dev,
>  
>  static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
>  					   struct drm_crtc *crtc,
> -					   struct drm_display_mode *mode,
> +					   const struct drm_display_mode *mode,
>  					   struct drm_framebuffer *fb,
>  					   int x, int y)
>  {
> @@ -9675,7 +9675,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
>  }
>  
>  int intel_get_load_detect_pipe(struct drm_connector *connector,
> -			       struct drm_display_mode *mode,
> +			       const struct drm_display_mode *mode,
>  			       struct intel_load_detect_pipe *old,
>  			       struct drm_modeset_acquire_ctx *ctx)
>  {
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index bd500977b3fc..d2aa92fa7ec4 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1398,7 +1398,7 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
>  			 struct intel_digital_port *dport,
>  			 unsigned int expected_mask);
>  int intel_get_load_detect_pipe(struct drm_connector *connector,
> -			       struct drm_display_mode *mode,
> +			       const struct drm_display_mode *mode,
>  			       struct intel_load_detect_pipe *old,
>  			       struct drm_modeset_acquire_ctx *ctx);
>  void intel_release_load_detect_pipe(struct drm_connector *connector,
> -- 
> 2.10.2
> 
> _______________________________________________
> 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] drm/i915: Constify load detect mode
  2017-05-22  7:42   ` [Intel-gfx] " Daniel Vetter
@ 2017-09-05 18:25     ` Ville Syrjälä
  0 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjälä @ 2017-09-05 18:25 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, dri-devel

On Mon, May 22, 2017 at 09:42:01AM +0200, Daniel Vetter wrote:
> On Thu, May 18, 2017 at 10:38:37PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Make the mode used for load detection const, and adjust all relevant
> > functions to accept a const mode.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thanks. Pushed to dinq.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-09-05 18:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 19:38 [PATCH 1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() ville.syrjala
2017-05-18 19:38 ` [PATCH 2/2] drm/i915: Constify load detect mode ville.syrjala
2017-05-22  7:42   ` [Intel-gfx] " Daniel Vetter
2017-09-05 18:25     ` Ville Syrjälä
2017-05-18 19:59 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() Patchwork
2017-05-22  7:41 ` [PATCH 1/2] " Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox