Skip to content

Commit 1de99ff

Browse files
committed
drm/i915: Dump DSC state to dmesg and debugfs/i915_display_info
Dump the DSC state to dmesg during HW readout and state computation as well as the i915_display_info debugfs entry. v2: Rebase on the s/DRM_X16/FXP_Q4 change. Acked-by: Jani Nikula <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2796b7c commit 1de99ff

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

drivers/gpu/drm/i915/display/intel_crtc_state_dump.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "intel_crtc_state_dump.h"
1111
#include "intel_display_types.h"
1212
#include "intel_hdmi.h"
13+
#include "intel_vdsc.h"
1314
#include "intel_vrr.h"
1415

1516
static void intel_dump_crtc_timings(struct drm_printer *p,
@@ -369,6 +370,8 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config,
369370
else if (IS_VALLEYVIEW(i915))
370371
vlv_dump_csc(&p, "wgc csc", &pipe_config->csc);
371372

373+
intel_vdsc_state_dump(&p, 0, pipe_config);
374+
372375
dump_planes:
373376
if (!state)
374377
return;

drivers/gpu/drm/i915/display/intel_display_debugfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "intel_pps.h"
3737
#include "intel_psr.h"
3838
#include "intel_psr_regs.h"
39+
#include "intel_vdsc.h"
3940
#include "intel_wm.h"
4041

4142
static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node)
@@ -551,6 +552,7 @@ static void crtc_updates_add(struct intel_crtc *crtc)
551552
static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
552553
{
553554
struct drm_i915_private *dev_priv = node_to_i915(m->private);
555+
struct drm_printer p = drm_seq_file_printer(m);
554556
const struct intel_crtc_state *crtc_state =
555557
to_intel_crtc_state(crtc->base.state);
556558
struct intel_encoder *encoder;
@@ -581,6 +583,8 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
581583
crtc_state->joiner_pipes,
582584
intel_crtc_is_joiner_secondary(crtc_state) ? "slave" : "master");
583585

586+
intel_vdsc_state_dump(&p, 1, crtc_state);
587+
584588
for_each_intel_encoder_mask(&dev_priv->drm, encoder,
585589
crtc_state->uapi.encoder_mask)
586590
intel_encoder_info(m, crtc, encoder);

drivers/gpu/drm/i915/display/intel_vdsc.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,3 +990,23 @@ void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
990990
out:
991991
intel_display_power_put(dev_priv, power_domain, wakeref);
992992
}
993+
994+
static void intel_vdsc_dump_state(struct drm_printer *p, int indent,
995+
const struct intel_crtc_state *crtc_state)
996+
{
997+
drm_printf_indent(p, indent,
998+
"dsc-dss: compressed-bpp:" FXP_Q4_FMT ", slice-count: %d, split: %s\n",
999+
FXP_Q4_ARGS(crtc_state->dsc.compressed_bpp_x16),
1000+
crtc_state->dsc.slice_count,
1001+
str_yes_no(crtc_state->dsc.dsc_split));
1002+
}
1003+
1004+
void intel_vdsc_state_dump(struct drm_printer *p, int indent,
1005+
const struct intel_crtc_state *crtc_state)
1006+
{
1007+
if (!crtc_state->dsc.compression_enable)
1008+
return;
1009+
1010+
intel_vdsc_dump_state(p, indent, crtc_state);
1011+
drm_dsc_dump_config(p, indent, &crtc_state->dsc.config);
1012+
}

drivers/gpu/drm/i915/display/intel_vdsc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include <linux/types.h>
1010

11+
struct drm_printer;
12+
1113
enum transcoder;
1214
struct intel_crtc;
1315
struct intel_crtc_state;
@@ -27,5 +29,7 @@ void intel_dsc_dsi_pps_write(struct intel_encoder *encoder,
2729
const struct intel_crtc_state *crtc_state);
2830
void intel_dsc_dp_pps_write(struct intel_encoder *encoder,
2931
const struct intel_crtc_state *crtc_state);
32+
void intel_vdsc_state_dump(struct drm_printer *p, int indent,
33+
const struct intel_crtc_state *crtc_state);
3034

3135
#endif /* __INTEL_VDSC_H__ */

0 commit comments

Comments
 (0)