From: "Souza, Jose" <jose.souza@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure
Date: Fri, 18 Jan 2019 22:44:09 +0000 [thread overview]
Message-ID: <726a64bd398ff4cc38c63a0c98c8d06ce65006bd.camel@intel.com> (raw)
In-Reply-To: <20190118085818.10124-3-dhinakaran.pandiyan@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2255 bytes --]
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
>
> - 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;
> }
>
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
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 22:44 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 [this message]
2019-01-18 23:37 ` Dhinakaran Pandiyan
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=726a64bd398ff4cc38c63a0c98c8d06ce65006bd.camel@intel.com \
--to=jose.souza@intel.com \
--cc=dhinakaran.pandiyan@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