public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once
Date: Tue, 11 Jun 2019 12:07:33 -0700	[thread overview]
Message-ID: <20190611190732.GA1616@intel.com> (raw)
In-Reply-To: <20190610232617.5094-1-anusha.srivatsa@intel.com>

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@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>

Makes sense and looks good to me.

Reviewed-by: Manasi Navare <<manasi.d.navare@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
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-06-11 19:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10 23:26 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dp_dsc: Read the debugfs only once Anusha Srivatsa
2019-06-10 23:26 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_dp_dsc: Add a subtest to force DSC output BPP Anusha Srivatsa
2019-06-11 19:55   ` Manasi Navare
2019-06-13 22:33     ` Srivatsa, Anusha
2019-06-20  0:44     ` Srivatsa, Anusha
2019-06-11  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_dp_dsc: Read the debugfs only once Patchwork
2019-06-11 19:07 ` Manasi Navare [this message]
2019-06-12  8:00 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611190732.GA1616@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=anusha.srivatsa@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox