Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Vignesh Raman <vignesh.raman@collabora.com>,
	<daniels@collabora.com>, <helen.koike@collabora.com>,
	<juhapekka.heikkila@gmail.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 1/3 v5] lib/igt_kms: Fix memory corruption
Date: Mon, 13 Nov 2023 11:13:29 +0530	[thread overview]
Message-ID: <b4fcc296-e894-1bc3-c699-cba331f3f68a@intel.com> (raw)
In-Reply-To: <5299cd15-dc06-5431-a13c-627b962646be@collabora.com>


On Fri-10-11-2023 05:08 pm, Vignesh Raman wrote:
> Hi Bhanu,
> 
> On 10/11/23 15:21, Modem, Bhanuprakash wrote:
>>> @@ -2770,6 +2770,10 @@ void igt_display_require(igt_display_t 
>>> *display, int drm_fd)
>>>       }
>>>   #endif
>>> +    igt_require_f(resources->count_crtcs <= IGT_MAX_PIPES,
>> ---------------------------------------------^
>> As pipe index starts from 0, we must use '<' not '<='.
> 
> igt_require_f - Skip a (sub-)test if a condition is not met
> 
> igt_require_f(resources->count_crtcs <= IGT_MAX_PIPES,
>                       "count_crtcs exceeds IGT_MAX_PIPES, 
> resources->count_crtcs=%d, IGT_MAX_PIPES=%d\n",
>                       resources->count_crtcs, IGT_MAX_PIPES);
> 
> If count_crtcs=16 and IGT_MAX_PIPES=16 (In the current case with 
> virtio-gpu),
> 
> count_crtcs <= IGT_MAX_PIPES will be true and test requirement is passed 
> and following statement will be executed.
> display->n_pipes = IGT_MAX_PIPES;
> 
> In another case,
> count_crtcs < IGT_MAX_PIPES will be false and test will be skipped,
> 
> So we need to use <= right?

Correct, please ignore my previous comment. Thanks for the clarification.

- Bhanu

> 
>>>   enum pipe {
>>> @@ -70,7 +80,15 @@ enum pipe {
>>>           PIPE_F,
>>>       PIPE_G,
>>>       PIPE_H,
>>> -        IGT_MAX_PIPES
>>> +    PIPE_I,
>>> +    PIPE_J,
>>> +    PIPE_K,
>>> +    PIPE_L,
>>> +    PIPE_M,
>>> +    PIPE_N,
>>> +    PIPE_O,
>>> +    PIPE_P,
>>> +    IGT_MAX_PIPES
>>
>> Please don't mix tabs & spaces, and try to align with the declaration 
>> of previous pipes.
> 
> The previous ones G and H used tabs and the rest were spaces. I will use 
> spaces for all now.
> 
>>
>> Apart from these minor fixes, this patch LGTM. With above comments 
>> addressed, this patch is
>>
>> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> 
> Thank you.
> 
> Regards,
> Vignesh

  reply	other threads:[~2023-11-13  5:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  8:41 [igt-dev] [PATCH i-g-t 1/3 v5] lib/igt_kms: Fix memory corruption Vignesh Raman
2023-11-10  8:41 ` [igt-dev] [PATCH i-g-t 2/3 v5] tests: Update test documentation Vignesh Raman
2023-11-10  9:52   ` Modem, Bhanuprakash
2023-11-10 13:57   ` Helen Koike
2023-11-10  8:41 ` [igt-dev] [PATCH i-g-t 3/3 v5] intel-ci: Blacklist tests on pipe I to pipe P Vignesh Raman
2023-11-10  9:53   ` Modem, Bhanuprakash
2023-11-10 13:58   ` Helen Koike
2023-11-10  9:51 ` [igt-dev] [PATCH i-g-t 1/3 v5] lib/igt_kms: Fix memory corruption Modem, Bhanuprakash
2023-11-10 11:38   ` Vignesh Raman
2023-11-13  5:43     ` Modem, Bhanuprakash [this message]
2023-11-10 10:21 ` [igt-dev] ✓ CI.xeBAT: success for series starting with [i-g-t,1/3,v5] " Patchwork
2023-11-10 10:30 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-11-10 15:56 ` [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=b4fcc296-e894-1bc3-c699-cba331f3f68a@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=daniels@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=vignesh.raman@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox