[igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once
Manasi Navare
manasi.d.navare at intel.com
Tue Jun 11 19:07:33 UTC 2019
On Mon, Jun 10, 2019 at 04:26:16PM -0700, Anusha Srivatsa wrote:
> Instead of doing a debugfs_simple_read and then
> a debugfs_read(), lets read the debugfs node just once.
> We anyway get the suitable return from the following
> strstr operation.
>
> For any following subtests, we will be reading only the
> contents of the buffer. We can avoid the simple_read
> altogether.
>
> Cc: Manasi Navare <manasi.d.navare at intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
Makes sense and looks good to me.
Reviewed-by: Manasi Navare <<manasi.d.navare at intel.com>
Manasi
> ---
> tests/kms_dp_dsc.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
> index e2e3aaa0..7f2bf276 100644
> --- a/tests/kms_dp_dsc.c
> +++ b/tests/kms_dp_dsc.c
> @@ -80,8 +80,6 @@ static bool is_dp_dsc_supported(data_t *data)
>
> strcpy(file_name, data->conn_name);
> strcat(file_name, "/i915_dsc_fec_support");
> - igt_require(igt_debugfs_simple_read(data->debugfs_fd, file_name, buf,
> - sizeof(buf)) > 0);
> igt_debugfs_read(data->drm_fd, file_name, buf);
>
> return strstr(buf, "DSC_Sink_Support: yes");
> --
> 2.17.1
>
More information about the igt-dev
mailing list