* [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support
@ 2021-12-08 19:22 Rob Clark
2021-12-08 19:22 ` [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup Rob Clark
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Rob Clark @ 2021-12-08 19:22 UTC (permalink / raw)
To: igt-dev; +Cc: Bjorn Andersson, Abhinav Kumar, linux-arm-msm, Rob Clark
From: Rob Clark <robdclark@chromium.org>
Update the compliance tool with an optional arg to specify the connector
name. This will be required for newer kernels, which will move the
needed debugfs files into a per-connector subdirectory.
Rob Clark (2):
tools/msm_dp_compliance: Small arg parsing cleanup
tools/msm_dp_compliance: Add arg to specify connector name
tools/msm_dp_compliance.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
--
2.33.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup 2021-12-08 19:22 [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Rob Clark @ 2021-12-08 19:22 ` Rob Clark 2023-10-19 10:40 ` Abhinav Kumar 2021-12-08 19:22 ` [PATCH igt 2/2] tools/msm_dp_compliance: Add arg to specify connector name Rob Clark 2021-12-08 19:50 ` [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Abhinav Kumar 2 siblings, 1 reply; 7+ messages in thread From: Rob Clark @ 2021-12-08 19:22 UTC (permalink / raw) To: igt-dev; +Cc: Bjorn Andersson, Abhinav Kumar, linux-arm-msm, Rob Clark From: Rob Clark <robdclark@chromium.org> Signed-off-by: Rob Clark <robdclark@chromium.org> --- tools/msm_dp_compliance.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c index 5e491c89..a15a8dd9 100644 --- a/tools/msm_dp_compliance.c +++ b/tools/msm_dp_compliance.c @@ -629,7 +629,9 @@ static const char optstr[] = "hi"; static void __attribute__((noreturn)) usage(char *name, char opt) { igt_info("usage: %s [-hi]\n", name); - igt_info("\t-i\tdump info\n"); + igt_info("\t-h, --help - print this usage message"); + igt_info("\t--help-description - print test description"); + igt_info("\t-i, --info - dump info\n"); igt_info("\tDefault is to respond to Qd980 tests\n"); exit((opt != 'h') ? -1 : 0); } @@ -709,6 +711,7 @@ int main(int argc, char **argv) struct option long_opts[] = { {"help-description", 0, 0, HELP_DESCRIPTION}, {"help", 0, 0, 'h'}, + {"info", 0, 0, 'i'}, }; enter_exec_path(argv); -- 2.33.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup 2021-12-08 19:22 ` [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup Rob Clark @ 2023-10-19 10:40 ` Abhinav Kumar 2023-10-24 8:17 ` [igt-dev] " Kamil Konieczny 0 siblings, 1 reply; 7+ messages in thread From: Abhinav Kumar @ 2023-10-19 10:40 UTC (permalink / raw) To: Rob Clark, igt-dev; +Cc: Bjorn Andersson, linux-arm-msm, Rob Clark Reviving this: On 12/8/2021 11:22 AM, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Nit: shouldnt the patch prefix be "PATCH i-g-t" ? We will test this out next week and land this. > --- > tools/msm_dp_compliance.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c > index 5e491c89..a15a8dd9 100644 > --- a/tools/msm_dp_compliance.c > +++ b/tools/msm_dp_compliance.c > @@ -629,7 +629,9 @@ static const char optstr[] = "hi"; > static void __attribute__((noreturn)) usage(char *name, char opt) > { > igt_info("usage: %s [-hi]\n", name); > - igt_info("\t-i\tdump info\n"); > + igt_info("\t-h, --help - print this usage message"); > + igt_info("\t--help-description - print test description"); > + igt_info("\t-i, --info - dump info\n"); > igt_info("\tDefault is to respond to Qd980 tests\n"); > exit((opt != 'h') ? -1 : 0); > } > @@ -709,6 +711,7 @@ int main(int argc, char **argv) > struct option long_opts[] = { > {"help-description", 0, 0, HELP_DESCRIPTION}, > {"help", 0, 0, 'h'}, > + {"info", 0, 0, 'i'}, > }; > > enter_exec_path(argv); ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup 2023-10-19 10:40 ` Abhinav Kumar @ 2023-10-24 8:17 ` Kamil Konieczny 0 siblings, 0 replies; 7+ messages in thread From: Kamil Konieczny @ 2023-10-24 8:17 UTC (permalink / raw) To: Abhinav Kumar Cc: Rob Clark, igt-dev, Rob Clark, linux-arm-msm, Bjorn Andersson Hi Rob, please add here description, for example what options you added and why. On 2023-10-19 at 03:40:04 -0700, Abhinav Kumar wrote: > Reviving this: > > On 12/8/2021 11:22 AM, Rob Clark wrote: > > From: Rob Clark <robdclark@chromium.org> > > > > Signed-off-by: Rob Clark <robdclark@chromium.org> > > Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > > Nit: shouldnt the patch prefix be "PATCH i-g-t" ? > > We will test this out next week and land this. > > > --- > > tools/msm_dp_compliance.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c > > index 5e491c89..a15a8dd9 100644 > > --- a/tools/msm_dp_compliance.c > > +++ b/tools/msm_dp_compliance.c > > @@ -629,7 +629,9 @@ static const char optstr[] = "hi"; > > static void __attribute__((noreturn)) usage(char *name, char opt) > > { > > igt_info("usage: %s [-hi]\n", name); > > - igt_info("\t-i\tdump info\n"); > > + igt_info("\t-h, --help - print this usage message"); > > + igt_info("\t--help-description - print test description"); ------------------------------------------------ ^^^^ This is a tool, not a test, so imho s/test/tool/ Regards, Kamil > > + igt_info("\t-i, --info - dump info\n"); > > igt_info("\tDefault is to respond to Qd980 tests\n"); > > exit((opt != 'h') ? -1 : 0); > > } > > @@ -709,6 +711,7 @@ int main(int argc, char **argv) > > struct option long_opts[] = { > > {"help-description", 0, 0, HELP_DESCRIPTION}, > > {"help", 0, 0, 'h'}, > > + {"info", 0, 0, 'i'}, > > }; > > enter_exec_path(argv); ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH igt 2/2] tools/msm_dp_compliance: Add arg to specify connector name 2021-12-08 19:22 [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Rob Clark 2021-12-08 19:22 ` [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup Rob Clark @ 2021-12-08 19:22 ` Rob Clark 2023-10-19 10:43 ` Abhinav Kumar 2021-12-08 19:50 ` [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Abhinav Kumar 2 siblings, 1 reply; 7+ messages in thread From: Rob Clark @ 2021-12-08 19:22 UTC (permalink / raw) To: igt-dev; +Cc: Bjorn Andersson, Abhinav Kumar, linux-arm-msm, Rob Clark From: Rob Clark <robdclark@chromium.org> To support multiple DP connectors, the debugfs files will be moving into a per-connector subdirectory in debugfs. So add an arg to specify the appropriate connector name. Signed-off-by: Rob Clark <robdclark@chromium.org> --- tools/msm_dp_compliance.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c index a15a8dd9..bc79a061 100644 --- a/tools/msm_dp_compliance.c +++ b/tools/msm_dp_compliance.c @@ -205,10 +205,15 @@ static FILE *fopenat(int dir, const char *name, const char *mode) return fdopen(fd, mode); } -static void setup_debugfs_files(void) +static void setup_debugfs_files(const char *connector_name) { int dir = igt_debugfs_dir(drm_fd); + if (connector_name) { + dir = openat(dir, connector_name, O_RDONLY); + igt_require(dir >= 0); + } + test_type_fp = fopenat(dir, MSM_DP_TEST_TYPE_FILE, "r"); igt_require(test_type_fp); @@ -624,11 +629,12 @@ int update_display(int mode, bool is_compliance_test) return ret; } -static const char optstr[] = "hi"; +static const char optstr[] = "c:hi"; static void __attribute__((noreturn)) usage(char *name, char opt) { - igt_info("usage: %s [-hi]\n", name); + igt_info("usage: %s [-hi] [-c NAME]\n", name); + igt_info("\t-c, --connector=NAME - specify connector name"); igt_info("\t-h, --help - print this usage message"); igt_info("\t--help-description - print test description"); igt_info("\t-i, --info - dump info\n"); @@ -708,7 +714,9 @@ int main(int argc, char **argv) GIOChannel *stdinchannel, *testactive_channel; GMainLoop *mainloop; bool opt_dump_info = false; + char *opt_connector_name = NULL; struct option long_opts[] = { + {"connector", 1, 0, 'c'}, {"help-description", 0, 0, HELP_DESCRIPTION}, {"help", 0, 0, 'h'}, {"info", 0, 0, 'i'}, @@ -718,6 +726,9 @@ int main(int argc, char **argv) while ((c = getopt_long(argc, argv, optstr, long_opts, NULL)) != -1) { switch (c) { + case 'c': + opt_connector_name = optarg; + break; case 'i': opt_dump_info = true; break; @@ -739,7 +750,7 @@ int main(int argc, char **argv) drm_fd = drm_open_driver(DRIVER_ANY); kmstest_set_vt_graphics_mode(); - setup_debugfs_files(); + setup_debugfs_files(opt_connector_name); cleanup_test(); if (opt_dump_info) { dump_info(); -- 2.33.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH igt 2/2] tools/msm_dp_compliance: Add arg to specify connector name 2021-12-08 19:22 ` [PATCH igt 2/2] tools/msm_dp_compliance: Add arg to specify connector name Rob Clark @ 2023-10-19 10:43 ` Abhinav Kumar 0 siblings, 0 replies; 7+ messages in thread From: Abhinav Kumar @ 2023-10-19 10:43 UTC (permalink / raw) To: Rob Clark, igt-dev; +Cc: Bjorn Andersson, linux-arm-msm, Rob Clark <reviving this> On 12/8/2021 11:22 AM, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > To support multiple DP connectors, the debugfs files will be moving into > a per-connector subdirectory in debugfs. So add an arg to specify the > appropriate connector name. > > Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Nit: shouldnt the patch prefix be "PATCH i-g-t" ? We will test this out next week and land this. > --- > tools/msm_dp_compliance.c | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c > index a15a8dd9..bc79a061 100644 > --- a/tools/msm_dp_compliance.c > +++ b/tools/msm_dp_compliance.c > @@ -205,10 +205,15 @@ static FILE *fopenat(int dir, const char *name, const char *mode) > return fdopen(fd, mode); > } > > -static void setup_debugfs_files(void) > +static void setup_debugfs_files(const char *connector_name) > { > int dir = igt_debugfs_dir(drm_fd); > > + if (connector_name) { > + dir = openat(dir, connector_name, O_RDONLY); > + igt_require(dir >= 0); > + } > + > test_type_fp = fopenat(dir, MSM_DP_TEST_TYPE_FILE, "r"); > igt_require(test_type_fp); > > @@ -624,11 +629,12 @@ int update_display(int mode, bool is_compliance_test) > return ret; > } > > -static const char optstr[] = "hi"; > +static const char optstr[] = "c:hi"; > > static void __attribute__((noreturn)) usage(char *name, char opt) > { > - igt_info("usage: %s [-hi]\n", name); > + igt_info("usage: %s [-hi] [-c NAME]\n", name); > + igt_info("\t-c, --connector=NAME - specify connector name"); > igt_info("\t-h, --help - print this usage message"); > igt_info("\t--help-description - print test description"); > igt_info("\t-i, --info - dump info\n"); > @@ -708,7 +714,9 @@ int main(int argc, char **argv) > GIOChannel *stdinchannel, *testactive_channel; > GMainLoop *mainloop; > bool opt_dump_info = false; > + char *opt_connector_name = NULL; > struct option long_opts[] = { > + {"connector", 1, 0, 'c'}, > {"help-description", 0, 0, HELP_DESCRIPTION}, > {"help", 0, 0, 'h'}, > {"info", 0, 0, 'i'}, > @@ -718,6 +726,9 @@ int main(int argc, char **argv) > > while ((c = getopt_long(argc, argv, optstr, long_opts, NULL)) != -1) { > switch (c) { > + case 'c': > + opt_connector_name = optarg; > + break; > case 'i': > opt_dump_info = true; > break; > @@ -739,7 +750,7 @@ int main(int argc, char **argv) > drm_fd = drm_open_driver(DRIVER_ANY); > > kmstest_set_vt_graphics_mode(); > - setup_debugfs_files(); > + setup_debugfs_files(opt_connector_name); > cleanup_test(); > if (opt_dump_info) { > dump_info(); ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support 2021-12-08 19:22 [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Rob Clark 2021-12-08 19:22 ` [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup Rob Clark 2021-12-08 19:22 ` [PATCH igt 2/2] tools/msm_dp_compliance: Add arg to specify connector name Rob Clark @ 2021-12-08 19:50 ` Abhinav Kumar 2 siblings, 0 replies; 7+ messages in thread From: Abhinav Kumar @ 2021-12-08 19:50 UTC (permalink / raw) To: Rob Clark, igt-dev; +Cc: Bjorn Andersson, linux-arm-msm, Rob Clark I have not validated compliance with this but it should work. For the series, Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> On 12/8/2021 11:22 AM, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > Update the compliance tool with an optional arg to specify the connector > name. This will be required for newer kernels, which will move the > needed debugfs files into a per-connector subdirectory. > > Rob Clark (2): > tools/msm_dp_compliance: Small arg parsing cleanup > tools/msm_dp_compliance: Add arg to specify connector name > > tools/msm_dp_compliance.c | 24 +++++++++++++++++++----- > 1 file changed, 19 insertions(+), 5 deletions(-) > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-24 8:18 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-08 19:22 [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Rob Clark 2021-12-08 19:22 ` [PATCH igt 1/2] tools/msm_dp_compliance: Small arg parsing cleanup Rob Clark 2023-10-19 10:40 ` Abhinav Kumar 2023-10-24 8:17 ` [igt-dev] " Kamil Konieczny 2021-12-08 19:22 ` [PATCH igt 2/2] tools/msm_dp_compliance: Add arg to specify connector name Rob Clark 2023-10-19 10:43 ` Abhinav Kumar 2021-12-08 19:50 ` [PATCH igt 0/2] tools/msm_dp_compliance: Multi-connector support Abhinav Kumar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox