All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org, quic_aravindh@quicinc.com
Subject: Re: [igt-dev] [PATCH i-g-t v2] lib/igt_debugfs: Add IGT_CRC_SOURCE environmental variable
Date: Tue, 14 Jun 2022 13:45:16 -0700	[thread overview]
Message-ID: <b604bb7f-2a2c-5569-2c37-ee1beb219593@quicinc.com> (raw)
In-Reply-To: <YqiQVyLDEAlyklWM@platvala-desk.ger.corp.intel.com>



On 6/14/2022 6:42 AM, Petri Latvala wrote:
> On Thu, Jun 09, 2022 at 10:05:14AM -0700, Jessica Zhang wrote:
>> Adds support for the IGT_CRC_SOURCE environmental variable to make it
>> easier for drivers to run tests using custom CRC sources.
>>
>> Example usage:
>> 	`IGT_CRC_SOURCE=intf ./kms_pipe_crc_basic`
>>
>> If the IGT_CRC_SOURCE isn't set, use the original source that was passed
>> in as a parameter to pipe_crc_new().
>>
>> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>> ---
>>   lib/igt_debugfs.c | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
>> index 7e7ccf22c455..f9404acc3942 100644
>> --- a/lib/igt_debugfs.c
>> +++ b/lib/igt_debugfs.c
>> @@ -719,9 +719,15 @@ pipe_crc_new(int fd, enum pipe pipe, const char *source, int flags)
>>   	igt_pipe_crc_t *pipe_crc;
>>   	char buf[128];
>>   	int debugfs;
>> +	char *env_source;
> 
> const char *
> 
> 
> With that fixed,
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>

Applied after taking in the `const char *` change. Thanks!

- Jessica Zhang

> 
> 
>>   
>>   	igt_assert(source);
>>   
>> +	env_source = getenv("IGT_CRC_SOURCE");
>> +
>> +	if (!env_source)
>> +		env_source = source;
>> +
>>   	debugfs = igt_debugfs_dir(fd);
>>   	igt_assert(debugfs != -1);
>>   
>> @@ -736,7 +742,7 @@ pipe_crc_new(int fd, enum pipe pipe, const char *source, int flags)
>>   	pipe_crc->fd = fd;
>>   	pipe_crc->dir = debugfs;
>>   	pipe_crc->pipe = pipe;
>> -	pipe_crc->source = strdup(source);
>> +	pipe_crc->source = strdup(env_source);
>>   	igt_assert(pipe_crc->source);
>>   	pipe_crc->flags = flags;
>>   
>> -- 
>> 2.31.0
>>

      reply	other threads:[~2022-06-14 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 17:05 [igt-dev] [PATCH i-g-t v2] lib/igt_debugfs: Add IGT_CRC_SOURCE environmental variable Jessica Zhang
2022-06-09 17:35 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2022-06-09 23:21 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-06-10  0:44 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_debugfs: Add IGT_CRC_SOURCE environmental variable (rev2) Patchwork
2022-06-10 22:56 ` [igt-dev] ✓ Fi.CI.IGT: success for lib/igt_debugfs: Add IGT_CRC_SOURCE environmental variable Patchwork
2022-06-11  0:19 ` [igt-dev] ✓ Fi.CI.IGT: success for lib/igt_debugfs: Add IGT_CRC_SOURCE environmental variable (rev2) Patchwork
2022-06-14 13:42 ` [igt-dev] [PATCH i-g-t v2] lib/igt_debugfs: Add IGT_CRC_SOURCE environmental variable Petri Latvala
2022-06-14 20:45   ` Jessica Zhang [this message]

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=b604bb7f-2a2c-5569-2c37-ee1beb219593@quicinc.com \
    --to=quic_jesszhan@quicinc.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    --cc=quic_aravindh@quicinc.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.