Skip to contentSkip to conversation

drm/i915/backlight: move struct intel_panel_bl_funcs to intel_backlight.h

PATCH In review Jani Nikula 3 participants 3 messages Nov 24 – Nov 25

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/backlight: move struct intel_panel_bl_funcs to intel_backlight.h

struct intel_panel_bl_funcs is only needed in a handful of files. Move it away from the big intel_display_types.h header.

---
 drivers/gpu/drm/i915/display/intel_backlight.h       | 11 +++++++++++
 drivers/gpu/drm/i915/display/intel_display_types.h   | 12 +-----------
 .../gpu/drm/i915/display/intel_dsi_dcs_backlight.c   |  1 +
 3 files changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_backlight.h +11 -0
index 339643f63897..2cf9c2a99d06 100644
@@ -16,6 +16,17 @@ struct intel_encoder;
 struct intel_panel;
 enum pipe;
 
+struct intel_panel_bl_funcs {
+	/* Connector and platform specific backlight functions */
+	int (*setup)(struct intel_connector *connector, enum pipe pipe);
+	u32 (*get)(struct intel_connector *connector, enum pipe pipe);
+	void (*set)(const struct drm_connector_state *conn_state, u32 level);
+	void (*disable)(const struct drm_connector_state *conn_state, u32 level);
+	void (*enable)(const struct intel_crtc_state *crtc_state,
+		       const struct drm_connector_state *conn_state, u32 level);
+	u32 (*hz_to_pwm)(struct intel_connector *connector, u32 hz);
+};
+
 void intel_backlight_init_funcs(struct intel_panel *panel);
 int intel_backlight_setup(struct intel_connector *connector, enum pipe pipe);
 void intel_backlight_destroy(struct intel_panel *panel);
drivers/gpu/drm/i915/display/intel_display_types.h +1 -11
index 90a5d29169c6..514ca067e139 100644
@@ -63,6 +63,7 @@ struct intel_dp_link_training;
 struct intel_fbc;
 struct intel_global_objs_state;
 struct intel_hdcp_shim;
+struct intel_panel_bl_funcs;
 struct intel_panic;
 struct intel_tc_port;
 
@@ -305,17 +306,6 @@ struct intel_encoder {
 	const struct intel_bios_encoder_data *devdata;
 };
 
-struct intel_panel_bl_funcs {
-	/* Connector and platform specific backlight functions */
-	int (*setup)(struct intel_connector *connector, enum pipe pipe);
-	u32 (*get)(struct intel_connector *connector, enum pipe pipe);
-	void (*set)(const struct drm_connector_state *conn_state, u32 level);
-	void (*disable)(const struct drm_connector_state *conn_state, u32 level);
-	void (*enable)(const struct intel_crtc_state *crtc_state,
-		       const struct drm_connector_state *conn_state, u32 level);
-	u32 (*hz_to_pwm)(struct intel_connector *connector, u32 hz);
-};
-
 /* in 100us units */
 struct intel_pps_delays {
 	u16 power_up;      /* eDP: T1+T3,   LVDS: T1+T2 */
drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c +1 -0
index b3c453bf7d5c..14fefd77cecd 100644
@@ -27,6 +27,7 @@
 #include <drm/drm_print.h>
 #include <video/mipi_display.h>
 
+#include "intel_backlight.h"
 #include "intel_display_core.h"
 #include "intel_display_types.h"
 #include "intel_dsi.h"
Signature · 1 line
2.47.3
#1 lore raw

✓ i915.CI.BAT: success for drm/i915/backlight: move struct intel_panel_bl_funcs to intel_backlight.h

== Series Details ==

== Series Details ==

Series: drm/i915/backlight: move struct intel_panel_bl_funcs to intel_backlight.h
URL : https://patchwork.freedesktop.org/series/179534/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_19605 -> Patchwork_179534v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179534v1/index.html

Participating hosts (40 -> 39)
------------------------------

Missing (1): bat-dg2-13

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

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

### IGT changes ###

#### Issues hit ####

* igt@core_debugfs@read-all-entries:
- bat-adlp-6: [PASS][1] -> [DMESG-WARN][2] ([i915#15673])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19605/bat-adlp-6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179534v1/bat-adlp-6/igt@[email protected]

* igt@i915_selftest@live:
- fi-kbl-8809g: [PASS][3] -> [DMESG-FAIL][4] ([i915#14808]) +1 other test dmesg-fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19605/fi-kbl-8809g/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179534v1/fi-kbl-8809g/igt@[email protected]

#### Possible fixes ####

* igt@core_auth@basic-auth:
- bat-adlp-6: [DMESG-WARN][5] ([i915#15673]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19605/bat-adlp-6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179534v1/bat-adlp-6/igt@[email protected]

[i915#14808]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14808
[i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673

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

* Linux: CI_DRM_19605 -> Patchwork_179534v1

CI-20190529: 20190529
CI_DRM_19605: 28c36332c01de3058d0cb9e350a77e1282c31658 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_9203: 9203
Patchwork_179534v1: 28c36332c01de3058d0cb9e350a77e1282c31658 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179534v1/index.html

Reviewed-by on v1 1/1
#2 lore raw
In reply to Jani Nikula
Quoted 7 lines

Subject: [PATCH] drm/i915/backlight: move struct intel_panel_bl_funcs to intel_backlight.h

struct intel_panel_bl_funcs is only needed in a handful of files. Move it away from the big intel_display_types.h header.

LGTM,

Quoted 71 lines
---
 drivers/gpu/drm/i915/display/intel_backlight.h       | 11 +++++++++++
 drivers/gpu/drm/i915/display/intel_display_types.h   | 12 +-----------
 .../gpu/drm/i915/display/intel_dsi_dcs_backlight.c   |  1 +
 3 files changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_backlight.h +10 -0
index 339643f63897..2cf9c2a99d06 100644
@@ -16,6 +16,17 @@ struct intel_encoder;  struct intel_panel;  enum pipe;
 
+struct intel_panel_bl_funcs {
+	/* Connector and platform specific backlight functions */
+	int (*setup)(struct intel_connector *connector, enum pipe pipe);
+	u32 (*get)(struct intel_connector *connector, enum pipe pipe);
+	void (*set)(const struct drm_connector_state *conn_state, u32 level);
+	void (*disable)(const struct drm_connector_state *conn_state, u32
 level);
+	void (*enable)(const struct intel_crtc_state *crtc_state,
+		       const struct drm_connector_state *conn_state, u32 level);
+	u32 (*hz_to_pwm)(struct intel_connector *connector, u32 hz); };
+
 void intel_backlight_init_funcs(struct intel_panel *panel);  int
 intel_backlight_setup(struct intel_connector *connector, enum pipe pipe);

void intel_backlight_destroy(struct intel_panel *panel); diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 90a5d29169c6..514ca067e139 100644

drivers/gpu/drm/i915/display/intel_display_types.h +1 -11
@@ -63,6 +63,7 @@ struct intel_dp_link_training;  struct intel_fbc;  struct
 intel_global_objs_state;  struct intel_hdcp_shim;
+struct intel_panel_bl_funcs;
 struct intel_panic;
 struct intel_tc_port;
 
@@ -305,17 +306,6 @@ struct intel_encoder {
 	const struct intel_bios_encoder_data *devdata;  };
 
-struct intel_panel_bl_funcs {
-	/* Connector and platform specific backlight functions */
-	int (*setup)(struct intel_connector *connector, enum pipe pipe);
-	u32 (*get)(struct intel_connector *connector, enum pipe pipe);
-	void (*set)(const struct drm_connector_state *conn_state, u32 level);
-	void (*disable)(const struct drm_connector_state *conn_state, u32
 level);
-	void (*enable)(const struct intel_crtc_state *crtc_state,
-		       const struct drm_connector_state *conn_state, u32 level);
-	u32 (*hz_to_pwm)(struct intel_connector *connector, u32 hz);
-};
-
 /* in 100us units */
 struct intel_pps_delays {
 	u16 power_up;      /* eDP: T1+T3,   LVDS: T1+T2 */
drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c +1 -1
index b3c453bf7d5c..14fefd77cecd 100644
@@ -27,6 +27,7 @@
 #include <drm/drm_print.h>
 #include <video/mipi_display.h>
 
+#include "intel_backlight.h"
 #include "intel_display_core.h"
 #include "intel_display_types.h"
 #include "intel_dsi.h"
--

2.47.3