Commit 0396403c authored by Jani Nikula's avatar Jani Nikula

drm/i915/pps: move pps debugfs file to intel_pps.c

Continue with placing debugfs next to the implementation.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240408094357.3085319-1-jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 2b8ad19d
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "intel_hdmi.h" #include "intel_hdmi.h"
#include "intel_hotplug.h" #include "intel_hotplug.h"
#include "intel_panel.h" #include "intel_panel.h"
#include "intel_pps.h"
#include "intel_psr.h" #include "intel_psr.h"
#include "intel_psr_regs.h" #include "intel_psr_regs.h"
#include "intel_wm.h" #include "intel_wm.h"
...@@ -1095,27 +1096,6 @@ void intel_display_debugfs_register(struct drm_i915_private *i915) ...@@ -1095,27 +1096,6 @@ void intel_display_debugfs_register(struct drm_i915_private *i915)
intel_display_debugfs_params(i915); intel_display_debugfs_params(i915);
} }
static int i915_panel_show(struct seq_file *m, void *data)
{
struct intel_connector *connector = m->private;
struct intel_dp *intel_dp = intel_attached_dp(connector);
if (connector->base.status != connector_status_connected)
return -ENODEV;
seq_printf(m, "Panel power up delay: %d\n",
intel_dp->pps.panel_power_up_delay);
seq_printf(m, "Panel power down delay: %d\n",
intel_dp->pps.panel_power_down_delay);
seq_printf(m, "Backlight on delay: %d\n",
intel_dp->pps.backlight_on_delay);
seq_printf(m, "Backlight off delay: %d\n",
intel_dp->pps.backlight_off_delay);
return 0;
}
DEFINE_SHOW_ATTRIBUTE(i915_panel);
static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data) static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data)
{ {
struct intel_connector *connector = m->private; struct intel_connector *connector = m->private;
...@@ -1560,12 +1540,9 @@ void intel_connector_debugfs_add(struct intel_connector *connector) ...@@ -1560,12 +1540,9 @@ void intel_connector_debugfs_add(struct intel_connector *connector)
return; return;
intel_drrs_connector_debugfs_add(connector); intel_drrs_connector_debugfs_add(connector);
intel_pps_connector_debugfs_add(connector);
intel_psr_connector_debugfs_add(connector); intel_psr_connector_debugfs_add(connector);
if (connector_type == DRM_MODE_CONNECTOR_eDP)
debugfs_create_file("i915_panel_timings", 0444, root,
connector, &i915_panel_fops);
if (connector_type == DRM_MODE_CONNECTOR_DisplayPort || if (connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
connector_type == DRM_MODE_CONNECTOR_HDMIA || connector_type == DRM_MODE_CONNECTOR_HDMIA ||
connector_type == DRM_MODE_CONNECTOR_HDMIB) { connector_type == DRM_MODE_CONNECTOR_HDMIB) {
......
...@@ -1670,6 +1670,37 @@ void intel_pps_setup(struct drm_i915_private *i915) ...@@ -1670,6 +1670,37 @@ void intel_pps_setup(struct drm_i915_private *i915)
i915->display.pps.mmio_base = PPS_BASE; i915->display.pps.mmio_base = PPS_BASE;
} }
static int intel_pps_show(struct seq_file *m, void *data)
{
struct intel_connector *connector = m->private;
struct intel_dp *intel_dp = intel_attached_dp(connector);
if (connector->base.status != connector_status_connected)
return -ENODEV;
seq_printf(m, "Panel power up delay: %d\n",
intel_dp->pps.panel_power_up_delay);
seq_printf(m, "Panel power down delay: %d\n",
intel_dp->pps.panel_power_down_delay);
seq_printf(m, "Backlight on delay: %d\n",
intel_dp->pps.backlight_on_delay);
seq_printf(m, "Backlight off delay: %d\n",
intel_dp->pps.backlight_off_delay);
return 0;
}
DEFINE_SHOW_ATTRIBUTE(intel_pps);
void intel_pps_connector_debugfs_add(struct intel_connector *connector)
{
struct dentry *root = connector->base.debugfs_entry;
int connector_type = connector->base.connector_type;
if (connector_type == DRM_MODE_CONNECTOR_eDP)
debugfs_create_file("i915_panel_timings", 0444, root,
connector, &intel_pps_fops);
}
void assert_pps_unlocked(struct drm_i915_private *dev_priv, enum pipe pipe) void assert_pps_unlocked(struct drm_i915_private *dev_priv, enum pipe pipe)
{ {
i915_reg_t pp_reg; i915_reg_t pp_reg;
......
...@@ -51,6 +51,8 @@ void vlv_pps_init(struct intel_encoder *encoder, ...@@ -51,6 +51,8 @@ void vlv_pps_init(struct intel_encoder *encoder,
void intel_pps_unlock_regs_wa(struct drm_i915_private *i915); void intel_pps_unlock_regs_wa(struct drm_i915_private *i915);
void intel_pps_setup(struct drm_i915_private *i915); void intel_pps_setup(struct drm_i915_private *i915);
void intel_pps_connector_debugfs_add(struct intel_connector *connector);
void assert_pps_unlocked(struct drm_i915_private *i915, enum pipe pipe); void assert_pps_unlocked(struct drm_i915_private *i915, enum pipe pipe);
#endif /* __INTEL_PPS_H__ */ #endif /* __INTEL_PPS_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment