public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Random cleanups
@ 2015-02-10 19:32 Damien Lespiau
  2015-02-10 19:32 ` [PATCH 01/10] drm/i915: Garbage collect orphaned prototypes Damien Lespiau
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

Ran my cleanup script again and caught a few tiny oversights.

-- 
Damien

Damien Lespiau (10):
  drm/i915: Garbage collect orphaned prototypes
  drm/i915: Make intel_ring_setup_status_page() static
  drm/i915: Remove intel_dsi_cmd.h
  drm/i915: Make intel_lr_context_render_state_init() static
  drm/i915: Make intel_logical_ring_begin() static
  drm/i915: Make intel_logical_ring_advance_and_submit() static
  drm/i915: Make intel_dp_check_link_status() static
  drm/i915: Make intel_dp_unpack_aux() static
  drm/i915: MAke intel_unpin_fb_obj() static
  drm/i915: Remove the IS_SNB_G1 define

 drivers/gpu/drm/i915/i915_drv.h         |   7 -
 drivers/gpu/drm/i915/intel_display.c    |   2 +-
 drivers/gpu/drm/i915/intel_dp.c         |   4 +-
 drivers/gpu/drm/i915/intel_drv.h        |  12 --
 drivers/gpu/drm/i915/intel_dsi_cmd.h    |  39 -----
 drivers/gpu/drm/i915/intel_lrc.c        | 293 ++++++++++++++++----------------
 drivers/gpu/drm/i915/intel_lrc.h        |   9 -
 drivers/gpu/drm/i915/intel_ringbuffer.c | 124 +++++++-------
 drivers/gpu/drm/i915/intel_ringbuffer.h |   1 -
 9 files changed, 212 insertions(+), 279 deletions(-)
 delete mode 100644 drivers/gpu/drm/i915/intel_dsi_cmd.h

-- 
1.8.3.1

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

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

* [PATCH 01/10] drm/i915: Garbage collect orphaned prototypes
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static Damien Lespiau
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

There have been quite a bit of development lately, leaving behing lonely
protypes. Time to bid them farewell.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h  | 4 ----
 drivers/gpu/drm/i915/intel_drv.h | 9 ---------
 2 files changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7dfdd3c..6a020a9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2511,8 +2511,6 @@ extern int i915_max_ioctl;
 
 extern int i915_suspend_legacy(struct drm_device *dev, pm_message_t state);
 extern int i915_resume_legacy(struct drm_device *dev);
-extern int i915_master_create(struct drm_device *dev, struct drm_master *master);
-extern void i915_master_destroy(struct drm_device *dev, struct drm_master *master);
 
 /* i915_params.c */
 struct i915_params {
@@ -3213,8 +3211,6 @@ int i915_reg_read_ioctl(struct drm_device *dev, void *data,
 int i915_get_reset_stats_ioctl(struct drm_device *dev, void *data,
 			       struct drm_file *file);
 
-void intel_notify_mmio_flip(struct intel_engine_cs *ring);
-
 /* overlay */
 extern struct intel_overlay_error_state *intel_overlay_capture_error_state(struct drm_device *dev);
 extern void intel_overlay_print_error_state(struct drm_i915_error_state_buf *e,
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 76b3c20..8052d9c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1038,12 +1038,6 @@ void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
 void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv);
 uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes);
 void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes);
-int intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
-		       struct drm_framebuffer *fb, int crtc_x, int crtc_y,
-		       unsigned int crtc_w, unsigned int crtc_h,
-		       uint32_t src_x, uint32_t src_y,
-		       uint32_t src_w, uint32_t src_h);
-int intel_disable_plane(struct drm_plane *plane);
 void intel_plane_destroy(struct drm_plane *plane);
 void intel_edp_drrs_enable(struct intel_dp *intel_dp);
 void intel_edp_drrs_disable(struct intel_dp *intel_dp);
@@ -1232,9 +1226,6 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob);
 int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane);
 void intel_flush_primary_plane(struct drm_i915_private *dev_priv,
 			       enum plane plane);
-int intel_plane_set_property(struct drm_plane *plane,
-			     struct drm_property *prop,
-			     uint64_t val);
 int intel_plane_restore(struct drm_plane *plane);
 int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
 			      struct drm_file *file_priv);
-- 
1.8.3.1

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

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

* [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
  2015-02-10 19:32 ` [PATCH 01/10] drm/i915: Garbage collect orphaned prototypes Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-11 13:46   ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 03/10] drm/i915: Remove intel_dsi_cmd.h Damien Lespiau
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This function is only used in intel_ringbuffer.c, so restrict it to that
file. The function was moved around to avoid a forward declaration and
group it with its user.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 124 ++++++++++++++++----------------
 drivers/gpu/drm/i915/intel_ringbuffer.h |   1 -
 2 files changed, 62 insertions(+), 63 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 0631780..0a7b1af 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -502,6 +502,68 @@ static void ring_setup_phys_status_page(struct intel_engine_cs *ring)
 	I915_WRITE(HWS_PGA, addr);
 }
 
+void intel_ring_setup_status_page(struct intel_engine_cs *ring)
+{
+	struct drm_device *dev = ring->dev;
+	struct drm_i915_private *dev_priv = ring->dev->dev_private;
+	u32 mmio = 0;
+
+	/* The ring status page addresses are no longer next to the rest of
+	 * the ring registers as of gen7.
+	 */
+	if (IS_GEN7(dev)) {
+		switch (ring->id) {
+		case RCS:
+			mmio = RENDER_HWS_PGA_GEN7;
+			break;
+		case BCS:
+			mmio = BLT_HWS_PGA_GEN7;
+			break;
+		/*
+		 * VCS2 actually doesn't exist on Gen7. Only shut up
+		 * gcc switch check warning
+		 */
+		case VCS2:
+		case VCS:
+			mmio = BSD_HWS_PGA_GEN7;
+			break;
+		case VECS:
+			mmio = VEBOX_HWS_PGA_GEN7;
+			break;
+		}
+	} else if (IS_GEN6(ring->dev)) {
+		mmio = RING_HWS_PGA_GEN6(ring->mmio_base);
+	} else {
+		/* XXX: gen8 returns to sanity */
+		mmio = RING_HWS_PGA(ring->mmio_base);
+	}
+
+	I915_WRITE(mmio, (u32)ring->status_page.gfx_addr);
+	POSTING_READ(mmio);
+
+	/*
+	 * Flush the TLB for this page
+	 *
+	 * FIXME: These two bits have disappeared on gen8, so a question
+	 * arises: do we still need this and if so how should we go about
+	 * invalidating the TLB?
+	 */
+	if (INTEL_INFO(dev)->gen >= 6 && INTEL_INFO(dev)->gen < 8) {
+		u32 reg = RING_INSTPM(ring->mmio_base);
+
+		/* ring should be idle before issuing a sync flush*/
+		WARN_ON((I915_READ_MODE(ring) & MODE_IDLE) == 0);
+
+		I915_WRITE(reg,
+			   _MASKED_BIT_ENABLE(INSTPM_TLB_INVALIDATE |
+					      INSTPM_SYNC_FLUSH));
+		if (wait_for((I915_READ(reg) & INSTPM_SYNC_FLUSH) == 0,
+			     1000))
+			DRM_ERROR("%s: wait for SyncFlush to complete for TLB invalidation timed out\n",
+				  ring->name);
+	}
+}
+
 static bool stop_ring(struct intel_engine_cs *ring)
 {
 	struct drm_i915_private *dev_priv = to_i915(ring->dev);
@@ -1486,68 +1548,6 @@ i8xx_ring_put_irq(struct intel_engine_cs *ring)
 	spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
 }
 
-void intel_ring_setup_status_page(struct intel_engine_cs *ring)
-{
-	struct drm_device *dev = ring->dev;
-	struct drm_i915_private *dev_priv = ring->dev->dev_private;
-	u32 mmio = 0;
-
-	/* The ring status page addresses are no longer next to the rest of
-	 * the ring registers as of gen7.
-	 */
-	if (IS_GEN7(dev)) {
-		switch (ring->id) {
-		case RCS:
-			mmio = RENDER_HWS_PGA_GEN7;
-			break;
-		case BCS:
-			mmio = BLT_HWS_PGA_GEN7;
-			break;
-		/*
-		 * VCS2 actually doesn't exist on Gen7. Only shut up
-		 * gcc switch check warning
-		 */
-		case VCS2:
-		case VCS:
-			mmio = BSD_HWS_PGA_GEN7;
-			break;
-		case VECS:
-			mmio = VEBOX_HWS_PGA_GEN7;
-			break;
-		}
-	} else if (IS_GEN6(ring->dev)) {
-		mmio = RING_HWS_PGA_GEN6(ring->mmio_base);
-	} else {
-		/* XXX: gen8 returns to sanity */
-		mmio = RING_HWS_PGA(ring->mmio_base);
-	}
-
-	I915_WRITE(mmio, (u32)ring->status_page.gfx_addr);
-	POSTING_READ(mmio);
-
-	/*
-	 * Flush the TLB for this page
-	 *
-	 * FIXME: These two bits have disappeared on gen8, so a question
-	 * arises: do we still need this and if so how should we go about
-	 * invalidating the TLB?
-	 */
-	if (INTEL_INFO(dev)->gen >= 6 && INTEL_INFO(dev)->gen < 8) {
-		u32 reg = RING_INSTPM(ring->mmio_base);
-
-		/* ring should be idle before issuing a sync flush*/
-		WARN_ON((I915_READ_MODE(ring) & MODE_IDLE) == 0);
-
-		I915_WRITE(reg,
-			   _MASKED_BIT_ENABLE(INSTPM_TLB_INVALIDATE |
-					      INSTPM_SYNC_FLUSH));
-		if (wait_for((I915_READ(reg) & INSTPM_SYNC_FLUSH) == 0,
-			     1000))
-			DRM_ERROR("%s: wait for SyncFlush to complete for TLB invalidation timed out\n",
-				  ring->name);
-	}
-}
-
 static int
 bsd_ring_flush(struct intel_engine_cs *ring,
 	       u32     invalidate_domains,
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 714f3fd..b6c484f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -425,7 +425,6 @@ int intel_init_blt_ring_buffer(struct drm_device *dev);
 int intel_init_vebox_ring_buffer(struct drm_device *dev);
 
 u64 intel_ring_get_active_head(struct intel_engine_cs *ring);
-void intel_ring_setup_status_page(struct intel_engine_cs *ring);
 
 int init_workarounds_ring(struct intel_engine_cs *ring);
 
-- 
1.8.3.1

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

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

* [PATCH 03/10] drm/i915: Remove intel_dsi_cmd.h
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
  2015-02-10 19:32 ` [PATCH 01/10] drm/i915: Garbage collect orphaned prototypes Damien Lespiau
  2015-02-10 19:32 ` [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-11  9:15   ` Jani Nikula
  2015-02-10 19:32 ` [PATCH 04/10] drm/i915: Make intel_lr_context_render_state_init() static Damien Lespiau
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This header has been unusued since:

  commit 063c86f60ad4064b2cf62041bee8c6389e180b76
  Author: Jani Nikula <jani.nikula@intel.com>
  Date:   Fri Jan 16 14:27:27 2015 +0200

      drm/i915/dsi: remove intel_dsi_cmd.c and the unused functions therein

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi_cmd.h | 39 ------------------------------------
 1 file changed, 39 deletions(-)
 delete mode 100644 drivers/gpu/drm/i915/intel_dsi_cmd.h

diff --git a/drivers/gpu/drm/i915/intel_dsi_cmd.h b/drivers/gpu/drm/i915/intel_dsi_cmd.h
deleted file mode 100644
index 8867790..0000000
--- a/drivers/gpu/drm/i915/intel_dsi_cmd.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright © 2013 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Jani Nikula <jani.nikula@intel.com>
- */
-
-#ifndef _INTEL_DSI_DSI_H
-#define _INTEL_DSI_DSI_H
-
-#include <drm/drmP.h>
-#include <drm/drm_crtc.h>
-#include <video/mipi_display.h>
-#include "i915_drv.h"
-#include "intel_drv.h"
-#include "intel_dsi.h"
-
-void dsi_hs_mode_enable(struct intel_dsi *intel_dsi, bool enable,
-						enum port port);
-
-#endif /* _INTEL_DSI_DSI_H */
-- 
1.8.3.1

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

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

* [PATCH 04/10] drm/i915: Make intel_lr_context_render_state_init() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (2 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 03/10] drm/i915: Remove intel_dsi_cmd.h Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 05/10] drm/i915: Make intel_logical_ring_begin() static Damien Lespiau
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This function is only used in intel_lrc.c, so restrict it to that file. The
function was moved around to avoid a forward declaration and group it with its
user.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 66 ++++++++++++++++++++--------------------
 drivers/gpu/drm/i915/intel_lrc.h |  2 --
 2 files changed, 33 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 5d88c7a..a818497 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1336,6 +1336,39 @@ static int gen8_emit_request(struct intel_ringbuffer *ringbuf,
 	return 0;
 }
 
+static int intel_lr_context_render_state_init(struct intel_engine_cs *ring,
+					      struct intel_context *ctx)
+{
+	struct intel_ringbuffer *ringbuf = ctx->engine[ring->id].ringbuf;
+	struct render_state so;
+	struct drm_i915_file_private *file_priv = ctx->file_priv;
+	struct drm_file *file = file_priv ? file_priv->file : NULL;
+	int ret;
+
+	ret = i915_gem_render_state_prepare(ring, &so);
+	if (ret)
+		return ret;
+
+	if (so.rodata == NULL)
+		return 0;
+
+	ret = ring->emit_bb_start(ringbuf,
+			ctx,
+			so.ggtt_offset,
+			I915_DISPATCH_SECURE);
+	if (ret)
+		goto out;
+
+	i915_vma_move_to_active(i915_gem_obj_to_ggtt(so.obj), ring);
+
+	ret = __i915_add_request(ring, file, so.obj);
+	/* intel_logical_ring_add_request moves object to inactive if it
+	 * fails */
+out:
+	i915_gem_render_state_fini(&so);
+	return ret;
+}
+
 static int gen8_init_rcs_context(struct intel_engine_cs *ring,
 		       struct intel_context *ctx)
 {
@@ -1604,39 +1637,6 @@ cleanup_render_ring:
 	return ret;
 }
 
-int intel_lr_context_render_state_init(struct intel_engine_cs *ring,
-				       struct intel_context *ctx)
-{
-	struct intel_ringbuffer *ringbuf = ctx->engine[ring->id].ringbuf;
-	struct render_state so;
-	struct drm_i915_file_private *file_priv = ctx->file_priv;
-	struct drm_file *file = file_priv ? file_priv->file : NULL;
-	int ret;
-
-	ret = i915_gem_render_state_prepare(ring, &so);
-	if (ret)
-		return ret;
-
-	if (so.rodata == NULL)
-		return 0;
-
-	ret = ring->emit_bb_start(ringbuf,
-			ctx,
-			so.ggtt_offset,
-			I915_DISPATCH_SECURE);
-	if (ret)
-		goto out;
-
-	i915_vma_move_to_active(i915_gem_obj_to_ggtt(so.obj), ring);
-
-	ret = __i915_add_request(ring, file, so.obj);
-	/* intel_logical_ring_add_request moves object to inactive if it
-	 * fails */
-out:
-	i915_gem_render_state_fini(&so);
-	return ret;
-}
-
 static u32
 make_rpcs(struct drm_device *dev)
 {
diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h
index 6f2d7da..94057b9 100644
--- a/drivers/gpu/drm/i915/intel_lrc.h
+++ b/drivers/gpu/drm/i915/intel_lrc.h
@@ -70,8 +70,6 @@ int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,
 			     int num_dwords);
 
 /* Logical Ring Contexts */
-int intel_lr_context_render_state_init(struct intel_engine_cs *ring,
-				       struct intel_context *ctx);
 void intel_lr_context_free(struct intel_context *ctx);
 int intel_lr_context_deferred_create(struct intel_context *ctx,
 				     struct intel_engine_cs *ring);
-- 
1.8.3.1

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

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

* [PATCH 05/10] drm/i915: Make intel_logical_ring_begin() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (3 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 04/10] drm/i915: Make intel_lr_context_render_state_init() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 06/10] drm/i915: Make intel_logical_ring_advance_and_submit() static Damien Lespiau
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This function is only used in intel_lrc.c, so restrict it to that file.

One user of intel_logical_ring_begin() that was defined before the
function was moved after it (it's less code movement than moving
intel_logical_ring_begin() and its dependencies.

intel_logical_ring_begin() was also removed from the documentation
generation as it's not exposed from its compilation unit anymore.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 218 +++++++++++++++++++--------------------
 drivers/gpu/drm/i915/intel_lrc.h |   3 -
 2 files changed, 109 insertions(+), 112 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index a818497..45d92f4 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -610,112 +610,6 @@ static int execlists_move_to_gpu(struct intel_ringbuffer *ringbuf,
 	return logical_ring_invalidate_all_caches(ringbuf, ctx);
 }
 
-/**
- * execlists_submission() - submit a batchbuffer for execution, Execlists style
- * @dev: DRM device.
- * @file: DRM file.
- * @ring: Engine Command Streamer to submit to.
- * @ctx: Context to employ for this submission.
- * @args: execbuffer call arguments.
- * @vmas: list of vmas.
- * @batch_obj: the batchbuffer to submit.
- * @exec_start: batchbuffer start virtual address pointer.
- * @flags: translated execbuffer call flags.
- *
- * This is the evil twin version of i915_gem_ringbuffer_submission. It abstracts
- * away the submission details of the execbuffer ioctl call.
- *
- * Return: non-zero if the submission fails.
- */
-int intel_execlists_submission(struct drm_device *dev, struct drm_file *file,
-			       struct intel_engine_cs *ring,
-			       struct intel_context *ctx,
-			       struct drm_i915_gem_execbuffer2 *args,
-			       struct list_head *vmas,
-			       struct drm_i915_gem_object *batch_obj,
-			       u64 exec_start, u32 flags)
-{
-	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct intel_ringbuffer *ringbuf = ctx->engine[ring->id].ringbuf;
-	int instp_mode;
-	u32 instp_mask;
-	int ret;
-
-	instp_mode = args->flags & I915_EXEC_CONSTANTS_MASK;
-	instp_mask = I915_EXEC_CONSTANTS_MASK;
-	switch (instp_mode) {
-	case I915_EXEC_CONSTANTS_REL_GENERAL:
-	case I915_EXEC_CONSTANTS_ABSOLUTE:
-	case I915_EXEC_CONSTANTS_REL_SURFACE:
-		if (instp_mode != 0 && ring != &dev_priv->ring[RCS]) {
-			DRM_DEBUG("non-0 rel constants mode on non-RCS\n");
-			return -EINVAL;
-		}
-
-		if (instp_mode != dev_priv->relative_constants_mode) {
-			if (instp_mode == I915_EXEC_CONSTANTS_REL_SURFACE) {
-				DRM_DEBUG("rel surface constants mode invalid on gen5+\n");
-				return -EINVAL;
-			}
-
-			/* The HW changed the meaning on this bit on gen6 */
-			instp_mask &= ~I915_EXEC_CONSTANTS_REL_SURFACE;
-		}
-		break;
-	default:
-		DRM_DEBUG("execbuf with unknown constants: %d\n", instp_mode);
-		return -EINVAL;
-	}
-
-	if (args->num_cliprects != 0) {
-		DRM_DEBUG("clip rectangles are only valid on pre-gen5\n");
-		return -EINVAL;
-	} else {
-		if (args->DR4 == 0xffffffff) {
-			DRM_DEBUG("UXA submitting garbage DR4, fixing up\n");
-			args->DR4 = 0;
-		}
-
-		if (args->DR1 || args->DR4 || args->cliprects_ptr) {
-			DRM_DEBUG("0 cliprects but dirt in cliprects fields\n");
-			return -EINVAL;
-		}
-	}
-
-	if (args->flags & I915_EXEC_GEN7_SOL_RESET) {
-		DRM_DEBUG("sol reset is gen7 only\n");
-		return -EINVAL;
-	}
-
-	ret = execlists_move_to_gpu(ringbuf, ctx, vmas);
-	if (ret)
-		return ret;
-
-	if (ring == &dev_priv->ring[RCS] &&
-	    instp_mode != dev_priv->relative_constants_mode) {
-		ret = intel_logical_ring_begin(ringbuf, ctx, 4);
-		if (ret)
-			return ret;
-
-		intel_logical_ring_emit(ringbuf, MI_NOOP);
-		intel_logical_ring_emit(ringbuf, MI_LOAD_REGISTER_IMM(1));
-		intel_logical_ring_emit(ringbuf, INSTPM);
-		intel_logical_ring_emit(ringbuf, instp_mask << 16 | instp_mode);
-		intel_logical_ring_advance(ringbuf);
-
-		dev_priv->relative_constants_mode = instp_mode;
-	}
-
-	ret = ring->emit_bb_start(ringbuf, ctx, exec_start, flags);
-	if (ret)
-		return ret;
-
-	i915_gem_execbuffer_move_to_active(vmas, ring);
-	i915_gem_execbuffer_retire_commands(dev, file, ring, batch_obj);
-
-	return 0;
-}
-
 void intel_execlists_retire_requests(struct intel_engine_cs *ring)
 {
 	struct drm_i915_gem_request *req, *tmp;
@@ -1029,7 +923,7 @@ static int logical_ring_prepare(struct intel_ringbuffer *ringbuf,
 	return 0;
 }
 
-/**
+/*
  * intel_logical_ring_begin() - prepare the logical ringbuffer to accept some commands
  *
  * @ringbuf: Logical ringbuffer.
@@ -1042,8 +936,8 @@ static int logical_ring_prepare(struct intel_ringbuffer *ringbuf,
  *
  * Return: non-zero if the ringbuffer is not ready to be written to.
  */
-int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,
-			     struct intel_context *ctx, int num_dwords)
+static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,
+				    struct intel_context *ctx, int num_dwords)
 {
 	struct intel_engine_cs *ring = ringbuf->ring;
 	struct drm_device *dev = ring->dev;
@@ -1068,6 +962,112 @@ int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,
 	return 0;
 }
 
+/**
+ * execlists_submission() - submit a batchbuffer for execution, Execlists style
+ * @dev: DRM device.
+ * @file: DRM file.
+ * @ring: Engine Command Streamer to submit to.
+ * @ctx: Context to employ for this submission.
+ * @args: execbuffer call arguments.
+ * @vmas: list of vmas.
+ * @batch_obj: the batchbuffer to submit.
+ * @exec_start: batchbuffer start virtual address pointer.
+ * @flags: translated execbuffer call flags.
+ *
+ * This is the evil twin version of i915_gem_ringbuffer_submission. It abstracts
+ * away the submission details of the execbuffer ioctl call.
+ *
+ * Return: non-zero if the submission fails.
+ */
+int intel_execlists_submission(struct drm_device *dev, struct drm_file *file,
+			       struct intel_engine_cs *ring,
+			       struct intel_context *ctx,
+			       struct drm_i915_gem_execbuffer2 *args,
+			       struct list_head *vmas,
+			       struct drm_i915_gem_object *batch_obj,
+			       u64 exec_start, u32 flags)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct intel_ringbuffer *ringbuf = ctx->engine[ring->id].ringbuf;
+	int instp_mode;
+	u32 instp_mask;
+	int ret;
+
+	instp_mode = args->flags & I915_EXEC_CONSTANTS_MASK;
+	instp_mask = I915_EXEC_CONSTANTS_MASK;
+	switch (instp_mode) {
+	case I915_EXEC_CONSTANTS_REL_GENERAL:
+	case I915_EXEC_CONSTANTS_ABSOLUTE:
+	case I915_EXEC_CONSTANTS_REL_SURFACE:
+		if (instp_mode != 0 && ring != &dev_priv->ring[RCS]) {
+			DRM_DEBUG("non-0 rel constants mode on non-RCS\n");
+			return -EINVAL;
+		}
+
+		if (instp_mode != dev_priv->relative_constants_mode) {
+			if (instp_mode == I915_EXEC_CONSTANTS_REL_SURFACE) {
+				DRM_DEBUG("rel surface constants mode invalid on gen5+\n");
+				return -EINVAL;
+			}
+
+			/* The HW changed the meaning on this bit on gen6 */
+			instp_mask &= ~I915_EXEC_CONSTANTS_REL_SURFACE;
+		}
+		break;
+	default:
+		DRM_DEBUG("execbuf with unknown constants: %d\n", instp_mode);
+		return -EINVAL;
+	}
+
+	if (args->num_cliprects != 0) {
+		DRM_DEBUG("clip rectangles are only valid on pre-gen5\n");
+		return -EINVAL;
+	} else {
+		if (args->DR4 == 0xffffffff) {
+			DRM_DEBUG("UXA submitting garbage DR4, fixing up\n");
+			args->DR4 = 0;
+		}
+
+		if (args->DR1 || args->DR4 || args->cliprects_ptr) {
+			DRM_DEBUG("0 cliprects but dirt in cliprects fields\n");
+			return -EINVAL;
+		}
+	}
+
+	if (args->flags & I915_EXEC_GEN7_SOL_RESET) {
+		DRM_DEBUG("sol reset is gen7 only\n");
+		return -EINVAL;
+	}
+
+	ret = execlists_move_to_gpu(ringbuf, ctx, vmas);
+	if (ret)
+		return ret;
+
+	if (ring == &dev_priv->ring[RCS] &&
+	    instp_mode != dev_priv->relative_constants_mode) {
+		ret = intel_logical_ring_begin(ringbuf, ctx, 4);
+		if (ret)
+			return ret;
+
+		intel_logical_ring_emit(ringbuf, MI_NOOP);
+		intel_logical_ring_emit(ringbuf, MI_LOAD_REGISTER_IMM(1));
+		intel_logical_ring_emit(ringbuf, INSTPM);
+		intel_logical_ring_emit(ringbuf, instp_mask << 16 | instp_mode);
+		intel_logical_ring_advance(ringbuf);
+
+		dev_priv->relative_constants_mode = instp_mode;
+	}
+
+	ret = ring->emit_bb_start(ringbuf, ctx, exec_start, flags);
+	if (ret)
+		return ret;
+
+	i915_gem_execbuffer_move_to_active(vmas, ring);
+	i915_gem_execbuffer_retire_commands(dev, file, ring, batch_obj);
+
+	return 0;
+}
+
 static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
 					       struct intel_context *ctx)
 {
diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h
index 94057b9..454ecb0 100644
--- a/drivers/gpu/drm/i915/intel_lrc.h
+++ b/drivers/gpu/drm/i915/intel_lrc.h
@@ -65,9 +65,6 @@ static inline void intel_logical_ring_emit(struct intel_ringbuffer *ringbuf,
 	iowrite32(data, ringbuf->virtual_start + ringbuf->tail);
 	ringbuf->tail += 4;
 }
-int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,
-			     struct intel_context *ctx,
-			     int num_dwords);
 
 /* Logical Ring Contexts */
 void intel_lr_context_free(struct intel_context *ctx);
-- 
1.8.3.1

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

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

* [PATCH 06/10] drm/i915: Make intel_logical_ring_advance_and_submit() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (4 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 05/10] drm/i915: Make intel_logical_ring_begin() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 07/10] drm/i915: Make intel_dp_check_link_status() static Damien Lespiau
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This function is only used in intel_lrc.c, so restrict it to that file. The
function was moved around to avoid a forward declaration and group it with its
user.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 9 +++++----
 drivers/gpu/drm/i915/intel_lrc.h | 4 ----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 45d92f4..5c04510 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -679,7 +679,7 @@ int logical_ring_flush_all_caches(struct intel_ringbuffer *ringbuf,
 	return 0;
 }
 
-/**
+/*
  * intel_logical_ring_advance_and_submit() - advance the tail and submit the workload
  * @ringbuf: Logical Ringbuffer to advance.
  *
@@ -688,9 +688,10 @@ int logical_ring_flush_all_caches(struct intel_ringbuffer *ringbuf,
  * on a queue waiting for the ELSP to be ready to accept a new context submission. At that
  * point, the tail *inside* the context is updated and the ELSP written to.
  */
-void intel_logical_ring_advance_and_submit(struct intel_ringbuffer *ringbuf,
-					   struct intel_context *ctx,
-					   struct drm_i915_gem_request *request)
+static void
+intel_logical_ring_advance_and_submit(struct intel_ringbuffer *ringbuf,
+				      struct intel_context *ctx,
+				      struct drm_i915_gem_request *request)
 {
 	struct intel_engine_cs *ring = ringbuf->ring;
 
diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h
index 454ecb0..98910b5 100644
--- a/drivers/gpu/drm/i915/intel_lrc.h
+++ b/drivers/gpu/drm/i915/intel_lrc.h
@@ -40,10 +40,6 @@ int intel_logical_rings_init(struct drm_device *dev);
 
 int logical_ring_flush_all_caches(struct intel_ringbuffer *ringbuf,
 				  struct intel_context *ctx);
-void intel_logical_ring_advance_and_submit(
-				struct intel_ringbuffer *ringbuf,
-				struct intel_context *ctx,
-				struct drm_i915_gem_request *request);
 /**
  * intel_logical_ring_advance() - advance the ringbuffer tail
  * @ringbuf: Ringbuffer to advance.
-- 
1.8.3.1

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

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

* [PATCH 07/10] drm/i915: Make intel_dp_check_link_status() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (5 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 06/10] drm/i915: Make intel_logical_ring_advance_and_submit() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 08/10] drm/i915: Make intel_dp_unpack_aux() static Damien Lespiau
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This function is only used in intel_dp.c since:

  commit 0e32b39ceed665bfa4a77a4bc307b6652b991632
  Author: Dave Airlie <airlied@redhat.com>
  Date:   Fri May 2 14:02:48 2014 +1000

      drm/i915: add DP 1.2 MST support (v0.7)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c  | 2 +-
 drivers/gpu/drm/i915/intel_drv.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 4a60c6a..b9966dd 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3806,7 +3806,7 @@ go_again:
  *  3. Use Link Training from 2.5.3.3 and 3.5.1.3
  *  4. Check link status on receipt of hot-plug interrupt
  */
-void
+static void
 intel_dp_check_link_status(struct intel_dp *intel_dp)
 {
 	struct drm_device *dev = intel_dp_to_dev(intel_dp);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8052d9c..f056036 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1018,7 +1018,6 @@ void intel_dp_complete_link_train(struct intel_dp *intel_dp);
 void intel_dp_stop_link_train(struct intel_dp *intel_dp);
 void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode);
 void intel_dp_encoder_destroy(struct drm_encoder *encoder);
-void intel_dp_check_link_status(struct intel_dp *intel_dp);
 int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
 bool intel_dp_compute_config(struct intel_encoder *encoder,
 			     struct intel_crtc_state *pipe_config);
-- 
1.8.3.1

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

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

* [PATCH 08/10] drm/i915: Make intel_dp_unpack_aux() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (6 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 07/10] drm/i915: Make intel_dp_check_link_status() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 09/10] drm/i915: MAke intel_unpin_fb_obj() static Damien Lespiau
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This was introduced in:

  commit 0bc12bcb1b9686d7011f16410ba17ed0740167c3
  Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
  Date:   Fri Nov 14 08:52:28 2014 -0800

      drm/i915: Introduce intel_psr.c

Put the unpack function is unused at this date.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c  | 2 +-
 drivers/gpu/drm/i915/intel_drv.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b9966dd..ae40127 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -243,7 +243,7 @@ uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes)
 	return v;
 }
 
-void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
+static void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
 {
 	int i;
 	if (dst_bytes > 4)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f056036..8c43479 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1036,7 +1036,6 @@ int intel_dp_max_link_bw(struct intel_dp *intel_dp);
 void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
 void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv);
 uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes);
-void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes);
 void intel_plane_destroy(struct drm_plane *plane);
 void intel_edp_drrs_enable(struct intel_dp *intel_dp);
 void intel_edp_drrs_disable(struct intel_dp *intel_dp);
-- 
1.8.3.1

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

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

* [PATCH 09/10] drm/i915: MAke intel_unpin_fb_obj() static
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (7 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 08/10] drm/i915: Make intel_dp_unpack_aux() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-10 19:32 ` [PATCH 10/10] drm/i915: Remove the IS_SNB_G1 define Damien Lespiau
  2015-02-11  8:12 ` [PATCH 00/10] Random cleanups Daniel Vetter
  10 siblings, 0 replies; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

This function is not used outside of intel_display.c since;

  commit cf4c7c12258ed9367f4fc45238f5f50d2db892c1
  Author: Matt Roper <matthew.d.roper@intel.com>
  Date:   Thu Dec 4 10:27:42 2014 -0800

      drm/i915: Make all plane disables use 'update_plane' (v5)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 drivers/gpu/drm/i915/intel_drv.h     | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2655b63..736d254 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2282,7 +2282,7 @@ err_interruptible:
 	return ret;
 }
 
-void intel_unpin_fb_obj(struct drm_i915_gem_object *obj)
+static void intel_unpin_fb_obj(struct drm_i915_gem_object *obj)
 {
 	WARN_ON(!mutex_is_locked(&obj->base.dev->struct_mutex));
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8c43479..1df1a14 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -933,7 +933,6 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
 int intel_pin_and_fence_fb_obj(struct drm_plane *plane,
 			       struct drm_framebuffer *fb,
 			       struct intel_engine_cs *pipelined);
-void intel_unpin_fb_obj(struct drm_i915_gem_object *obj);
 struct drm_framebuffer *
 __intel_framebuffer_create(struct drm_device *dev,
 			   struct drm_mode_fb_cmd2 *mode_cmd,
-- 
1.8.3.1

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

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

* [PATCH 10/10] drm/i915: Remove the IS_SNB_G1 define
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (8 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 09/10] drm/i915: MAke intel_unpin_fb_obj() static Damien Lespiau
@ 2015-02-10 19:32 ` Damien Lespiau
  2015-02-11 11:35   ` shuang.he
  2015-02-11  8:12 ` [PATCH 00/10] Random cleanups Daniel Vetter
  10 siblings, 1 reply; 16+ messages in thread
From: Damien Lespiau @ 2015-02-10 19:32 UTC (permalink / raw)
  To: intel-gfx

The last (only?) user of this was removed in:

  commit 2208d655a91f9879bd9a39ff9df05dd668b3512c
  Author: Daniel Vetter <daniel.vetter@ffwll.ch>
  Date:   Fri Nov 14 09:25:29 2014 +0100

    drm/i915: drop WaSetupGtModeTdRowDispatch:snb

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6a020a9..88b56c4 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2373,9 +2373,6 @@ struct drm_i915_cmd_table {
 #define IS_IVB_GT1(dev)		(INTEL_DEVID(dev) == 0x0156 || \
 				 INTEL_DEVID(dev) == 0x0152 || \
 				 INTEL_DEVID(dev) == 0x015a)
-#define IS_SNB_GT1(dev)		(INTEL_DEVID(dev) == 0x0102 || \
-				 INTEL_DEVID(dev) == 0x0106 || \
-				 INTEL_DEVID(dev) == 0x010A)
 #define IS_VALLEYVIEW(dev)	(INTEL_INFO(dev)->is_valleyview)
 #define IS_CHERRYVIEW(dev)	(INTEL_INFO(dev)->is_valleyview && IS_GEN8(dev))
 #define IS_HASWELL(dev)	(INTEL_INFO(dev)->is_haswell)
-- 
1.8.3.1

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

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

* Re: [PATCH 00/10] Random cleanups
  2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
                   ` (9 preceding siblings ...)
  2015-02-10 19:32 ` [PATCH 10/10] drm/i915: Remove the IS_SNB_G1 define Damien Lespiau
@ 2015-02-11  8:12 ` Daniel Vetter
  10 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2015-02-11  8:12 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Tue, Feb 10, 2015 at 07:32:15PM +0000, Damien Lespiau wrote:
> Ran my cleanup script again and caught a few tiny oversights.

Fixed three tiny spelling things and merged them all.

Thanks, Daniel
> 
> -- 
> Damien
> 
> Damien Lespiau (10):
>   drm/i915: Garbage collect orphaned prototypes
>   drm/i915: Make intel_ring_setup_status_page() static
>   drm/i915: Remove intel_dsi_cmd.h
>   drm/i915: Make intel_lr_context_render_state_init() static
>   drm/i915: Make intel_logical_ring_begin() static
>   drm/i915: Make intel_logical_ring_advance_and_submit() static
>   drm/i915: Make intel_dp_check_link_status() static
>   drm/i915: Make intel_dp_unpack_aux() static
>   drm/i915: MAke intel_unpin_fb_obj() static
>   drm/i915: Remove the IS_SNB_G1 define
> 
>  drivers/gpu/drm/i915/i915_drv.h         |   7 -
>  drivers/gpu/drm/i915/intel_display.c    |   2 +-
>  drivers/gpu/drm/i915/intel_dp.c         |   4 +-
>  drivers/gpu/drm/i915/intel_drv.h        |  12 --
>  drivers/gpu/drm/i915/intel_dsi_cmd.h    |  39 -----
>  drivers/gpu/drm/i915/intel_lrc.c        | 293 ++++++++++++++++----------------
>  drivers/gpu/drm/i915/intel_lrc.h        |   9 -
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 124 +++++++-------
>  drivers/gpu/drm/i915/intel_ringbuffer.h |   1 -
>  9 files changed, 212 insertions(+), 279 deletions(-)
>  delete mode 100644 drivers/gpu/drm/i915/intel_dsi_cmd.h
> 
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 03/10] drm/i915: Remove intel_dsi_cmd.h
  2015-02-10 19:32 ` [PATCH 03/10] drm/i915: Remove intel_dsi_cmd.h Damien Lespiau
@ 2015-02-11  9:15   ` Jani Nikula
  0 siblings, 0 replies; 16+ messages in thread
From: Jani Nikula @ 2015-02-11  9:15 UTC (permalink / raw)
  To: Damien Lespiau, intel-gfx

On Tue, 10 Feb 2015, Damien Lespiau <damien.lespiau@intel.com> wrote:
> This header has been unusued since:
>
>   commit 063c86f60ad4064b2cf62041bee8c6389e180b76
>   Author: Jani Nikula <jani.nikula@intel.com>
>   Date:   Fri Jan 16 14:27:27 2015 +0200
>
>       drm/i915/dsi: remove intel_dsi_cmd.c and the unused functions therein
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dsi_cmd.h | 39 ------------------------------------
>  1 file changed, 39 deletions(-)
>  delete mode 100644 drivers/gpu/drm/i915/intel_dsi_cmd.h
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi_cmd.h b/drivers/gpu/drm/i915/intel_dsi_cmd.h
> deleted file mode 100644
> index 8867790..0000000
> --- a/drivers/gpu/drm/i915/intel_dsi_cmd.h
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -/*
> - * Copyright © 2013 Intel Corporation
> - *
> - * Permission is hereby granted, free of charge, to any person obtaining a
> - * copy of this software and associated documentation files (the "Software"),
> - * to deal in the Software without restriction, including without limitation
> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> - * and/or sell copies of the Software, and to permit persons to whom the
> - * Software is furnished to do so, subject to the following conditions:
> - *
> - * The above copyright notice and this permission notice (including the next
> - * paragraph) shall be included in all copies or substantial portions of the
> - * Software.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> - * DEALINGS IN THE SOFTWARE.
> - *
> - * Author: Jani Nikula <jani.nikula@intel.com>
> - */
> -
> -#ifndef _INTEL_DSI_DSI_H
> -#define _INTEL_DSI_DSI_H
> -
> -#include <drm/drmP.h>
> -#include <drm/drm_crtc.h>
> -#include <video/mipi_display.h>
> -#include "i915_drv.h"
> -#include "intel_drv.h"
> -#include "intel_dsi.h"
> -
> -void dsi_hs_mode_enable(struct intel_dsi *intel_dsi, bool enable,
> -						enum port port);
> -
> -#endif /* _INTEL_DSI_DSI_H */
> -- 
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 10/10] drm/i915: Remove the IS_SNB_G1 define
  2015-02-10 19:32 ` [PATCH 10/10] drm/i915: Remove the IS_SNB_G1 define Damien Lespiau
@ 2015-02-11 11:35   ` shuang.he
  0 siblings, 0 replies; 16+ messages in thread
From: shuang.he @ 2015-02-11 11:35 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, damien.lespiau

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5752
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV              +7                 275/283              282/283
ILK                 -2              310/310              308/310
SNB              +2                 320/346              322/346
IVB                                  380/384              380/384
BYT                                  296/296              296/296
HSW              +3-1              422/428              424/428
BDW                                  318/333              318/333
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt_gem_userptr_blits_coherency-sync      CRASH(5, M7)PASS(2, M7)      PASS(1, M7)
 PNV  igt_gem_userptr_blits_coherency-unsync      CRASH(5, M7)PASS(3, M7)      PASS(1, M7)
 PNV  igt_gem_userptr_blits_create-destroy-sync      NRUN(1, M7)PASS(8, M7)      PASS(1, M7)
 PNV  igt_gen3_render_linear_blits      FAIL(3, M7)PASS(2, M7)      PASS(1, M7)
 PNV  igt_gen3_render_mixed_blits      FAIL(2, M7)PASS(3, M7)      PASS(1, M7)
 PNV  igt_gen3_render_tiledx_blits      FAIL(4, M7)TIMEOUT(1, M7)PASS(4, M7)      PASS(1, M7)
 PNV  igt_gen3_render_tiledy_blits      FAIL(3, M7)PASS(4, M7)      PASS(1, M7)
*ILK  igt_gem_seqno_wrap      PASS(2, M26)      DMESG_WARN(1, M26)
 ILK  igt_drv_suspend_fence-restore-tiled2untiled      DMESG_WARN(1, M26)PASS(1, M26)      DMESG_WARN(1, M26)
*SNB  igt_kms_flip_bo-too-big      BLACKLIST(1, M35)      PASS(1, M35)
*SNB  igt_kms_flip_bo-too-big-interruptible      BLACKLIST(1, M35)      PASS(1, M35)
*HSW  igt_gem_pwrite_pread_uncached-copy-performance      PASS(2, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_flip_bo-too-big      BLACKLIST(1, M40)      PASS(1, M40)
*HSW  igt_kms_flip_bo-too-big-interruptible      BLACKLIST(1, M40)      PASS(1, M40)
 HSW  igt_kms_flip_plain-flip-fb-recreate-interruptible      TIMEOUT(6, M40)PASS(5, M40)      PASS(1, M40)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static
  2015-02-10 19:32 ` [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static Damien Lespiau
@ 2015-02-11 13:46   ` Damien Lespiau
  2015-02-11 16:05     ` Daniel Vetter
  0 siblings, 1 reply; 16+ messages in thread
From: Damien Lespiau @ 2015-02-11 13:46 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter

On Tue, Feb 10, 2015 at 07:32:17PM +0000, Damien Lespiau wrote:
> This function is only used in intel_ringbuffer.c, so restrict it to that
> file. The function was moved around to avoid a forward declaration and
> group it with its user.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 124 ++++++++++++++++----------------
>  drivers/gpu/drm/i915/intel_ringbuffer.h |   1 -
>  2 files changed, 62 insertions(+), 63 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 0631780..0a7b1af 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -502,6 +502,68 @@ static void ring_setup_phys_status_page(struct intel_engine_cs *ring)
>  	I915_WRITE(HWS_PGA, addr);
>  }
>  
> +void intel_ring_setup_status_page(struct intel_engine_cs *ring)
> +{

I've actually manged to screw this one up. Daniel could you ammend this?
or do you want a new patch? (fengguang's 0day bot even generated a patch
for us).

-- 
Damien

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

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

* Re: [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static
  2015-02-11 13:46   ` Damien Lespiau
@ 2015-02-11 16:05     ` Daniel Vetter
  0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2015-02-11 16:05 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: daniel.vetter, intel-gfx

On Wed, Feb 11, 2015 at 01:46:19PM +0000, Damien Lespiau wrote:
> On Tue, Feb 10, 2015 at 07:32:17PM +0000, Damien Lespiau wrote:
> > This function is only used in intel_ringbuffer.c, so restrict it to that
> > file. The function was moved around to avoid a forward declaration and
> > group it with its user.
> > 
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_ringbuffer.c | 124 ++++++++++++++++----------------
> >  drivers/gpu/drm/i915/intel_ringbuffer.h |   1 -
> >  2 files changed, 62 insertions(+), 63 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > index 0631780..0a7b1af 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > @@ -502,6 +502,68 @@ static void ring_setup_phys_status_page(struct intel_engine_cs *ring)
> >  	I915_WRITE(HWS_PGA, addr);
> >  }
> >  
> > +void intel_ring_setup_status_page(struct intel_engine_cs *ring)
> > +{
> 
> I've actually manged to screw this one up. Daniel could you ammend this?
> or do you want a new patch? (fengguang's 0day bot even generated a patch
> for us).

Already squashed in the 0day bot bugfix ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-02-11 16:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 19:32 [PATCH 00/10] Random cleanups Damien Lespiau
2015-02-10 19:32 ` [PATCH 01/10] drm/i915: Garbage collect orphaned prototypes Damien Lespiau
2015-02-10 19:32 ` [PATCH 02/10] drm/i915: Make intel_ring_setup_status_page() static Damien Lespiau
2015-02-11 13:46   ` Damien Lespiau
2015-02-11 16:05     ` Daniel Vetter
2015-02-10 19:32 ` [PATCH 03/10] drm/i915: Remove intel_dsi_cmd.h Damien Lespiau
2015-02-11  9:15   ` Jani Nikula
2015-02-10 19:32 ` [PATCH 04/10] drm/i915: Make intel_lr_context_render_state_init() static Damien Lespiau
2015-02-10 19:32 ` [PATCH 05/10] drm/i915: Make intel_logical_ring_begin() static Damien Lespiau
2015-02-10 19:32 ` [PATCH 06/10] drm/i915: Make intel_logical_ring_advance_and_submit() static Damien Lespiau
2015-02-10 19:32 ` [PATCH 07/10] drm/i915: Make intel_dp_check_link_status() static Damien Lespiau
2015-02-10 19:32 ` [PATCH 08/10] drm/i915: Make intel_dp_unpack_aux() static Damien Lespiau
2015-02-10 19:32 ` [PATCH 09/10] drm/i915: MAke intel_unpin_fb_obj() static Damien Lespiau
2015-02-10 19:32 ` [PATCH 10/10] drm/i915: Remove the IS_SNB_G1 define Damien Lespiau
2015-02-11 11:35   ` shuang.he
2015-02-11  8:12 ` [PATCH 00/10] Random cleanups Daniel Vetter

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