Lines Matching +full:d +full:- +full:link
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
6 #define pr_fmt(fmt)"[drm-dp] %s: " fmt, __func__
24 struct dp_link *link; member
35 struct dp_debug_private *debug = seq->private; in dp_debug_show()
41 return -ENODEV; in dp_debug_show()
43 drm_mode = &debug->panel->dp_mode.drm_mode; in dp_debug_show()
47 debug->panel->link_info.rate); in dp_debug_show()
49 debug->panel->link_info.num_lanes); in dp_debug_show()
51 debug->panel->link_info.capabilities); in dp_debug_show()
52 seq_printf(seq, "\tdp_panel_info:\n\t\tactive = %dx%d\n", in dp_debug_show()
53 drm_mode->hdisplay, in dp_debug_show()
54 drm_mode->vdisplay); in dp_debug_show()
55 seq_printf(seq, "\t\tback_porch = %dx%d\n", in dp_debug_show()
56 drm_mode->htotal - drm_mode->hsync_end, in dp_debug_show()
57 drm_mode->vtotal - drm_mode->vsync_end); in dp_debug_show()
58 seq_printf(seq, "\t\tfront_porch = %dx%d\n", in dp_debug_show()
59 drm_mode->hsync_start - drm_mode->hdisplay, in dp_debug_show()
60 drm_mode->vsync_start - drm_mode->vdisplay); in dp_debug_show()
61 seq_printf(seq, "\t\tsync_width = %dx%d\n", in dp_debug_show()
62 drm_mode->hsync_end - drm_mode->hsync_start, in dp_debug_show()
63 drm_mode->vsync_end - drm_mode->vsync_start); in dp_debug_show()
64 seq_printf(seq, "\t\tactive_low = %dx%d\n", in dp_debug_show()
65 debug->panel->dp_mode.h_active_low, in dp_debug_show()
66 debug->panel->dp_mode.v_active_low); in dp_debug_show()
67 seq_printf(seq, "\t\th_skew = %d\n", in dp_debug_show()
68 drm_mode->hskew); in dp_debug_show()
69 seq_printf(seq, "\t\trefresh rate = %d\n", in dp_debug_show()
71 seq_printf(seq, "\t\tpixel clock khz = %d\n", in dp_debug_show()
72 drm_mode->clock); in dp_debug_show()
73 seq_printf(seq, "\t\tbpp = %d\n", in dp_debug_show()
74 debug->panel->dp_mode.bpp); in dp_debug_show()
76 /* Link Information */ in dp_debug_show()
77 seq_printf(seq, "\tdp_link:\n\t\ttest_requested = %d\n", in dp_debug_show()
78 debug->link->sink_request); in dp_debug_show()
79 seq_printf(seq, "\t\tnum_lanes = %d\n", in dp_debug_show()
80 debug->link->link_params.num_lanes); in dp_debug_show()
81 link_params_rate = debug->link->link_params.rate; in dp_debug_show()
82 seq_printf(seq, "\t\tbw_code = %d\n", in dp_debug_show()
84 lclk = debug->link->link_params.rate * 1000; in dp_debug_show()
86 seq_printf(seq, "\t\tv_level = %d\n", in dp_debug_show()
87 debug->link->phy_params.v_level); in dp_debug_show()
88 seq_printf(seq, "\t\tp_level = %d\n", in dp_debug_show()
89 debug->link->phy_params.p_level); in dp_debug_show()
97 const struct dp_debug_private *debug = m->private; in dp_test_data_show()
98 const struct drm_connector *connector = debug->connector; in dp_test_data_show()
101 if (connector->status == connector_status_connected) { in dp_test_data_show()
102 bpc = debug->link->test_video.test_bit_depth; in dp_test_data_show()
103 seq_printf(m, "hdisplay: %d\n", in dp_test_data_show()
104 debug->link->test_video.test_h_width); in dp_test_data_show()
105 seq_printf(m, "vdisplay: %d\n", in dp_test_data_show()
106 debug->link->test_video.test_v_height); in dp_test_data_show()
119 const struct dp_debug_private *debug = m->private; in dp_test_type_show()
120 const struct drm_connector *connector = debug->connector; in dp_test_type_show()
122 if (connector->status == connector_status_connected) in dp_test_type_show()
141 debug = ((struct seq_file *)file->private_data)->private; in dp_test_active_write()
142 connector = debug->connector; in dp_test_active_write()
151 DRM_DEBUG_DRIVER("Copied %d bytes from user\n", (unsigned int)len); in dp_test_active_write()
153 if (connector->status == connector_status_connected) { in dp_test_active_write()
159 DRM_DEBUG_DRIVER("Got %d for test active\n", val); in dp_test_active_write()
164 debug->panel->video_test = true; in dp_test_active_write()
166 debug->panel->video_test = false; in dp_test_active_write()
176 struct dp_debug_private *debug = m->private; in dp_test_active_show()
177 struct drm_connector *connector = debug->connector; in dp_test_active_show()
179 if (connector->status == connector_status_connected) { in dp_test_active_show()
180 if (debug->panel->video_test) in dp_test_active_show()
195 inode->i_private); in dp_test_active_open()
213 snprintf(path, sizeof(path), "msm_dp-%s", debug->connector->name); in dp_debug_init()
215 debug->root = debugfs_create_dir(path, minor->debugfs_root); in dp_debug_init()
217 debugfs_create_file("dp_debug", 0444, debug->root, in dp_debug_init()
221 debug->root, in dp_debug_init()
225 debug->root, in dp_debug_init()
229 debug->root, in dp_debug_init()
234 struct dp_link *link, in dp_debug_get() argument
241 if (!dev || !panel || !link) { in dp_debug_get()
243 rc = -EINVAL; in dp_debug_get()
249 rc = -ENOMEM; in dp_debug_get()
253 debug->dp_debug.debug_en = false; in dp_debug_get()
254 debug->link = link; in dp_debug_get()
255 debug->panel = panel; in dp_debug_get()
256 debug->dev = dev; in dp_debug_get()
257 debug->drm_dev = minor->dev; in dp_debug_get()
258 debug->connector = connector; in dp_debug_get()
260 dp_debug = &debug->dp_debug; in dp_debug_get()
261 dp_debug->vdisplay = 0; in dp_debug_get()
262 dp_debug->hdisplay = 0; in dp_debug_get()
263 dp_debug->vrefresh = 0; in dp_debug_get()
277 return -EINVAL; in dp_debug_deinit()
281 debugfs_remove_recursive(debug->root); in dp_debug_deinit()
297 devm_kfree(debug->dev, debug); in dp_debug_put()