Commit 4ae7eb92 authored by Jani Nikula's avatar Jani Nikula

drm/i915: separate display info printing from the rest

Add new function intel_display_device_info_print() and print the display
device info there instead of intel_device_info_print(). This also fixes
the display runtime info printing to use the actual runtime info instead
of the static defaults.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/30d4f93c58839bc9312b43423cd43bc0ef655a35.1687878757.git.jani.nikula@intel.com
parent 8776711e
...@@ -981,3 +981,24 @@ void intel_display_device_info_runtime_init(struct drm_i915_private *i915) ...@@ -981,3 +981,24 @@ void intel_display_device_info_runtime_init(struct drm_i915_private *i915)
display_fused_off: display_fused_off:
memset(display_runtime, 0, sizeof(*display_runtime)); memset(display_runtime, 0, sizeof(*display_runtime));
} }
void intel_display_device_info_print(const struct intel_display_device_info *info,
const struct intel_display_runtime_info *runtime,
struct drm_printer *p)
{
if (runtime->ip.rel)
drm_printf(p, "display version: %u.%02u\n",
runtime->ip.ver,
runtime->ip.rel);
else
drm_printf(p, "display version: %u\n",
runtime->ip.ver);
#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->name))
DEV_INFO_DISPLAY_FOR_EACH_FLAG(PRINT_FLAG);
#undef PRINT_FLAG
drm_printf(p, "has_hdcp: %s\n", str_yes_no(runtime->has_hdcp));
drm_printf(p, "has_dmc: %s\n", str_yes_no(runtime->has_dmc));
drm_printf(p, "has_dsc: %s\n", str_yes_no(runtime->has_dsc));
}
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "intel_display_limits.h" #include "intel_display_limits.h"
struct drm_i915_private; struct drm_i915_private;
struct drm_printer;
#define DEV_INFO_DISPLAY_FOR_EACH_FLAG(func) \ #define DEV_INFO_DISPLAY_FOR_EACH_FLAG(func) \
/* Keep in alphabetical order */ \ /* Keep in alphabetical order */ \
...@@ -127,4 +128,8 @@ intel_display_device_probe(struct drm_i915_private *i915, bool has_gmdid, ...@@ -127,4 +128,8 @@ intel_display_device_probe(struct drm_i915_private *i915, bool has_gmdid,
u16 *ver, u16 *rel, u16 *step); u16 *ver, u16 *rel, u16 *step);
void intel_display_device_info_runtime_init(struct drm_i915_private *i915); void intel_display_device_info_runtime_init(struct drm_i915_private *i915);
void intel_display_device_info_print(const struct intel_display_device_info *info,
const struct intel_display_runtime_info *runtime,
struct drm_printer *p);
#endif #endif
...@@ -67,6 +67,7 @@ static int i915_capabilities(struct seq_file *m, void *data) ...@@ -67,6 +67,7 @@ static int i915_capabilities(struct seq_file *m, void *data)
seq_printf(m, "pch: %d\n", INTEL_PCH_TYPE(i915)); seq_printf(m, "pch: %d\n", INTEL_PCH_TYPE(i915));
intel_device_info_print(INTEL_INFO(i915), RUNTIME_INFO(i915), &p); intel_device_info_print(INTEL_INFO(i915), RUNTIME_INFO(i915), &p);
intel_display_device_info_print(DISPLAY_INFO(i915), DISPLAY_RUNTIME_INFO(i915), &p);
i915_print_iommu_status(i915, &p); i915_print_iommu_status(i915, &p);
intel_gt_info_print(&to_gt(i915)->info, &p); intel_gt_info_print(&to_gt(i915)->info, &p);
intel_driver_caps_print(&i915->caps, &p); intel_driver_caps_print(&i915->caps, &p);
......
...@@ -711,6 +711,8 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv) ...@@ -711,6 +711,8 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
intel_device_info_print(INTEL_INFO(dev_priv), intel_device_info_print(INTEL_INFO(dev_priv),
RUNTIME_INFO(dev_priv), &p); RUNTIME_INFO(dev_priv), &p);
intel_display_device_info_print(DISPLAY_INFO(dev_priv),
DISPLAY_RUNTIME_INFO(dev_priv), &p);
i915_print_iommu_status(dev_priv, &p); i915_print_iommu_status(dev_priv, &p);
for_each_gt(gt, dev_priv, i) for_each_gt(gt, dev_priv, i)
intel_gt_info_print(&gt->info, &p); intel_gt_info_print(&gt->info, &p);
......
...@@ -649,6 +649,8 @@ static void err_print_capabilities(struct drm_i915_error_state_buf *m, ...@@ -649,6 +649,8 @@ static void err_print_capabilities(struct drm_i915_error_state_buf *m,
struct drm_printer p = i915_error_printer(m); struct drm_printer p = i915_error_printer(m);
intel_device_info_print(&error->device_info, &error->runtime_info, &p); intel_device_info_print(&error->device_info, &error->runtime_info, &p);
intel_display_device_info_print(&error->display_device_info,
&error->display_runtime_info, &p);
intel_driver_caps_print(&error->driver_caps, &p); intel_driver_caps_print(&error->driver_caps, &p);
} }
...@@ -1983,6 +1985,10 @@ static void capture_gen(struct i915_gpu_coredump *error) ...@@ -1983,6 +1985,10 @@ static void capture_gen(struct i915_gpu_coredump *error)
memcpy(&error->runtime_info, memcpy(&error->runtime_info,
RUNTIME_INFO(i915), RUNTIME_INFO(i915),
sizeof(error->runtime_info)); sizeof(error->runtime_info));
memcpy(&error->display_device_info, DISPLAY_INFO(i915),
sizeof(error->display_device_info));
memcpy(&error->display_runtime_info, DISPLAY_RUNTIME_INFO(i915),
sizeof(error->display_runtime_info));
error->driver_caps = i915->caps; error->driver_caps = i915->caps;
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <drm/drm_mm.h> #include <drm/drm_mm.h>
#include "display/intel_display_device.h"
#include "gt/intel_engine.h" #include "gt/intel_engine.h"
#include "gt/intel_gt_types.h" #include "gt/intel_gt_types.h"
#include "gt/uc/intel_uc_fw.h" #include "gt/uc/intel_uc_fw.h"
...@@ -209,6 +210,8 @@ struct i915_gpu_coredump { ...@@ -209,6 +210,8 @@ struct i915_gpu_coredump {
struct intel_device_info device_info; struct intel_device_info device_info;
struct intel_runtime_info runtime_info; struct intel_runtime_info runtime_info;
struct intel_display_device_info display_device_info;
struct intel_display_runtime_info display_runtime_info;
struct intel_driver_caps driver_caps; struct intel_driver_caps driver_caps;
struct i915_params params; struct i915_params params;
......
...@@ -93,9 +93,6 @@ void intel_device_info_print(const struct intel_device_info *info, ...@@ -93,9 +93,6 @@ void intel_device_info_print(const struct intel_device_info *info,
const struct intel_runtime_info *runtime, const struct intel_runtime_info *runtime,
struct drm_printer *p) struct drm_printer *p)
{ {
const struct intel_display_runtime_info *display_runtime =
&info->display->__runtime_defaults;
if (runtime->graphics.ip.rel) if (runtime->graphics.ip.rel)
drm_printf(p, "graphics version: %u.%02u\n", drm_printf(p, "graphics version: %u.%02u\n",
runtime->graphics.ip.ver, runtime->graphics.ip.ver,
...@@ -112,14 +109,6 @@ void intel_device_info_print(const struct intel_device_info *info, ...@@ -112,14 +109,6 @@ void intel_device_info_print(const struct intel_device_info *info,
drm_printf(p, "media version: %u\n", drm_printf(p, "media version: %u\n",
runtime->media.ip.ver); runtime->media.ip.ver);
if (display_runtime->ip.rel)
drm_printf(p, "display version: %u.%02u\n",
display_runtime->ip.ver,
display_runtime->ip.rel);
else
drm_printf(p, "display version: %u\n",
display_runtime->ip.ver);
drm_printf(p, "graphics stepping: %s\n", intel_step_name(runtime->step.graphics_step)); drm_printf(p, "graphics stepping: %s\n", intel_step_name(runtime->step.graphics_step));
drm_printf(p, "media stepping: %s\n", intel_step_name(runtime->step.media_step)); drm_printf(p, "media stepping: %s\n", intel_step_name(runtime->step.media_step));
drm_printf(p, "display stepping: %s\n", intel_step_name(runtime->step.display_step)); drm_printf(p, "display stepping: %s\n", intel_step_name(runtime->step.display_step));
...@@ -138,15 +127,6 @@ void intel_device_info_print(const struct intel_device_info *info, ...@@ -138,15 +127,6 @@ void intel_device_info_print(const struct intel_device_info *info,
#undef PRINT_FLAG #undef PRINT_FLAG
drm_printf(p, "has_pooled_eu: %s\n", str_yes_no(runtime->has_pooled_eu)); drm_printf(p, "has_pooled_eu: %s\n", str_yes_no(runtime->has_pooled_eu));
#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->display->name))
DEV_INFO_DISPLAY_FOR_EACH_FLAG(PRINT_FLAG);
#undef PRINT_FLAG
drm_printf(p, "has_hdcp: %s\n", str_yes_no(display_runtime->has_hdcp));
drm_printf(p, "has_dmc: %s\n", str_yes_no(display_runtime->has_dmc));
drm_printf(p, "has_dsc: %s\n", str_yes_no(display_runtime->has_dsc));
drm_printf(p, "rawclk rate: %u kHz\n", runtime->rawclk_freq); drm_printf(p, "rawclk rate: %u kHz\n", runtime->rawclk_freq);
} }
......
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