All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] drm/i915: the great header refactoring, part three
@ 2019-05-02 15:02 Jani Nikula
  2019-05-02 15:02 ` [PATCH 01/13] drm/i915/dvo: move DVO chip types to intel_dvo.c Jani Nikula
                   ` (17 more replies)
  0 siblings, 18 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Continue the header refactoring started in [1] and [2].

BR,
Jani.

[1] https://patchwork.freedesktop.org/series/59022/
[2] https://patchwork.freedesktop.org/series/60060/

Jani Nikula (13):
  drm/i915/dvo: move DVO chip types to intel_dvo.c
  drm/i915/dsi: move operation mode types to intel_dsi.h
  drm/i915: move ranges to intel_display.c
  drm/i915: remove unused/stale macros and comments from intel_drv.h
  drm/i915/csr: move CSR version macros to intel_csr.h
  drm/i915: extract intel_dpio_phy.h from i915_drv.h
  drm/i915: extract intel_lpe_audio.h from i915_drv.h
  drm/i915: extract intel_acpi.h from i915_drv.h
  drm/i915: extract i915_debugfs.h from i915_drv.h
  drm/i915: move i915_vgacntrl_reg() where needed
  drm/i915: make i915_utils.h self-contained
  drm/i915: move more generic utils to i915_utils.h
  drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c

 drivers/gpu/drm/i915/Makefile                 |   2 +-
 drivers/gpu/drm/i915/Makefile.header-test     |   6 +
 drivers/gpu/drm/i915/i915_debugfs.c           |   2 +
 drivers/gpu/drm/i915/i915_debugfs.h           |  20 +++
 drivers/gpu/drm/i915/i915_drv.c               |   8 +-
 drivers/gpu/drm/i915/i915_drv.h               | 145 ----------------
 drivers/gpu/drm/i915/i915_gpu_error.c         |   1 +
 drivers/gpu/drm/i915/i915_irq.c               |   1 +
 drivers/gpu/drm/i915/i915_suspend.c           |   3 +-
 drivers/gpu/drm/i915/i915_utils.h             | 159 +++++++++++++++++-
 drivers/gpu/drm/i915/intel_acpi.c             |   3 +
 drivers/gpu/drm/i915/intel_acpi.h             |  17 ++
 drivers/gpu/drm/i915/intel_audio.c            |   2 +-
 drivers/gpu/drm/i915/intel_bios.c             |   2 +
 drivers/gpu/drm/i915/intel_crt.c              |   1 +
 drivers/gpu/drm/i915/intel_csr.h              |   4 +
 drivers/gpu/drm/i915/intel_ddi.c              |   2 +
 drivers/gpu/drm/i915/intel_display.c          |  29 +++-
 drivers/gpu/drm/i915/intel_dp.c               |   2 +
 drivers/gpu/drm/i915/intel_dp_mst.c           |   1 +
 drivers/gpu/drm/i915/intel_dpio_phy.c         |   1 +
 drivers/gpu/drm/i915/intel_dpio_phy.h         |  58 +++++++
 drivers/gpu/drm/i915/intel_dpll_mgr.c         |   1 +
 drivers/gpu/drm/i915/intel_drv.h              | 140 ---------------
 drivers/gpu/drm/i915/intel_dsi.h              |   3 +
 drivers/gpu/drm/i915/intel_dvo.c              |   6 +
 .../drm/i915/{intel_i2c.c => intel_gmbus.c}   |  27 ++-
 drivers/gpu/drm/i915/intel_gmbus.h            |  27 +++
 drivers/gpu/drm/i915/intel_hdmi.c             |   3 +
 drivers/gpu/drm/i915/intel_lpe_audio.c        |   8 +-
 drivers/gpu/drm/i915/intel_lpe_audio.h        |  22 +++
 drivers/gpu/drm/i915/intel_lvds.c             |   1 +
 drivers/gpu/drm/i915/intel_pipe_crc.h         |   3 +
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   1 +
 drivers/gpu/drm/i915/intel_sdvo.c             |   1 +
 35 files changed, 408 insertions(+), 304 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_debugfs.h
 create mode 100644 drivers/gpu/drm/i915/intel_acpi.h
 create mode 100644 drivers/gpu/drm/i915/intel_dpio_phy.h
 rename drivers/gpu/drm/i915/{intel_i2c.c => intel_gmbus.c} (98%)
 create mode 100644 drivers/gpu/drm/i915/intel_gmbus.h
 create mode 100644 drivers/gpu/drm/i915/intel_lpe_audio.h

-- 
2.20.1

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

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

* [PATCH 01/13] drm/i915/dvo: move DVO chip types to intel_dvo.c
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 02/13] drm/i915/dsi: move operation mode types to intel_dsi.h Jani Nikula
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from intel_drv.h with the minimal change.

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

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 57ae396..ab11c3 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -184,11 +184,6 @@ enum intel_output_type {
 	INTEL_OUTPUT_DP_MST = 11,
 };
 
-#define INTEL_DVO_CHIP_NONE 0
-#define INTEL_DVO_CHIP_LVDS 1
-#define INTEL_DVO_CHIP_TMDS 2
-#define INTEL_DVO_CHIP_TVOUT 4
-
 #define INTEL_DSI_VIDEO_MODE	0
 #define INTEL_DSI_COMMAND_MODE	1
 
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 930013..79a43f 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -39,6 +39,11 @@
 #include "intel_dvo_dev.h"
 #include "intel_panel.h"
 
+#define INTEL_DVO_CHIP_NONE	0
+#define INTEL_DVO_CHIP_LVDS	1
+#define INTEL_DVO_CHIP_TMDS	2
+#define INTEL_DVO_CHIP_TVOUT	4
+
 #define SIL164_ADDR	0x38
 #define CH7xxx_ADDR	0x76
 #define TFP410_ADDR	0x38
-- 
2.20.1

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

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

* [PATCH 02/13] drm/i915/dsi: move operation mode types to intel_dsi.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
  2019-05-02 15:02 ` [PATCH 01/13] drm/i915/dvo: move DVO chip types to intel_dvo.c Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 03/13] drm/i915: move ranges to intel_display.c Jani Nikula
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from intel_drv.h with the minimal change.

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

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ab11c3..25a5fb 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -184,9 +184,6 @@ enum intel_output_type {
 	INTEL_OUTPUT_DP_MST = 11,
 };
 
-#define INTEL_DSI_VIDEO_MODE	0
-#define INTEL_DSI_COMMAND_MODE	1
-
 struct intel_framebuffer {
 	struct drm_framebuffer base;
 	struct intel_rotation_info rot_info;
diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h
index 1d1e6b..f9b9006 100644
--- a/drivers/gpu/drm/i915/intel_dsi.h
+++ b/drivers/gpu/drm/i915/intel_dsi.h
@@ -28,6 +28,9 @@
 #include <drm/drm_mipi_dsi.h>
 #include "intel_drv.h"
 
+#define INTEL_DSI_VIDEO_MODE	0
+#define INTEL_DSI_COMMAND_MODE	1
+
 /* Dual Link support */
 #define DSI_DUAL_LINK_NONE		0
 #define DSI_DUAL_LINK_FRONT_BACK	1
-- 
2.20.1

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

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

* [PATCH 03/13] drm/i915: move ranges to intel_display.c
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
  2019-05-02 15:02 ` [PATCH 01/13] drm/i915/dvo: move DVO chip types to intel_dvo.c Jani Nikula
  2019-05-02 15:02 ` [PATCH 02/13] drm/i915/dsi: move operation mode types to intel_dsi.h Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 04/13] drm/i915: remove unused/stale macros and comments from intel_drv.h Jani Nikula
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from intel_drv.h with the minimal change.

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

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dd65d7..6ebe000 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5062,6 +5062,21 @@ u16 skl_scaler_calc_phase(int sub, int scale, bool chroma_cosited)
 	return ((phase >> 2) & PS_PHASE_MASK) | trip;
 }
 
+#define SKL_MIN_SRC_W 8
+#define SKL_MAX_SRC_W 4096
+#define SKL_MIN_SRC_H 8
+#define SKL_MAX_SRC_H 4096
+#define SKL_MIN_DST_W 8
+#define SKL_MAX_DST_W 4096
+#define SKL_MIN_DST_H 8
+#define SKL_MAX_DST_H 4096
+#define ICL_MAX_SRC_W 5120
+#define ICL_MAX_SRC_H 4096
+#define ICL_MAX_DST_W 5120
+#define ICL_MAX_DST_H 4096
+#define SKL_MIN_YUV_420_SRC_W 16
+#define SKL_MIN_YUV_420_SRC_H 16
+
 static int
 skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
 		  unsigned int scaler_user, int *scaler_id,
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 25a5fb..709647 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -668,21 +668,6 @@ struct intel_initial_plane_config {
 	u8 rotation;
 };
 
-#define SKL_MIN_SRC_W 8
-#define SKL_MAX_SRC_W 4096
-#define SKL_MIN_SRC_H 8
-#define SKL_MAX_SRC_H 4096
-#define SKL_MIN_DST_W 8
-#define SKL_MAX_DST_W 4096
-#define SKL_MIN_DST_H 8
-#define SKL_MAX_DST_H 4096
-#define ICL_MAX_SRC_W 5120
-#define ICL_MAX_SRC_H 4096
-#define ICL_MAX_DST_W 5120
-#define ICL_MAX_DST_H 4096
-#define SKL_MIN_YUV_420_SRC_W 16
-#define SKL_MIN_YUV_420_SRC_H 16
-
 struct intel_scaler {
 	int in_use;
 	u32 mode;
-- 
2.20.1

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

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

* [PATCH 04/13] drm/i915: remove unused/stale macros and comments from intel_drv.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (2 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 03/13] drm/i915: move ranges to intel_display.c Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 05/13] drm/i915/csr: move CSR version macros to intel_csr.h Jani Nikula
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from intel_drv.h.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 709647..addf6f 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -158,15 +158,6 @@ struct drm_printer;
  * Display related stuff
  */
 
-/* store information about an Ixxx DVO */
-/* The i830->i865 use multiple DVOs with multiple i2cs */
-/* the i915, i945 have a single sDVO i2c bus - which is different */
-#define MAX_OUTPUTS 6
-/* maximum connectors per crtcs in the mode set */
-
-#define INTEL_I2C_BUS_DVO 1
-#define INTEL_I2C_BUS_SDVO 2
-
 /* these are outputs from the chip - integrated only
    external chips are via DVO or SDVO output */
 enum intel_output_type {
-- 
2.20.1

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

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

* [PATCH 05/13] drm/i915/csr: move CSR version macros to intel_csr.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (3 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 04/13] drm/i915: remove unused/stale macros and comments from intel_drv.h Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 06/13] drm/i915: extract intel_dpio_phy.h from i915_drv.h Jani Nikula
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from i915_drv.h.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c   | 1 +
 drivers/gpu/drm/i915/i915_drv.h       | 4 ----
 drivers/gpu/drm/i915/i915_gpu_error.c | 1 +
 drivers/gpu/drm/i915/intel_csr.h      | 4 ++++
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0e4dff..0d7d19 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -36,6 +36,7 @@
 
 #include "i915_gem_context.h"
 #include "i915_irq.h"
+#include "intel_csr.h"
 #include "intel_dp.h"
 #include "intel_drv.h"
 #include "intel_fbc.h"
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 9a634b..9e701d 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -345,10 +345,6 @@ struct drm_i915_display_funcs {
 	void (*load_luts)(const struct intel_crtc_state *crtc_state);
 };
 
-#define CSR_VERSION(major, minor)	((major) << 16 | (minor))
-#define CSR_VERSION_MAJOR(version)	((version) >> 16)
-#define CSR_VERSION_MINOR(version)	((version) & 0xffff)
-
 struct intel_csr {
 	struct work_struct work;
 	const char *fw_path;
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index e1b858..4f85cbd 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -39,6 +39,7 @@
 #include "i915_drv.h"
 #include "i915_gpu_error.h"
 #include "intel_atomic.h"
+#include "intel_csr.h"
 #include "intel_overlay.h"
 
 static inline const struct intel_engine_cs *
diff --git a/drivers/gpu/drm/i915/intel_csr.h b/drivers/gpu/drm/i915/intel_csr.h
index 17a32c..03c64f8 100644
--- a/drivers/gpu/drm/i915/intel_csr.h
+++ b/drivers/gpu/drm/i915/intel_csr.h
@@ -8,6 +8,10 @@
 
 struct drm_i915_private;
 
+#define CSR_VERSION(major, minor)	((major) << 16 | (minor))
+#define CSR_VERSION_MAJOR(version)	((version) >> 16)
+#define CSR_VERSION_MINOR(version)	((version) & 0xffff)
+
 void intel_csr_ucode_init(struct drm_i915_private *i915);
 void intel_csr_load_program(struct drm_i915_private *i915);
 void intel_csr_ucode_fini(struct drm_i915_private *i915);
-- 
2.20.1

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

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

* [PATCH 06/13] drm/i915: extract intel_dpio_phy.h from i915_drv.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (4 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 05/13] drm/i915/csr: move CSR version macros to intel_csr.h Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 07/13] drm/i915: extract intel_lpe_audio.h " Jani Nikula
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

It used to be handy that we only had a couple of headers, but over time
i915_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test |  1 +
 drivers/gpu/drm/i915/i915_drv.h           | 41 ----------------
 drivers/gpu/drm/i915/intel_ddi.c          |  1 +
 drivers/gpu/drm/i915/intel_dp.c           |  1 +
 drivers/gpu/drm/i915/intel_dp_mst.c       |  1 +
 drivers/gpu/drm/i915/intel_dpio_phy.c     |  1 +
 drivers/gpu/drm/i915/intel_dpio_phy.h     | 58 +++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_dpll_mgr.c     |  1 +
 drivers/gpu/drm/i915/intel_hdmi.c         |  1 +
 drivers/gpu/drm/i915/intel_runtime_pm.c   |  1 +
 10 files changed, 66 insertions(+), 41 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_dpio_phy.h

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index 95e4ee..459b84 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -28,6 +28,7 @@ header_test := \
 	intel_dp_aux_backlight.h \
 	intel_dp_link_training.h \
 	intel_dp_mst.h \
+	intel_dpio_phy.h \
 	intel_dpll_mgr.h \
 	intel_drv.h \
 	intel_dsi.h \
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 9e701d..85cc5e1 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3313,47 +3313,6 @@ intel_display_capture_error_state(struct drm_i915_private *dev_priv);
 extern void intel_display_print_error_state(struct drm_i915_error_state_buf *e,
 					    struct intel_display_error_state *error);
 
-/* intel_dpio_phy.c */
-void bxt_port_to_phy_channel(struct drm_i915_private *dev_priv, enum port port,
-			     enum dpio_phy *phy, enum dpio_channel *ch);
-void bxt_ddi_phy_set_signal_level(struct drm_i915_private *dev_priv,
-				  enum port port, u32 margin, u32 scale,
-				  u32 enable, u32 deemphasis);
-void bxt_ddi_phy_init(struct drm_i915_private *dev_priv, enum dpio_phy phy);
-void bxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy);
-bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,
-			    enum dpio_phy phy);
-bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
-			      enum dpio_phy phy);
-u8 bxt_ddi_phy_calc_lane_lat_optim_mask(u8 lane_count);
-void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder *encoder,
-				     u8 lane_lat_optim_mask);
-u8 bxt_ddi_phy_get_lane_lat_optim_mask(struct intel_encoder *encoder);
-
-void chv_set_phy_signal_level(struct intel_encoder *encoder,
-			      u32 deemph_reg_value, u32 margin_reg_value,
-			      bool uniq_trans_scale);
-void chv_data_lane_soft_reset(struct intel_encoder *encoder,
-			      const struct intel_crtc_state *crtc_state,
-			      bool reset);
-void chv_phy_pre_pll_enable(struct intel_encoder *encoder,
-			    const struct intel_crtc_state *crtc_state);
-void chv_phy_pre_encoder_enable(struct intel_encoder *encoder,
-				const struct intel_crtc_state *crtc_state);
-void chv_phy_release_cl2_override(struct intel_encoder *encoder);
-void chv_phy_post_pll_disable(struct intel_encoder *encoder,
-			      const struct intel_crtc_state *old_crtc_state);
-
-void vlv_set_phy_signal_level(struct intel_encoder *encoder,
-			      u32 demph_reg_value, u32 preemph_reg_value,
-			      u32 uniqtranscale_reg_value, u32 tx3_demph);
-void vlv_phy_pre_pll_enable(struct intel_encoder *encoder,
-			    const struct intel_crtc_state *crtc_state);
-void vlv_phy_pre_encoder_enable(struct intel_encoder *encoder,
-				const struct intel_crtc_state *crtc_state);
-void vlv_phy_reset_lanes(struct intel_encoder *encoder,
-			 const struct intel_crtc_state *old_crtc_state);
-
 #define __I915_REG_OP(op__, dev_priv__, ...) \
 	intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__)
 
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index f5f58f..ec6ed93 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -34,6 +34,7 @@
 #include "intel_ddi.h"
 #include "intel_dp.h"
 #include "intel_dp_link_training.h"
+#include "intel_dpio_phy.h"
 #include "intel_drv.h"
 #include "intel_dsi.h"
 #include "intel_fifo_underrun.h"
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 4e7b8d..04d64b 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -50,6 +50,7 @@
 #include "intel_dp.h"
 #include "intel_dp_link_training.h"
 #include "intel_dp_mst.h"
+#include "intel_dpio_phy.h"
 #include "intel_drv.h"
 #include "intel_fifo_underrun.h"
 #include "intel_hdcp.h"
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 725518..0caf64 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -34,6 +34,7 @@
 #include "intel_ddi.h"
 #include "intel_dp.h"
 #include "intel_dp_mst.h"
+#include "intel_dpio_phy.h"
 #include "intel_drv.h"
 
 static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
diff --git a/drivers/gpu/drm/i915/intel_dpio_phy.c b/drivers/gpu/drm/i915/intel_dpio_phy.c
index d80887b5..bdbe41 100644
--- a/drivers/gpu/drm/i915/intel_dpio_phy.c
+++ b/drivers/gpu/drm/i915/intel_dpio_phy.c
@@ -22,6 +22,7 @@
  */
 
 #include "intel_dp.h"
+#include "intel_dpio_phy.h"
 #include "intel_drv.h"
 #include "intel_sideband.h"
 
diff --git a/drivers/gpu/drm/i915/intel_dpio_phy.h b/drivers/gpu/drm/i915/intel_dpio_phy.h
new file mode 100644
index 000000..f418aa
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_dpio_phy.h
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_DPIO_PHY_H__
+#define __INTEL_DPIO_PHY_H__
+
+#include <linux/types.h>
+
+enum dpio_channel;
+enum dpio_phy;
+enum port;
+struct drm_i915_private;
+struct intel_crtc_state;
+struct intel_encoder;
+
+void bxt_port_to_phy_channel(struct drm_i915_private *dev_priv, enum port port,
+			     enum dpio_phy *phy, enum dpio_channel *ch);
+void bxt_ddi_phy_set_signal_level(struct drm_i915_private *dev_priv,
+				  enum port port, u32 margin, u32 scale,
+				  u32 enable, u32 deemphasis);
+void bxt_ddi_phy_init(struct drm_i915_private *dev_priv, enum dpio_phy phy);
+void bxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy);
+bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,
+			    enum dpio_phy phy);
+bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
+			      enum dpio_phy phy);
+u8 bxt_ddi_phy_calc_lane_lat_optim_mask(u8 lane_count);
+void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder *encoder,
+				     u8 lane_lat_optim_mask);
+u8 bxt_ddi_phy_get_lane_lat_optim_mask(struct intel_encoder *encoder);
+
+void chv_set_phy_signal_level(struct intel_encoder *encoder,
+			      u32 deemph_reg_value, u32 margin_reg_value,
+			      bool uniq_trans_scale);
+void chv_data_lane_soft_reset(struct intel_encoder *encoder,
+			      const struct intel_crtc_state *crtc_state,
+			      bool reset);
+void chv_phy_pre_pll_enable(struct intel_encoder *encoder,
+			    const struct intel_crtc_state *crtc_state);
+void chv_phy_pre_encoder_enable(struct intel_encoder *encoder,
+				const struct intel_crtc_state *crtc_state);
+void chv_phy_release_cl2_override(struct intel_encoder *encoder);
+void chv_phy_post_pll_disable(struct intel_encoder *encoder,
+			      const struct intel_crtc_state *old_crtc_state);
+
+void vlv_set_phy_signal_level(struct intel_encoder *encoder,
+			      u32 demph_reg_value, u32 preemph_reg_value,
+			      u32 uniqtranscale_reg_value, u32 tx3_demph);
+void vlv_phy_pre_pll_enable(struct intel_encoder *encoder,
+			    const struct intel_crtc_state *crtc_state);
+void vlv_phy_pre_encoder_enable(struct intel_encoder *encoder,
+				const struct intel_crtc_state *crtc_state);
+void vlv_phy_reset_lanes(struct intel_encoder *encoder,
+			 const struct intel_crtc_state *old_crtc_state);
+
+#endif /* __INTEL_DPIO_PHY_H__ */
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c
index dda5dd..8f731a 100644
--- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
@@ -21,6 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include "intel_dpio_phy.h"
 #include "intel_dpll_mgr.h"
 #include "intel_drv.h"
 
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f8440c..571e6b 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -45,6 +45,7 @@
 #include "intel_connector.h"
 #include "intel_ddi.h"
 #include "intel_dp.h"
+#include "intel_dpio_phy.h"
 #include "intel_drv.h"
 #include "intel_fifo_underrun.h"
 #include "intel_hdcp.h"
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 30e7cb..d11d6c 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -38,6 +38,7 @@
 #include "intel_crt.h"
 #include "intel_csr.h"
 #include "intel_dp.h"
+#include "intel_dpio_phy.h"
 #include "intel_drv.h"
 #include "intel_hotplug.h"
 #include "intel_sideband.h"
-- 
2.20.1

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

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

* [PATCH 07/13] drm/i915: extract intel_lpe_audio.h from i915_drv.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (5 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 06/13] drm/i915: extract intel_dpio_phy.h from i915_drv.h Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 08/13] drm/i915: extract intel_acpi.h " Jani Nikula
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

It used to be handy that we only had a couple of headers, but over time
i915_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test |  1 +
 drivers/gpu/drm/i915/i915_drv.h           |  8 --------
 drivers/gpu/drm/i915/i915_irq.c           |  1 +
 drivers/gpu/drm/i915/intel_audio.c        |  2 +-
 drivers/gpu/drm/i915/intel_lpe_audio.c    |  8 +++++---
 drivers/gpu/drm/i915/intel_lpe_audio.h    | 22 ++++++++++++++++++++++
 6 files changed, 30 insertions(+), 12 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_lpe_audio.h

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index 459b84..4375ff4 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -42,6 +42,7 @@ header_test := \
 	intel_hdcp.h \
 	intel_hdmi.h \
 	intel_hotplug.h \
+	intel_lpe_audio.h \
 	intel_lspcon.h \
 	intel_lvds.h \
 	intel_overlay.h \
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 85cc5e1..91efe28 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3247,14 +3247,6 @@ extern int i915_restore_state(struct drm_i915_private *dev_priv);
 void i915_setup_sysfs(struct drm_i915_private *dev_priv);
 void i915_teardown_sysfs(struct drm_i915_private *dev_priv);
 
-/* intel_lpe_audio.c */
-int  intel_lpe_audio_init(struct drm_i915_private *dev_priv);
-void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv);
-void intel_lpe_audio_irq_handler(struct drm_i915_private *dev_priv);
-void intel_lpe_audio_notify(struct drm_i915_private *dev_priv,
-			    enum pipe pipe, enum port port,
-			    const void *eld, int ls_clock, bool dp_output);
-
 /* intel_i2c.c */
 extern int intel_setup_gmbus(struct drm_i915_private *dev_priv);
 extern void intel_teardown_gmbus(struct drm_i915_private *dev_priv);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index e31137b..233211 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -43,6 +43,7 @@
 #include "intel_drv.h"
 #include "intel_fifo_underrun.h"
 #include "intel_hotplug.h"
+#include "intel_lpe_audio.h"
 #include "intel_psr.h"
 
 /**
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 5c0b73..840daff12 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -26,11 +26,11 @@
 
 #include <drm/drm_edid.h>
 #include <drm/i915_component.h>
-#include <drm/intel_lpe_audio.h>
 
 #include "i915_drv.h"
 #include "intel_audio.h"
 #include "intel_drv.h"
+#include "intel_lpe_audio.h"
 
 /**
  * DOC: High Definition Audio over HDMI and Display Port
diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.c b/drivers/gpu/drm/i915/intel_lpe_audio.c
index f8239bca..b19800 100644
--- a/drivers/gpu/drm/i915/intel_lpe_audio.c
+++ b/drivers/gpu/drm/i915/intel_lpe_audio.c
@@ -61,16 +61,18 @@
  */
 
 #include <linux/acpi.h>
+#include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/irq.h>
 #include <linux/pci.h>
-#include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
 
-#include "i915_drv.h"
-#include <linux/delay.h>
 #include <drm/intel_lpe_audio.h>
 
+#include "i915_drv.h"
+#include "intel_lpe_audio.h"
+
 #define HAS_LPE_AUDIO(dev_priv) ((dev_priv)->lpe_audio.platdev != NULL)
 
 static struct platform_device *
diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.h b/drivers/gpu/drm/i915/intel_lpe_audio.h
new file mode 100644
index 000000..f848c5
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_lpe_audio.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_LPE_AUDIO_H__
+#define __INTEL_LPE_AUDIO_H__
+
+#include <linux/types.h>
+
+enum pipe;
+enum port;
+struct drm_i915_private;
+
+int  intel_lpe_audio_init(struct drm_i915_private *dev_priv);
+void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv);
+void intel_lpe_audio_irq_handler(struct drm_i915_private *dev_priv);
+void intel_lpe_audio_notify(struct drm_i915_private *dev_priv,
+			    enum pipe pipe, enum port port,
+			    const void *eld, int ls_clock, bool dp_output);
+
+#endif /* __INTEL_LPE_AUDIO_H__ */
-- 
2.20.1

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

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

* [PATCH 08/13] drm/i915: extract intel_acpi.h from i915_drv.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (6 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 07/13] drm/i915: extract intel_lpe_audio.h " Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 09/13] drm/i915: extract i915_debugfs.h " Jani Nikula
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

It used to be handy that we only had a couple of headers, but over time
i915_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test |  1 +
 drivers/gpu/drm/i915/i915_drv.c           |  1 +
 drivers/gpu/drm/i915/i915_drv.h           |  9 ---------
 drivers/gpu/drm/i915/intel_acpi.c         |  3 +++
 drivers/gpu/drm/i915/intel_acpi.h         | 17 +++++++++++++++++
 drivers/gpu/drm/i915/intel_display.c      |  1 +
 6 files changed, 23 insertions(+), 9 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_acpi.h

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index 4375ff4..c1fa85 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -13,6 +13,7 @@ header_test := \
 	i915_reg.h \
 	i915_scheduler_types.h \
 	i915_timeline_types.h \
+	intel_acpi.h \
 	intel_atomic.h \
 	intel_atomic_plane.h \
 	intel_audio.h \
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 21dac5..c011a1b 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -57,6 +57,7 @@
 #include "i915_query.h"
 #include "i915_trace.h"
 #include "i915_vgpu.h"
+#include "intel_acpi.h"
 #include "intel_audio.h"
 #include "intel_cdclk.h"
 #include "intel_csr.h"
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 91efe28..6ddc3d 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3264,15 +3264,6 @@ static inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
 }
 extern void intel_i2c_reset(struct drm_i915_private *dev_priv);
 
-/* intel_acpi.c */
-#ifdef CONFIG_ACPI
-extern void intel_register_dsm_handler(void);
-extern void intel_unregister_dsm_handler(void);
-#else
-static inline void intel_register_dsm_handler(void) { return; }
-static inline void intel_unregister_dsm_handler(void) { return; }
-#endif /* CONFIG_ACPI */
-
 /* intel_device_info.c */
 static inline struct intel_device_info *
 mkwrite_device_info(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c
index 9d142d..3456d33 100644
--- a/drivers/gpu/drm/i915/intel_acpi.c
+++ b/drivers/gpu/drm/i915/intel_acpi.c
@@ -4,9 +4,12 @@
  *
  * _DSM related code stolen from nouveau_acpi.c.
  */
+
 #include <linux/pci.h>
 #include <linux/acpi.h>
+
 #include "i915_drv.h"
+#include "intel_acpi.h"
 
 #define INTEL_DSM_REVISION_ID 1 /* For Calpella anyway... */
 #define INTEL_DSM_FN_PLATFORM_MUX_INFO 1 /* No args */
diff --git a/drivers/gpu/drm/i915/intel_acpi.h b/drivers/gpu/drm/i915/intel_acpi.h
new file mode 100644
index 000000..1c576b
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_acpi.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_ACPI_H__
+#define __INTEL_ACPI_H__
+
+#ifdef CONFIG_ACPI
+void intel_register_dsm_handler(void);
+void intel_unregister_dsm_handler(void);
+#else
+static inline void intel_register_dsm_handler(void) { return; }
+static inline void intel_unregister_dsm_handler(void) { return; }
+#endif /* CONFIG_ACPI */
+
+#endif /* __INTEL_ACPI_H__ */
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6ebe000..019eccf 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -47,6 +47,7 @@
 #include "i915_drv.h"
 #include "i915_gem_clflush.h"
 #include "i915_trace.h"
+#include "intel_acpi.h"
 #include "intel_atomic.h"
 #include "intel_atomic_plane.h"
 #include "intel_color.h"
-- 
2.20.1

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

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

* [PATCH 09/13] drm/i915: extract i915_debugfs.h from i915_drv.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (7 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 08/13] drm/i915: extract intel_acpi.h " Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 10/13] drm/i915: move i915_vgacntrl_reg() where needed Jani Nikula
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

It used to be handy that we only had a couple of headers, but over time
i915_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test |  1 +
 drivers/gpu/drm/i915/i915_debugfs.c       |  1 +
 drivers/gpu/drm/i915/i915_debugfs.h       | 20 ++++++++++++++++++++
 drivers/gpu/drm/i915/i915_drv.c           |  2 ++
 drivers/gpu/drm/i915/i915_drv.h           | 12 ------------
 drivers/gpu/drm/i915/intel_dp.c           |  1 +
 drivers/gpu/drm/i915/intel_hdmi.c         |  1 +
 drivers/gpu/drm/i915/intel_pipe_crc.h     |  3 +++
 8 files changed, 29 insertions(+), 12 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_debugfs.h

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index c1fa85..b61fd8 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -4,6 +4,7 @@
 # Test the headers are compilable as standalone units
 header_test := \
 	i915_active_types.h \
+	i915_debugfs.h \
 	i915_drv.h \
 	i915_gem_context_types.h \
 	i915_gem_pm.h \
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0d7d19..14cd83 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -34,6 +34,7 @@
 
 #include "gt/intel_reset.h"
 
+#include "i915_debugfs.h"
 #include "i915_gem_context.h"
 #include "i915_irq.h"
 #include "intel_csr.h"
diff --git a/drivers/gpu/drm/i915/i915_debugfs.h b/drivers/gpu/drm/i915/i915_debugfs.h
new file mode 100644
index 000000..c0cd22e
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_debugfs.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __I915_DEBUGFS_H__
+#define __I915_DEBUGFS_H__
+
+struct drm_i915_private;
+struct drm_connector;
+
+#ifdef CONFIG_DEBUG_FS
+int i915_debugfs_register(struct drm_i915_private *dev_priv);
+int i915_debugfs_connector_add(struct drm_connector *connector);
+#else
+static inline int i915_debugfs_register(struct drm_i915_private *dev_priv) { return 0; }
+static inline int i915_debugfs_connector_add(struct drm_connector *connector) { return 0; }
+#endif
+
+#endif /* __I915_DEBUGFS_H__ */
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index c011a1b..57060a6 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -51,6 +51,7 @@
 #include "gt/intel_reset.h"
 #include "gt/intel_workarounds.h"
 
+#include "i915_debugfs.h"
 #include "i915_drv.h"
 #include "i915_irq.h"
 #include "i915_pmu.h"
@@ -66,6 +67,7 @@
 #include "intel_fbdev.h"
 #include "intel_hotplug.h"
 #include "intel_overlay.h"
+#include "intel_pipe_crc.h"
 #include "intel_pm.h"
 #include "intel_sprite.h"
 #include "intel_uc.h"
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6ddc3d..a4ae6e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3208,18 +3208,6 @@ u32 i915_gem_fence_size(struct drm_i915_private *dev_priv, u32 size,
 u32 i915_gem_fence_alignment(struct drm_i915_private *dev_priv, u32 size,
 			     unsigned int tiling, unsigned int stride);
 
-/* i915_debugfs.c */
-#ifdef CONFIG_DEBUG_FS
-int i915_debugfs_register(struct drm_i915_private *dev_priv);
-int i915_debugfs_connector_add(struct drm_connector *connector);
-void intel_display_crc_init(struct drm_i915_private *dev_priv);
-#else
-static inline int i915_debugfs_register(struct drm_i915_private *dev_priv) {return 0;}
-static inline int i915_debugfs_connector_add(struct drm_connector *connector)
-{ return 0; }
-static inline void intel_display_crc_init(struct drm_i915_private *dev_priv) {}
-#endif
-
 const char *i915_cache_level_str(struct drm_i915_private *i915, int type);
 
 /* i915_cmd_parser.c */
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 04d64b..91380c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -42,6 +42,7 @@
 #include <drm/drm_probe_helper.h>
 #include <drm/i915_drm.h>
 
+#include "i915_debugfs.h"
 #include "i915_drv.h"
 #include "intel_atomic.h"
 #include "intel_audio.h"
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 571e6b..f76327 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -39,6 +39,7 @@
 #include <drm/i915_drm.h>
 #include <drm/intel_lpe_audio.h>
 
+#include "i915_debugfs.h"
 #include "i915_drv.h"
 #include "intel_atomic.h"
 #include "intel_audio.h"
diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.h b/drivers/gpu/drm/i915/intel_pipe_crc.h
index 81eaf1..db258a 100644
--- a/drivers/gpu/drm/i915/intel_pipe_crc.h
+++ b/drivers/gpu/drm/i915/intel_pipe_crc.h
@@ -9,9 +9,11 @@
 #include <linux/types.h>
 
 struct drm_crtc;
+struct drm_i915_private;
 struct intel_crtc;
 
 #ifdef CONFIG_DEBUG_FS
+void intel_display_crc_init(struct drm_i915_private *dev_priv);
 int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name);
 int intel_crtc_verify_crc_source(struct drm_crtc *crtc,
 				 const char *source_name, size_t *values_cnt);
@@ -20,6 +22,7 @@ const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc,
 void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc);
 void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc);
 #else
+static inline void intel_display_crc_init(struct drm_i915_private *dev_priv) {}
 #define intel_crtc_set_crc_source NULL
 #define intel_crtc_verify_crc_source NULL
 #define intel_crtc_get_crc_sources NULL
-- 
2.20.1

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

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

* [PATCH 10/13] drm/i915: move i915_vgacntrl_reg() where needed
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (8 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 09/13] drm/i915: extract i915_debugfs.h " Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 11/13] drm/i915: make i915_utils.h self-contained Jani Nikula
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from i915_drv.h.

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

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a4ae6e..5f65c7 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3357,16 +3357,6 @@ extern void intel_display_print_error_state(struct drm_i915_error_state_buf *e,
 #define INTEL_BROADCAST_RGB_FULL 1
 #define INTEL_BROADCAST_RGB_LIMITED 2
 
-static inline i915_reg_t i915_vgacntrl_reg(struct drm_i915_private *dev_priv)
-{
-	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
-		return VLV_VGACNTRL;
-	else if (INTEL_GEN(dev_priv) >= 5)
-		return CPU_VGACNTRL;
-	else
-		return VGACNTRL;
-}
-
 static inline unsigned long msecs_to_jiffies_timeout(const unsigned int m)
 {
 	unsigned long j = msecs_to_jiffies(m);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 019eccf..b542371 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15485,6 +15485,16 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
 		dev_priv->display.update_crtcs = intel_update_crtcs;
 }
 
+static i915_reg_t i915_vgacntrl_reg(struct drm_i915_private *dev_priv)
+{
+	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+		return VLV_VGACNTRL;
+	else if (INTEL_GEN(dev_priv) >= 5)
+		return CPU_VGACNTRL;
+	else
+		return VGACNTRL;
+}
+
 /* Disable the VGA plane that we never use */
 static void i915_disable_vga(struct drm_i915_private *dev_priv)
 {
-- 
2.20.1

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

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

* [PATCH 11/13] drm/i915: make i915_utils.h self-contained
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (9 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 10/13] drm/i915: move i915_vgacntrl_reg() where needed Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:02 ` [PATCH 12/13] drm/i915: move more generic utils to i915_utils.h Jani Nikula
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

And ensure it stays that way.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile.header-test | 1 +
 drivers/gpu/drm/i915/i915_utils.h         | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index b61fd8..f71ea7 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -14,6 +14,7 @@ header_test := \
 	i915_reg.h \
 	i915_scheduler_types.h \
 	i915_timeline_types.h \
+	i915_utils.h \
 	intel_acpi.h \
 	intel_atomic.h \
 	intel_atomic_plane.h \
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index 2dbe89..26117b 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -25,6 +25,10 @@
 #ifndef __I915_UTILS_H
 #define __I915_UTILS_H
 
+#include <linux/list.h>
+#include <linux/types.h>
+#include <linux/workqueue.h>
+
 #undef WARN_ON
 /* Many gcc seem to no see through this and fall over :( */
 #if 0
@@ -152,8 +156,6 @@ static inline u64 ptr_to_u64(const void *ptr)
 	__idx;								\
 })
 
-#include <linux/list.h>
-
 static inline void __list_del_many(struct list_head *head,
 				   struct list_head *first)
 {
-- 
2.20.1

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

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

* [PATCH 12/13] drm/i915: move more generic utils to i915_utils.h
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (10 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 11/13] drm/i915: make i915_utils.h self-contained Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:09   ` Chris Wilson
  2019-05-02 15:02 ` [PATCH 13/13] drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c Jani Nikula
                   ` (5 subsequent siblings)
  17 siblings, 1 reply; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reduce clutter from i915_drv.h and intel_drv.h.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h   |  44 ---------
 drivers/gpu/drm/i915/i915_utils.h | 153 ++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h  | 108 ---------------------
 3 files changed, 153 insertions(+), 152 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 5f65c7..d16705 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3357,50 +3357,6 @@ extern void intel_display_print_error_state(struct drm_i915_error_state_buf *e,
 #define INTEL_BROADCAST_RGB_FULL 1
 #define INTEL_BROADCAST_RGB_LIMITED 2
 
-static inline unsigned long msecs_to_jiffies_timeout(const unsigned int m)
-{
-	unsigned long j = msecs_to_jiffies(m);
-
-	return min_t(unsigned long, MAX_JIFFY_OFFSET, j + 1);
-}
-
-static inline unsigned long nsecs_to_jiffies_timeout(const u64 n)
-{
-	/* nsecs_to_jiffies64() does not guard against overflow */
-	if (NSEC_PER_SEC % HZ &&
-	    div_u64(n, NSEC_PER_SEC) >= MAX_JIFFY_OFFSET / HZ)
-		return MAX_JIFFY_OFFSET;
-
-        return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1);
-}
-
-/*
- * If you need to wait X milliseconds between events A and B, but event B
- * doesn't happen exactly after event A, you record the timestamp (jiffies) of
- * when event A happened, then just before event B you call this function and
- * pass the timestamp as the first argument, and X as the second argument.
- */
-static inline void
-wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms)
-{
-	unsigned long target_jiffies, tmp_jiffies, remaining_jiffies;
-
-	/*
-	 * Don't re-read the value of "jiffies" every time since it may change
-	 * behind our back and break the math.
-	 */
-	tmp_jiffies = jiffies;
-	target_jiffies = timestamp_jiffies +
-			 msecs_to_jiffies_timeout(to_wait_ms);
-
-	if (time_after(target_jiffies, tmp_jiffies)) {
-		remaining_jiffies = target_jiffies - tmp_jiffies;
-		while (remaining_jiffies)
-			remaining_jiffies =
-			    schedule_timeout_uninterruptible(remaining_jiffies);
-	}
-}
-
 void i915_memcpy_init_early(struct drm_i915_private *dev_priv);
 bool i915_memcpy_from_wc(void *dst, const void *src, unsigned long len);
 
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index 26117b..c849cfa 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -26,6 +26,7 @@
 #define __I915_UTILS_H
 
 #include <linux/list.h>
+#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/workqueue.h>
 
@@ -176,6 +177,158 @@ static inline void drain_delayed_work(struct delayed_work *dw)
 	} while (delayed_work_pending(dw));
 }
 
+static inline unsigned long msecs_to_jiffies_timeout(const unsigned int m)
+{
+	unsigned long j = msecs_to_jiffies(m);
+
+	return min_t(unsigned long, MAX_JIFFY_OFFSET, j + 1);
+}
+
+static inline unsigned long nsecs_to_jiffies_timeout(const u64 n)
+{
+	/* nsecs_to_jiffies64() does not guard against overflow */
+	if (NSEC_PER_SEC % HZ &&
+	    div_u64(n, NSEC_PER_SEC) >= MAX_JIFFY_OFFSET / HZ)
+		return MAX_JIFFY_OFFSET;
+
+        return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1);
+}
+
+/*
+ * If you need to wait X milliseconds between events A and B, but event B
+ * doesn't happen exactly after event A, you record the timestamp (jiffies) of
+ * when event A happened, then just before event B you call this function and
+ * pass the timestamp as the first argument, and X as the second argument.
+ */
+static inline void
+wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms)
+{
+	unsigned long target_jiffies, tmp_jiffies, remaining_jiffies;
+
+	/*
+	 * Don't re-read the value of "jiffies" every time since it may change
+	 * behind our back and break the math.
+	 */
+	tmp_jiffies = jiffies;
+	target_jiffies = timestamp_jiffies +
+			 msecs_to_jiffies_timeout(to_wait_ms);
+
+	if (time_after(target_jiffies, tmp_jiffies)) {
+		remaining_jiffies = target_jiffies - tmp_jiffies;
+		while (remaining_jiffies)
+			remaining_jiffies =
+			    schedule_timeout_uninterruptible(remaining_jiffies);
+	}
+}
+
+/**
+ * __wait_for - magic wait macro
+ *
+ * Macro to help avoid open coding check/wait/timeout patterns. Note that it's
+ * important that we check the condition again after having timed out, since the
+ * timeout could be due to preemption or similar and we've never had a chance to
+ * check the condition before the timeout.
+ */
+#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \
+	const ktime_t end__ = ktime_add_ns(ktime_get_raw(), 1000ll * (US)); \
+	long wait__ = (Wmin); /* recommended min for usleep is 10 us */	\
+	int ret__;							\
+	might_sleep();							\
+	for (;;) {							\
+		const bool expired__ = ktime_after(ktime_get_raw(), end__); \
+		OP;							\
+		/* Guarantee COND check prior to timeout */		\
+		barrier();						\
+		if (COND) {						\
+			ret__ = 0;					\
+			break;						\
+		}							\
+		if (expired__) {					\
+			ret__ = -ETIMEDOUT;				\
+			break;						\
+		}							\
+		usleep_range(wait__, wait__ * 2);			\
+		if (wait__ < (Wmax))					\
+			wait__ <<= 1;					\
+	}								\
+	ret__;								\
+})
+
+#define _wait_for(COND, US, Wmin, Wmax)	__wait_for(, (COND), (US), (Wmin), \
+						   (Wmax))
+#define wait_for(COND, MS)		_wait_for((COND), (MS) * 1000, 10, 1000)
+
+/* If CONFIG_PREEMPT_COUNT is disabled, in_atomic() always reports false. */
+#if defined(CONFIG_DRM_I915_DEBUG) && defined(CONFIG_PREEMPT_COUNT)
+# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic())
+#else
+# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0)
+#endif
+
+#define _wait_for_atomic(COND, US, ATOMIC) \
+({ \
+	int cpu, ret, timeout = (US) * 1000; \
+	u64 base; \
+	_WAIT_FOR_ATOMIC_CHECK(ATOMIC); \
+	if (!(ATOMIC)) { \
+		preempt_disable(); \
+		cpu = smp_processor_id(); \
+	} \
+	base = local_clock(); \
+	for (;;) { \
+		u64 now = local_clock(); \
+		if (!(ATOMIC)) \
+			preempt_enable(); \
+		/* Guarantee COND check prior to timeout */ \
+		barrier(); \
+		if (COND) { \
+			ret = 0; \
+			break; \
+		} \
+		if (now - base >= timeout) { \
+			ret = -ETIMEDOUT; \
+			break; \
+		} \
+		cpu_relax(); \
+		if (!(ATOMIC)) { \
+			preempt_disable(); \
+			if (unlikely(cpu != smp_processor_id())) { \
+				timeout -= now - base; \
+				cpu = smp_processor_id(); \
+				base = local_clock(); \
+			} \
+		} \
+	} \
+	ret; \
+})
+
+#define wait_for_us(COND, US) \
+({ \
+	int ret__; \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	if ((US) > 10) \
+		ret__ = _wait_for((COND), (US), 10, 10); \
+	else \
+		ret__ = _wait_for_atomic((COND), (US), 0); \
+	ret__; \
+})
+
+#define wait_for_atomic_us(COND, US) \
+({ \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	BUILD_BUG_ON((US) > 50000); \
+	_wait_for_atomic((COND), (US), 1); \
+})
+
+#define wait_for_atomic(COND, MS) wait_for_atomic_us((COND), (MS) * 1000)
+
+#define KHz(x) (1000 * (x))
+#define MHz(x) KHz(1000 * (x))
+
+#define KBps(x) (1000 * (x))
+#define MBps(x) KBps(1000 * (x))
+#define GBps(x) ((u64)1000 * MBps((x)))
+
 static inline const char *yesno(bool v)
 {
 	return v ? "yes" : "no";
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index addf6f..4049e03 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -46,114 +46,6 @@
 
 struct drm_printer;
 
-/**
- * __wait_for - magic wait macro
- *
- * Macro to help avoid open coding check/wait/timeout patterns. Note that it's
- * important that we check the condition again after having timed out, since the
- * timeout could be due to preemption or similar and we've never had a chance to
- * check the condition before the timeout.
- */
-#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \
-	const ktime_t end__ = ktime_add_ns(ktime_get_raw(), 1000ll * (US)); \
-	long wait__ = (Wmin); /* recommended min for usleep is 10 us */	\
-	int ret__;							\
-	might_sleep();							\
-	for (;;) {							\
-		const bool expired__ = ktime_after(ktime_get_raw(), end__); \
-		OP;							\
-		/* Guarantee COND check prior to timeout */		\
-		barrier();						\
-		if (COND) {						\
-			ret__ = 0;					\
-			break;						\
-		}							\
-		if (expired__) {					\
-			ret__ = -ETIMEDOUT;				\
-			break;						\
-		}							\
-		usleep_range(wait__, wait__ * 2);			\
-		if (wait__ < (Wmax))					\
-			wait__ <<= 1;					\
-	}								\
-	ret__;								\
-})
-
-#define _wait_for(COND, US, Wmin, Wmax)	__wait_for(, (COND), (US), (Wmin), \
-						   (Wmax))
-#define wait_for(COND, MS)		_wait_for((COND), (MS) * 1000, 10, 1000)
-
-/* If CONFIG_PREEMPT_COUNT is disabled, in_atomic() always reports false. */
-#if defined(CONFIG_DRM_I915_DEBUG) && defined(CONFIG_PREEMPT_COUNT)
-# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic())
-#else
-# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0)
-#endif
-
-#define _wait_for_atomic(COND, US, ATOMIC) \
-({ \
-	int cpu, ret, timeout = (US) * 1000; \
-	u64 base; \
-	_WAIT_FOR_ATOMIC_CHECK(ATOMIC); \
-	if (!(ATOMIC)) { \
-		preempt_disable(); \
-		cpu = smp_processor_id(); \
-	} \
-	base = local_clock(); \
-	for (;;) { \
-		u64 now = local_clock(); \
-		if (!(ATOMIC)) \
-			preempt_enable(); \
-		/* Guarantee COND check prior to timeout */ \
-		barrier(); \
-		if (COND) { \
-			ret = 0; \
-			break; \
-		} \
-		if (now - base >= timeout) { \
-			ret = -ETIMEDOUT; \
-			break; \
-		} \
-		cpu_relax(); \
-		if (!(ATOMIC)) { \
-			preempt_disable(); \
-			if (unlikely(cpu != smp_processor_id())) { \
-				timeout -= now - base; \
-				cpu = smp_processor_id(); \
-				base = local_clock(); \
-			} \
-		} \
-	} \
-	ret; \
-})
-
-#define wait_for_us(COND, US) \
-({ \
-	int ret__; \
-	BUILD_BUG_ON(!__builtin_constant_p(US)); \
-	if ((US) > 10) \
-		ret__ = _wait_for((COND), (US), 10, 10); \
-	else \
-		ret__ = _wait_for_atomic((COND), (US), 0); \
-	ret__; \
-})
-
-#define wait_for_atomic_us(COND, US) \
-({ \
-	BUILD_BUG_ON(!__builtin_constant_p(US)); \
-	BUILD_BUG_ON((US) > 50000); \
-	_wait_for_atomic((COND), (US), 1); \
-})
-
-#define wait_for_atomic(COND, MS) wait_for_atomic_us((COND), (MS) * 1000)
-
-#define KHz(x) (1000 * (x))
-#define MHz(x) KHz(1000 * (x))
-
-#define KBps(x) (1000 * (x))
-#define MBps(x) KBps(1000 * (x))
-#define GBps(x) ((u64)1000 * MBps((x)))
-
 /*
  * Display related stuff
  */
-- 
2.20.1

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

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

* [PATCH 13/13] drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (11 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 12/13] drm/i915: move more generic utils to i915_utils.h Jani Nikula
@ 2019-05-02 15:02 ` Jani Nikula
  2019-05-02 15:11 ` [PATCH 00/13] drm/i915: the great header refactoring, part three Chris Wilson
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-02 15:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

It used to be handy that we only had a couple of headers, but over time
i915_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

While at it, rename intel_i2c.c to intel_gmbus.c and the functions to
intel_gmbus_*.

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile                 |  2 +-
 drivers/gpu/drm/i915/Makefile.header-test     |  1 +
 drivers/gpu/drm/i915/i915_drv.c               |  5 ++--
 drivers/gpu/drm/i915/i915_drv.h               | 17 ------------
 drivers/gpu/drm/i915/i915_suspend.c           |  3 ++-
 drivers/gpu/drm/i915/intel_bios.c             |  2 ++
 drivers/gpu/drm/i915/intel_crt.c              |  1 +
 drivers/gpu/drm/i915/intel_ddi.c              |  1 +
 drivers/gpu/drm/i915/intel_display.c          |  3 ++-
 drivers/gpu/drm/i915/intel_dvo.c              |  1 +
 .../drm/i915/{intel_i2c.c => intel_gmbus.c}   | 27 +++++++++++++------
 drivers/gpu/drm/i915/intel_gmbus.h            | 27 +++++++++++++++++++
 drivers/gpu/drm/i915/intel_hdmi.c             |  1 +
 drivers/gpu/drm/i915/intel_lvds.c             |  1 +
 drivers/gpu/drm/i915/intel_sdvo.c             |  1 +
 15 files changed, 63 insertions(+), 30 deletions(-)
 rename drivers/gpu/drm/i915/{intel_i2c.c => intel_gmbus.c} (98%)
 create mode 100644 drivers/gpu/drm/i915/intel_gmbus.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 586433..68106f 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -176,8 +176,8 @@ i915-y += dvo_ch7017.o \
 	  intel_dsi_dcs_backlight.o \
 	  intel_dsi_vbt.o \
 	  intel_dvo.o \
+	  intel_gmbus.o \
 	  intel_hdmi.o \
-	  intel_i2c.o \
 	  intel_lspcon.o \
 	  intel_lvds.o \
 	  intel_panel.o \
diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index f71ea7..2ca4a5f 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -42,6 +42,7 @@ header_test := \
 	intel_fbdev.h \
 	intel_fifo_underrun.h \
 	intel_frontbuffer.h \
+	intel_gmbus.h \
 	intel_hdcp.h \
 	intel_hdmi.h \
 	intel_hotplug.h \
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 57060a6..e6ce530 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -65,6 +65,7 @@
 #include "intel_dp.h"
 #include "intel_drv.h"
 #include "intel_fbdev.h"
+#include "intel_gmbus.h"
 #include "intel_hotplug.h"
 #include "intel_overlay.h"
 #include "intel_pipe_crc.h"
@@ -705,7 +706,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 	if (ret)
 		goto cleanup_csr;
 
-	intel_setup_gmbus(dev_priv);
+	intel_gmbus_setup(dev_priv);
 
 	/* Important: The output setup functions called by modeset_init need
 	 * working irqs for e.g. gmbus and dp aux transfers. */
@@ -740,7 +741,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 	intel_modeset_cleanup(dev);
 cleanup_irq:
 	drm_irq_uninstall(dev);
-	intel_teardown_gmbus(dev_priv);
+	intel_gmbus_teardown(dev_priv);
 cleanup_csr:
 	intel_csr_ucode_fini(dev_priv);
 	intel_power_domains_fini_hw(dev_priv);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d16705..64fa35 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3235,23 +3235,6 @@ extern int i915_restore_state(struct drm_i915_private *dev_priv);
 void i915_setup_sysfs(struct drm_i915_private *dev_priv);
 void i915_teardown_sysfs(struct drm_i915_private *dev_priv);
 
-/* intel_i2c.c */
-extern int intel_setup_gmbus(struct drm_i915_private *dev_priv);
-extern void intel_teardown_gmbus(struct drm_i915_private *dev_priv);
-extern bool intel_gmbus_is_valid_pin(struct drm_i915_private *dev_priv,
-				     unsigned int pin);
-extern int intel_gmbus_output_aksv(struct i2c_adapter *adapter);
-
-extern struct i2c_adapter *
-intel_gmbus_get_adapter(struct drm_i915_private *dev_priv, unsigned int pin);
-extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
-extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
-static inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
-{
-	return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
-}
-extern void intel_i2c_reset(struct drm_i915_private *dev_priv);
-
 /* intel_device_info.c */
 static inline struct intel_device_info *
 mkwrite_device_info(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 95f3dab..581201 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -29,6 +29,7 @@
 #include "i915_reg.h"
 #include "intel_drv.h"
 #include "intel_fbc.h"
+#include "intel_gmbus.h"
 
 static void i915_save_display(struct drm_i915_private *dev_priv)
 {
@@ -144,7 +145,7 @@ int i915_restore_state(struct drm_i915_private *dev_priv)
 
 	mutex_unlock(&dev_priv->drm.struct_mutex);
 
-	intel_i2c_reset(dev_priv);
+	intel_gmbus_reset(dev_priv);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 1dc8d03..a0b708f 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -27,7 +27,9 @@
 
 #include <drm/drm_dp_helper.h>
 #include <drm/i915_drm.h>
+
 #include "i915_drv.h"
+#include "intel_gmbus.h"
 
 #define _INTEL_BIOS_PRIVATE
 #include "intel_vbt_defs.h"
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index eb81b4..bb56518 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -40,6 +40,7 @@
 #include "intel_ddi.h"
 #include "intel_drv.h"
 #include "intel_fifo_underrun.h"
+#include "intel_gmbus.h"
 #include "intel_hotplug.h"
 
 /* Here's the desired hotplug mode */
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index ec6ed93..cd5277 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -38,6 +38,7 @@
 #include "intel_drv.h"
 #include "intel_dsi.h"
 #include "intel_fifo_underrun.h"
+#include "intel_gmbus.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
 #include "intel_hotplug.h"
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b542371..cede902 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -62,6 +62,7 @@
 #include "intel_fbdev.h"
 #include "intel_fifo_underrun.h"
 #include "intel_frontbuffer.h"
+#include "intel_gmbus.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
 #include "intel_hotplug.h"
@@ -16640,7 +16641,7 @@ void intel_modeset_cleanup(struct drm_device *dev)
 
 	intel_overlay_cleanup(dev_priv);
 
-	intel_teardown_gmbus(dev_priv);
+	intel_gmbus_teardown(dev_priv);
 
 	destroy_workqueue(dev_priv->modeset_wq);
 
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 79a43f..22666d 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -37,6 +37,7 @@
 #include "intel_drv.h"
 #include "intel_dvo.h"
 #include "intel_dvo_dev.h"
+#include "intel_gmbus.h"
 #include "intel_panel.h"
 
 #define INTEL_DVO_CHIP_NONE	0
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_gmbus.c
similarity index 98%
rename from drivers/gpu/drm/i915/intel_i2c.c
rename to drivers/gpu/drm/i915/intel_gmbus.c
index 422685..8c36a0 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_gmbus.c
@@ -26,13 +26,17 @@
  *	Eric Anholt <eric@anholt.net>
  *	Chris Wilson <chris@chris-wilson.co.uk>
  */
-#include <linux/i2c.h>
-#include <linux/i2c-algo-bit.h>
+
 #include <linux/export.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/i2c.h>
+
 #include <drm/drm_hdcp.h>
-#include "intel_drv.h"
 #include <drm/i915_drm.h>
+
 #include "i915_drv.h"
+#include "intel_drv.h"
+#include "intel_gmbus.h"
 
 struct gmbus_pin {
 	const char *name;
@@ -134,7 +138,7 @@ to_intel_gmbus(struct i2c_adapter *i2c)
 }
 
 void
-intel_i2c_reset(struct drm_i915_private *dev_priv)
+intel_gmbus_reset(struct drm_i915_private *dev_priv)
 {
 	I915_WRITE(GMBUS0, 0);
 	I915_WRITE(GMBUS4, 0);
@@ -256,7 +260,7 @@ intel_gpio_pre_xfer(struct i2c_adapter *adapter)
 					       adapter);
 	struct drm_i915_private *dev_priv = bus->dev_priv;
 
-	intel_i2c_reset(dev_priv);
+	intel_gmbus_reset(dev_priv);
 
 	if (IS_PINEVIEW(dev_priv))
 		pnv_gmbus_clock_gating(dev_priv, false);
@@ -811,7 +815,7 @@ static const struct i2c_lock_operations gmbus_lock_ops = {
  * intel_gmbus_setup - instantiate all Intel i2c GMBuses
  * @dev_priv: i915 device private
  */
-int intel_setup_gmbus(struct drm_i915_private *dev_priv)
+int intel_gmbus_setup(struct drm_i915_private *dev_priv)
 {
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 	struct intel_gmbus *bus;
@@ -872,7 +876,7 @@ int intel_setup_gmbus(struct drm_i915_private *dev_priv)
 			goto err;
 	}
 
-	intel_i2c_reset(dev_priv);
+	intel_gmbus_reset(dev_priv);
 
 	return 0;
 
@@ -918,7 +922,14 @@ void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
 	mutex_unlock(&dev_priv->gmbus_mutex);
 }
 
-void intel_teardown_gmbus(struct drm_i915_private *dev_priv)
+bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
+{
+	struct intel_gmbus *bus = to_intel_gmbus(adapter);
+
+	return bus->force_bit;
+}
+
+void intel_gmbus_teardown(struct drm_i915_private *dev_priv)
 {
 	struct intel_gmbus *bus;
 	unsigned int pin;
diff --git a/drivers/gpu/drm/i915/intel_gmbus.h b/drivers/gpu/drm/i915/intel_gmbus.h
new file mode 100644
index 000000..d989085
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_gmbus.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_GMBUS_H__
+#define __INTEL_GMBUS_H__
+
+#include <linux/types.h>
+
+struct drm_i915_private;
+struct i2c_adapter;
+
+int intel_gmbus_setup(struct drm_i915_private *dev_priv);
+void intel_gmbus_teardown(struct drm_i915_private *dev_priv);
+bool intel_gmbus_is_valid_pin(struct drm_i915_private *dev_priv,
+			      unsigned int pin);
+int intel_gmbus_output_aksv(struct i2c_adapter *adapter);
+
+struct i2c_adapter *
+intel_gmbus_get_adapter(struct drm_i915_private *dev_priv, unsigned int pin);
+void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
+void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
+bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter);
+void intel_gmbus_reset(struct drm_i915_private *dev_priv);
+
+#endif /* __INTEL_GMBUS_H__ */
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f76327..d14575 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -49,6 +49,7 @@
 #include "intel_dpio_phy.h"
 #include "intel_drv.h"
 #include "intel_fifo_underrun.h"
+#include "intel_gmbus.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
 #include "intel_hotplug.h"
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index dcfca4..efefed6 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -43,6 +43,7 @@
 #include "intel_atomic.h"
 #include "intel_connector.h"
 #include "intel_drv.h"
+#include "intel_gmbus.h"
 #include "intel_lvds.h"
 #include "intel_panel.h"
 
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 743e745..6c98b3 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -41,6 +41,7 @@
 #include "intel_connector.h"
 #include "intel_drv.h"
 #include "intel_fifo_underrun.h"
+#include "intel_gmbus.h"
 #include "intel_hdmi.h"
 #include "intel_hotplug.h"
 #include "intel_panel.h"
-- 
2.20.1

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

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

* Re: [PATCH 12/13] drm/i915: move more generic utils to i915_utils.h
  2019-05-02 15:02 ` [PATCH 12/13] drm/i915: move more generic utils to i915_utils.h Jani Nikula
@ 2019-05-02 15:09   ` Chris Wilson
  0 siblings, 0 replies; 21+ messages in thread
From: Chris Wilson @ 2019-05-02 15:09 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Quoting Jani Nikula (2019-05-02 16:02:46)
> Reduce clutter from i915_drv.h and intel_drv.h.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Makes sense.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 00/13] drm/i915: the great header refactoring, part three
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (12 preceding siblings ...)
  2019-05-02 15:02 ` [PATCH 13/13] drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c Jani Nikula
@ 2019-05-02 15:11 ` Chris Wilson
  2019-05-03  7:10   ` Jani Nikula
  2019-05-02 18:26 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 subsequent siblings)
  17 siblings, 1 reply; 21+ messages in thread
From: Chris Wilson @ 2019-05-02 15:11 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Quoting Jani Nikula (2019-05-02 16:02:34)
> Continue the header refactoring started in [1] and [2].
> 
> BR,
> Jani.
> 
> [1] https://patchwork.freedesktop.org/series/59022/
> [2] https://patchwork.freedesktop.org/series/60060/
> 
> Jani Nikula (13):
>   drm/i915/dvo: move DVO chip types to intel_dvo.c
>   drm/i915/dsi: move operation mode types to intel_dsi.h
>   drm/i915: move ranges to intel_display.c
>   drm/i915: remove unused/stale macros and comments from intel_drv.h
>   drm/i915/csr: move CSR version macros to intel_csr.h
>   drm/i915: extract intel_dpio_phy.h from i915_drv.h
>   drm/i915: extract intel_lpe_audio.h from i915_drv.h
>   drm/i915: extract intel_acpi.h from i915_drv.h
>   drm/i915: extract i915_debugfs.h from i915_drv.h
>   drm/i915: move i915_vgacntrl_reg() where needed
>   drm/i915: make i915_utils.h self-contained
>   drm/i915: move more generic utils to i915_utils.h
>   drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c

Lots of small changes that look good.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: the great header refactoring, part three
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (13 preceding siblings ...)
  2019-05-02 15:11 ` [PATCH 00/13] drm/i915: the great header refactoring, part three Chris Wilson
@ 2019-05-02 18:26 ` Patchwork
  2019-05-02 18:34 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2019-05-02 18:26 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: the great header refactoring, part three
URL   : https://patchwork.freedesktop.org/series/60215/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
ac0fcd25f9fa drm/i915/dvo: move DVO chip types to intel_dvo.c
ecb082b73857 drm/i915/dsi: move operation mode types to intel_dsi.h
552591452252 drm/i915: move ranges to intel_display.c
e368306364d2 drm/i915: remove unused/stale macros and comments from intel_drv.h
81d05aed68fb drm/i915/csr: move CSR version macros to intel_csr.h
aac80847f4f3 drm/i915: extract intel_dpio_phy.h from i915_drv.h
-:133: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#133: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 161 lines checked
a23255f00364 drm/i915: extract intel_lpe_audio.h from i915_drv.h
-:107: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#107: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 83 lines checked
cf9b5978fcef drm/i915: extract intel_acpi.h from i915_drv.h
-:82: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#82: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 65 lines checked
50ea3b222b58 drm/i915: extract i915_debugfs.h from i915_drv.h
-:45: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#45: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 98 lines checked
4cbadf6de15f drm/i915: move i915_vgacntrl_reg() where needed
e897718d1a6e drm/i915: make i915_utils.h self-contained
5204035ef050 drm/i915: move more generic utils to i915_utils.h
-:96: ERROR:CODE_INDENT: code indent should use tabs where possible
#96: FILE: drivers/gpu/drm/i915/i915_utils.h:194:
+        return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1);$

-:96: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#96: FILE: drivers/gpu/drm/i915/i915_utils.h:194:
+        return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1);$

-:134: CHECK:CAMELCASE: Avoid CamelCase: <Wmin>
#134: FILE: drivers/gpu/drm/i915/i915_utils.h:232:
+#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \

-:134: CHECK:CAMELCASE: Avoid CamelCase: <Wmax>
#134: FILE: drivers/gpu/drm/i915/i915_utils.h:232:
+#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \

-:165: ERROR:IN_ATOMIC: do not use in_atomic in drivers
#165: FILE: drivers/gpu/drm/i915/i915_utils.h:263:
+# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic())

-:170: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'ATOMIC' - possible side-effects?
#170: FILE: drivers/gpu/drm/i915/i915_utils.h:268:
+#define _wait_for_atomic(COND, US, ATOMIC) \
+({ \
+	int cpu, ret, timeout = (US) * 1000; \
+	u64 base; \
+	_WAIT_FOR_ATOMIC_CHECK(ATOMIC); \
+	if (!(ATOMIC)) { \
+		preempt_disable(); \
+		cpu = smp_processor_id(); \
+	} \
+	base = local_clock(); \
+	for (;;) { \
+		u64 now = local_clock(); \
+		if (!(ATOMIC)) \
+			preempt_enable(); \
+		/* Guarantee COND check prior to timeout */ \
+		barrier(); \
+		if (COND) { \
+			ret = 0; \
+			break; \
+		} \
+		if (now - base >= timeout) { \
+			ret = -ETIMEDOUT; \
+			break; \
+		} \
+		cpu_relax(); \
+		if (!(ATOMIC)) { \
+			preempt_disable(); \
+			if (unlikely(cpu != smp_processor_id())) { \
+				timeout -= now - base; \
+				cpu = smp_processor_id(); \
+				base = local_clock(); \
+			} \
+		} \
+	} \
+	ret; \
+})

-:207: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'COND' - possible side-effects?
#207: FILE: drivers/gpu/drm/i915/i915_utils.h:305:
+#define wait_for_us(COND, US) \
+({ \
+	int ret__; \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	if ((US) > 10) \
+		ret__ = _wait_for((COND), (US), 10, 10); \
+	else \
+		ret__ = _wait_for_atomic((COND), (US), 0); \
+	ret__; \
+})

-:207: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'US' - possible side-effects?
#207: FILE: drivers/gpu/drm/i915/i915_utils.h:305:
+#define wait_for_us(COND, US) \
+({ \
+	int ret__; \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	if ((US) > 10) \
+		ret__ = _wait_for((COND), (US), 10, 10); \
+	else \
+		ret__ = _wait_for_atomic((COND), (US), 0); \
+	ret__; \
+})

-:218: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'US' - possible side-effects?
#218: FILE: drivers/gpu/drm/i915/i915_utils.h:316:
+#define wait_for_atomic_us(COND, US) \
+({ \
+	BUILD_BUG_ON(!__builtin_constant_p(US)); \
+	BUILD_BUG_ON((US) > 50000); \
+	_wait_for_atomic((COND), (US), 1); \
+})

total: 2 errors, 1 warnings, 6 checks, 329 lines checked
df6c90b06bff drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c
-:202: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#202: 
rename from drivers/gpu/drm/i915/intel_i2c.c

total: 0 errors, 1 warnings, 0 checks, 237 lines checked

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

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

* ✗ Fi.CI.SPARSE: warning for drm/i915: the great header refactoring, part three
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (14 preceding siblings ...)
  2019-05-02 18:26 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-05-02 18:34 ` Patchwork
  2019-05-02 19:06 ` ✓ Fi.CI.BAT: success " Patchwork
  2019-05-03  0:16 ` ✓ Fi.CI.IGT: " Patchwork
  17 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2019-05-02 18:34 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: the great header refactoring, part three
URL   : https://patchwork.freedesktop.org/series/60215/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915/dvo: move DVO chip types to intel_dvo.c
Okay!

Commit: drm/i915/dsi: move operation mode types to intel_dsi.h
Okay!

Commit: drm/i915: move ranges to intel_display.c
Okay!

Commit: drm/i915: remove unused/stale macros and comments from intel_drv.h
Okay!

Commit: drm/i915/csr: move CSR version macros to intel_csr.h
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3448:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3444:16: warning: expression using sizeof(void)

Commit: drm/i915: extract intel_dpio_phy.h from i915_drv.h
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3444:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3403:16: warning: expression using sizeof(void)

Commit: drm/i915: extract intel_lpe_audio.h from i915_drv.h
+drivers/gpu/drm/i915/i915_irq.c:1000:20: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_irq.c:1000:20: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/i915_irq.c:1000:20: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/i915_irq.c:1000:20: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3403:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3395:16: warning: expression using sizeof(void)

Commit: drm/i915: extract intel_acpi.h from i915_drv.h
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3395:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3386:16: warning: expression using sizeof(void)

Commit: drm/i915: extract i915_debugfs.h from i915_drv.h
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3386:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3374:16: warning: expression using sizeof(void)

Commit: drm/i915: move i915_vgacntrl_reg() where needed
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3374:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3364:16: warning: expression using sizeof(void)

Commit: drm/i915: make i915_utils.h self-contained
Okay!

Commit: drm/i915: move more generic utils to i915_utils.h
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3364:16: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:3374:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:184:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_utils.h:194:16: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3364:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_utils.h:184:16: warning: expression using sizeof(void)

Commit: drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c
+drivers/gpu/drm/i915/intel_gmbus.c:446:31: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_gmbus.c:448:31: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_gmbus.c:448:31: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_gmbus.c:510:23: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/intel_gmbus.c:510:23: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/intel_gmbus.c:446:31: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/intel_gmbus.c:448:31: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/intel_gmbus.c:448:31: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/intel_gmbus.c:510:23: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/intel_gmbus.c:510:23: warning: expression using sizeof(void)

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

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

* ✓ Fi.CI.BAT: success for drm/i915: the great header refactoring, part three
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (15 preceding siblings ...)
  2019-05-02 18:34 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2019-05-02 19:06 ` Patchwork
  2019-05-03  0:16 ` ✓ Fi.CI.IGT: " Patchwork
  17 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2019-05-02 19:06 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: the great header refactoring, part three
URL   : https://patchwork.freedesktop.org/series/60215/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6029 -> Patchwork_12947
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/60215/revisions/1/mbox/

Known issues
------------

  Here are the changes found in Patchwork_12947 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-icl-y:           [PASS][1] -> [INCOMPLETE][2] ([fdo#107713] / [fdo#109100] / [fdo#110581])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/fi-icl-y/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/fi-icl-y/igt@gem_ctx_create@basic-files.html

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [PASS][3] -> [DMESG-FAIL][4] ([fdo#110235])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_hangcheck:
    - fi-skl-iommu:       [INCOMPLETE][5] ([fdo#108602] / [fdo#108744] / [fdo#110581]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html

  
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
  [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
  [fdo#110581]: https://bugs.freedesktop.org/show_bug.cgi?id=110581


Participating hosts (54 -> 43)
------------------------------

  Missing    (11): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-kbl-guc fi-ctg-p8600 fi-byt-clapper fi-bdw-samus fi-cml-u 


Build changes
-------------

  * Linux: CI_DRM_6029 -> Patchwork_12947

  CI_DRM_6029: 0548213ff6d52d4638778a95a4b3a7900e683ac3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4972: f052e49a43cc9704ea5f240df15dd9d3dfed68ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12947: df6c90b06bffe88976d785385e504b43356ab061 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

df6c90b06bff drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c
5204035ef050 drm/i915: move more generic utils to i915_utils.h
e897718d1a6e drm/i915: make i915_utils.h self-contained
4cbadf6de15f drm/i915: move i915_vgacntrl_reg() where needed
50ea3b222b58 drm/i915: extract i915_debugfs.h from i915_drv.h
cf9b5978fcef drm/i915: extract intel_acpi.h from i915_drv.h
a23255f00364 drm/i915: extract intel_lpe_audio.h from i915_drv.h
aac80847f4f3 drm/i915: extract intel_dpio_phy.h from i915_drv.h
81d05aed68fb drm/i915/csr: move CSR version macros to intel_csr.h
e368306364d2 drm/i915: remove unused/stale macros and comments from intel_drv.h
552591452252 drm/i915: move ranges to intel_display.c
ecb082b73857 drm/i915/dsi: move operation mode types to intel_dsi.h
ac0fcd25f9fa drm/i915/dvo: move DVO chip types to intel_dvo.c

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915: the great header refactoring, part three
  2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
                   ` (16 preceding siblings ...)
  2019-05-02 19:06 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-05-03  0:16 ` Patchwork
  17 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2019-05-03  0:16 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: the great header refactoring, part three
URL   : https://patchwork.freedesktop.org/series/60215/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6029_full -> Patchwork_12947_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_12947_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_backlight@fade_with_suspend:
    - shard-iclb:         [PASS][1] -> [INCOMPLETE][2] ([fdo#107713] / [fdo#107820] / [fdo#110581])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb4/igt@i915_pm_backlight@fade_with_suspend.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb1/igt@i915_pm_backlight@fade_with_suspend.html

  * igt@i915_pm_rpm@pm-tiling:
    - shard-skl:          [PASS][3] -> [INCOMPLETE][4] ([fdo#107807] / [fdo#110581])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-skl8/igt@i915_pm_rpm@pm-tiling.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-skl8/igt@i915_pm_rpm@pm-tiling.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
    - shard-glk:          [PASS][5] -> [FAIL][6] ([fdo#104873])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-glk5/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-glk9/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html

  * igt@kms_flip@2x-flip-vs-suspend-interruptible:
    - shard-hsw:          [PASS][7] -> [INCOMPLETE][8] ([fdo#103540] / [fdo#110581])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-hsw2/igt@kms_flip@2x-flip-vs-suspend-interruptible.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-hsw6/igt@kms_flip@2x-flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
    - shard-iclb:         [PASS][9] -> [FAIL][10] ([fdo#103167]) +5 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-glk:          [PASS][11] -> [SKIP][12] ([fdo#109271]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-glk9/igt@kms_plane@pixel-format-pipe-a-planes-source-clamping.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-glk3/igt@kms_plane@pixel-format-pipe-a-planes-source-clamping.html

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
    - shard-skl:          [PASS][13] -> [FAIL][14] ([fdo#108145]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-skl10/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-skl5/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][15] -> [SKIP][16] ([fdo#109441]) +3 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb4/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [PASS][17] -> [FAIL][18] ([fdo#99912])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-kbl3/igt@kms_setmode@basic.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-kbl7/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-apl:          [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-apl5/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-apl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [DMESG-WARN][21] ([fdo#108566]) -> [PASS][22] +6 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-apl6/igt@i915_suspend@sysfs-reader.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-apl1/igt@i915_suspend@sysfs-reader.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
    - shard-hsw:          [FAIL][23] ([fdo#103355]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-hsw6/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-hsw5/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html

  * igt@kms_flip@2x-flip-vs-suspend-interruptible:
    - shard-glk:          [INCOMPLETE][25] ([fdo#103359] / [fdo#110581] / [k.org#198133]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-glk4/igt@kms_flip@2x-flip-vs-suspend-interruptible.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-glk5/igt@kms_flip@2x-flip-vs-suspend-interruptible.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [FAIL][27] ([fdo#105363]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-skl2/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
    - shard-iclb:         [FAIL][29] ([fdo#103167]) -> [PASS][30] +2 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [FAIL][31] ([fdo#103166]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb5/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
    - shard-glk:          [SKIP][33] ([fdo#109271] / [fdo#109278]) -> [PASS][34] +2 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-glk7/igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-glk9/igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [SKIP][35] ([fdo#109642]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb8/igt@kms_psr2_su@page_flip.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb2/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-iclb:         [SKIP][37] ([fdo#109441]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6029/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#107820]: https://bugs.freedesktop.org/show_bug.cgi?id=107820
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110581]: https://bugs.freedesktop.org/show_bug.cgi?id=110581
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_6029 -> Patchwork_12947

  CI_DRM_6029: 0548213ff6d52d4638778a95a4b3a7900e683ac3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4972: f052e49a43cc9704ea5f240df15dd9d3dfed68ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12947: df6c90b06bffe88976d785385e504b43356ab061 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12947/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 00/13] drm/i915: the great header refactoring, part three
  2019-05-02 15:11 ` [PATCH 00/13] drm/i915: the great header refactoring, part three Chris Wilson
@ 2019-05-03  7:10   ` Jani Nikula
  0 siblings, 0 replies; 21+ messages in thread
From: Jani Nikula @ 2019-05-03  7:10 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Thu, 02 May 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2019-05-02 16:02:34)
>> Continue the header refactoring started in [1] and [2].
>> 
>> BR,
>> Jani.
>> 
>> [1] https://patchwork.freedesktop.org/series/59022/
>> [2] https://patchwork.freedesktop.org/series/60060/
>> 
>> Jani Nikula (13):
>>   drm/i915/dvo: move DVO chip types to intel_dvo.c
>>   drm/i915/dsi: move operation mode types to intel_dsi.h
>>   drm/i915: move ranges to intel_display.c
>>   drm/i915: remove unused/stale macros and comments from intel_drv.h
>>   drm/i915/csr: move CSR version macros to intel_csr.h
>>   drm/i915: extract intel_dpio_phy.h from i915_drv.h
>>   drm/i915: extract intel_lpe_audio.h from i915_drv.h
>>   drm/i915: extract intel_acpi.h from i915_drv.h
>>   drm/i915: extract i915_debugfs.h from i915_drv.h
>>   drm/i915: move i915_vgacntrl_reg() where needed
>>   drm/i915: make i915_utils.h self-contained
>>   drm/i915: move more generic utils to i915_utils.h
>>   drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c
>
> Lots of small changes that look good.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks for the review, pushed the lot.

BR,
Jani.

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

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

end of thread, other threads:[~2019-05-03  7:07 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 15:02 [PATCH 00/13] drm/i915: the great header refactoring, part three Jani Nikula
2019-05-02 15:02 ` [PATCH 01/13] drm/i915/dvo: move DVO chip types to intel_dvo.c Jani Nikula
2019-05-02 15:02 ` [PATCH 02/13] drm/i915/dsi: move operation mode types to intel_dsi.h Jani Nikula
2019-05-02 15:02 ` [PATCH 03/13] drm/i915: move ranges to intel_display.c Jani Nikula
2019-05-02 15:02 ` [PATCH 04/13] drm/i915: remove unused/stale macros and comments from intel_drv.h Jani Nikula
2019-05-02 15:02 ` [PATCH 05/13] drm/i915/csr: move CSR version macros to intel_csr.h Jani Nikula
2019-05-02 15:02 ` [PATCH 06/13] drm/i915: extract intel_dpio_phy.h from i915_drv.h Jani Nikula
2019-05-02 15:02 ` [PATCH 07/13] drm/i915: extract intel_lpe_audio.h " Jani Nikula
2019-05-02 15:02 ` [PATCH 08/13] drm/i915: extract intel_acpi.h " Jani Nikula
2019-05-02 15:02 ` [PATCH 09/13] drm/i915: extract i915_debugfs.h " Jani Nikula
2019-05-02 15:02 ` [PATCH 10/13] drm/i915: move i915_vgacntrl_reg() where needed Jani Nikula
2019-05-02 15:02 ` [PATCH 11/13] drm/i915: make i915_utils.h self-contained Jani Nikula
2019-05-02 15:02 ` [PATCH 12/13] drm/i915: move more generic utils to i915_utils.h Jani Nikula
2019-05-02 15:09   ` Chris Wilson
2019-05-02 15:02 ` [PATCH 13/13] drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c Jani Nikula
2019-05-02 15:11 ` [PATCH 00/13] drm/i915: the great header refactoring, part three Chris Wilson
2019-05-03  7:10   ` Jani Nikula
2019-05-02 18:26 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-05-02 18:34 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-02 19:06 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-03  0:16 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.