From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: "Souza, Jose" <jose.souza@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure
Date: Fri, 18 Jan 2019 15:37:20 -0800 [thread overview]
Message-ID: <1cdf90d6a743dbd858be436e8c0d58b142f689de.camel@intel.com> (raw)
In-Reply-To: <726a64bd398ff4cc38c63a0c98c8d06ce65006bd.camel@intel.com>
On Fri, 2019-01-18 at 14:44 -0800, Souza, Jose wrote:
> On Fri, 2019-01-18 at 00:58 -0800, Dhinakaran Pandiyan wrote:
> > The size of the UV is not calculated correctly - height is not tile
> > aligned. Make use the stride and offset values intilized in the
> > previous patch to calculate plane size. The next step would be to
> > rewrite
> > test to make use of the library functions, but for now this should
> > fix
> > NV12.
>
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
>
> >
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> > tests/kms_available_modes_crc.c | 17 +++++++++++------
> > 1 file changed, 11 insertions(+), 6 deletions(-)
> >
> > diff --git a/tests/kms_available_modes_crc.c
> > b/tests/kms_available_modes_crc.c
> > index fbc40297..c0f33f3c 100644
> > --- a/tests/kms_available_modes_crc.c
> > +++ b/tests/kms_available_modes_crc.c
> > @@ -197,17 +197,18 @@ static bool fill_in_fb(data_t *data,
> > igt_output_t *output, igt_plane_t *plane,
> > writesize = data->size;
> > break;
> > case BYTES_PP_1:
> > - memset((void*)data->buf, fillers[i].value, data->size);
> > + memset((void *)data->buf, fillers[i].value, data-
> > > size);
> >
> > writesize = data->size;
> > break;
> > case NV12:
> > - memset((void*)data->buf, fillers[i].value&0xff,
> > - data->size);
> > + memset((void *)data->buf, fillers[i].value&0xff,
> > + data->fb.offsets[1]);
>
> Nit:
> s/fillers[i].value&0xff/fillers[i].value & 0xff
The whole file needs styling improvements, didn't want to change just
this line.
Thanks for the review.
-DK
>
> >
> > - memset((void*)(data->buf+data->size),
> > - (fillers[i].value>>8)&0xff, data->size/2);
> > + memset((void *)(data->buf+data->fb.offsets[1]),
> > + (fillers[i].value>>8)&0xff,
> > + data->size - data->fb.offsets[1]);
> >
> > - writesize = data->size+data->size/2;
> > + writesize = data->size;
> > break;
> > case P010:
> > ptemp_16_buf = (unsigned short*)data->buf;
> > @@ -302,6 +303,10 @@ static bool setup_fb(data_t *data,
> > igt_output_t
> > *output, igt_plane_t *plane,
> > data->fb.offsets[1] = data->size;
> > data->fb.strides[1] = data->fb.strides[0];
> > gemsize = data->size * 2;
> > +
> > + if (fillers[i].bpp == NV12)
> > + data->size += data->fb.strides[1] * ALIGN(h/2,
> > tile_height);
> > +
> > num_planes = 2;
> > }
> >
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-01-18 23:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
2019-01-18 8:58 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct Dhinakaran Pandiyan
2019-01-18 22:24 ` Souza, Jose
2019-01-18 22:42 ` Souza, Jose
2019-01-18 8:58 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure Dhinakaran Pandiyan
2019-01-18 22:44 ` Souza, Jose
2019-01-18 23:37 ` Dhinakaran Pandiyan [this message]
2019-01-18 9:57 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Patchwork
2019-01-18 15:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-21 7:44 ` [igt-dev] [PATCH i-g-t 1/3] " Kahola, Mika
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=1cdf90d6a743dbd858be436e8c0d58b142f689de.camel@intel.com \
--to=dhinakaran.pandiyan@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jose.souza@intel.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