drm/i915/dsb: hide struct intel_dsb better
authorJani Nikula <jani.nikula@intel.com>
Thu, 8 Sep 2022 16:57:02 +0000 (19:57 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 9 Sep 2022 07:20:35 +0000 (10:20 +0300)
struct intel_dsb can be an opaque type, hidden in intel_dsb.c. Make it
so. Reduce related includes while at it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220908165702.973854-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_dsb.c
drivers/gpu/drm/i915/display/intel_dsb.h
drivers/gpu/drm/i915/i915_drv.h

index ed98c732b24eb53ae89e27e6007b63cc29760be8..6bda4274eae928fbbbc3333af2505d9ba20eb5b2 100644 (file)
@@ -26,6 +26,7 @@
 #include "intel_de.h"
 #include "intel_display_types.h"
 #include "intel_dpll.h"
+#include "intel_dsb.h"
 #include "vlv_dsi_pll.h"
 
 struct intel_color_funcs {
index b0261d0e5228f1903b85d4d837f972d2f06c5a5b..1a38c2083b041056cefd5a12cdb72b7a2c6ae857 100644 (file)
@@ -92,6 +92,7 @@
 #include "intel_dmc.h"
 #include "intel_dp_link_training.h"
 #include "intel_dpt.h"
+#include "intel_dsb.h"
 #include "intel_fbc.h"
 #include "intel_fbdev.h"
 #include "intel_fdi.h"
index c4affcb216fdd639f79fee99b096358fc40c8847..fc9c3e41c33305437dadeb89b87b0b83d3b5298e 100644 (file)
@@ -9,6 +9,36 @@
 #include "i915_drv.h"
 #include "intel_de.h"
 #include "intel_display_types.h"
+#include "intel_dsb.h"
+
+struct i915_vma;
+
+enum dsb_id {
+       INVALID_DSB = -1,
+       DSB1,
+       DSB2,
+       DSB3,
+       MAX_DSB_PER_PIPE
+};
+
+struct intel_dsb {
+       enum dsb_id id;
+       u32 *cmd_buf;
+       struct i915_vma *vma;
+
+       /*
+        * free_pos will point the first free entry position
+        * and help in calculating tail of command buffer.
+        */
+       int free_pos;
+
+       /*
+        * ins_start_offset will help to store start address of the dsb
+        * instuction and help in identifying the batch of auto-increment
+        * register.
+        */
+       u32 ins_start_offset;
+};
 
 #define DSB_BUF_SIZE    (2 * PAGE_SIZE)
 
index 6cb9c580cdcaf6dcdc43190e0656008a65b915bb..74dd2b3343bb37b9342ff570003a02a918787ffd 100644 (file)
 #include "i915_reg_defs.h"
 
 struct intel_crtc_state;
-struct i915_vma;
-
-enum dsb_id {
-       INVALID_DSB = -1,
-       DSB1,
-       DSB2,
-       DSB3,
-       MAX_DSB_PER_PIPE
-};
-
-struct intel_dsb {
-       enum dsb_id id;
-       u32 *cmd_buf;
-       struct i915_vma *vma;
-
-       /*
-        * free_pos will point the first free entry position
-        * and help in calculating tail of command buffer.
-        */
-       int free_pos;
-
-       /*
-        * ins_start_offset will help to store start address of the dsb
-        * instuction and help in identifying the batch of auto-increment
-        * register.
-        */
-       u32 ins_start_offset;
-};
 
 void intel_dsb_prepare(struct intel_crtc_state *crtc_state);
 void intel_dsb_cleanup(struct intel_crtc_state *crtc_state);
index 717c702d2aaf5817bbde9f2a7db111f470c9301c..19682c47b79cea3cdb9b0928e30b0daedf706b5a 100644 (file)
@@ -38,7 +38,6 @@
 
 #include "display/intel_display.h"
 #include "display/intel_display_core.h"
-#include "display/intel_dsb.h"
 
 #include "gem/i915_gem_context_types.h"
 #include "gem/i915_gem_lmem.h"