From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: "Surendrakumar Upadhyay,
TejaskumarX" <tejaskumarx.surendrakumar.upadhyay@intel.com>,
"Sharma, Swati2" <swati2.sharma@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [i-g-t] tests/kms_plane_alpha_blend: Align width to 256B
Date: Mon, 2 Aug 2021 17:41:09 +0300 [thread overview]
Message-ID: <23ed24c7-381d-8097-b19d-6f4d4934026f@gmail.com> (raw)
In-Reply-To: <SN6PR11MB34210D1C5FF9B12A07947902DFEF9@SN6PR11MB3421.namprd11.prod.outlook.com>
On 2.8.2021 17.16, Surendrakumar Upadhyay, TejaskumarX wrote:
> Hi JP,
>
> You are right i915 driver is giving 64B aligned buffer but test uses raw width and thus it requires width to be aligned.
I don't understand what you mean with raw width? This is in use:
mode = igt_output_get_mode(output);
w = mode->hdisplay;
I see on kms_plane_alpha_blend is allocated framebuffer using normal igt
functions like igt_create_fb(..) and then renders onto them with cairo,
just like any other kms test. igt_create_fb(..) will create fb for you
which is all correct, it get alignments from calc_plane_stride(..) which
in this case will say stride alignment is 64 bytes since linear fb is in
use. If these are wrong you will start to see all kms tests fail equally.
/Juha-Pekka
>
> Thanks,
> Tejas
>
>> -----Original Message-----
>> From: Sharma, Swati2 <swati2.sharma@intel.com>
>> Sent: 02 August 2021 18:35
>> To: juhapekka.heikkila@gmail.com; Surendrakumar Upadhyay, TejaskumarX
>> <tejaskumarx.surendrakumar.upadhyay@intel.com>; igt-
>> dev@lists.freedesktop.org
>> Subject: Re: [igt-dev] [i-g-t] tests/kms_plane_alpha_blend: Align width to
>> 256B
>>
>> Hi JP,
>>
>> Tejas reapplied the same fix as in
>> https://patchwork.freedesktop.org/patch/445010/?series=92751&rev=2
>> which was reviewed by Daniel.
>>
>> On 02-Aug-21 5:42 PM, Juha-Pekka Heikkila wrote:
>>> Hi Tejas, Swati,
>>>
>>> I was confused when I read this patch, mind you tell what happen here?
>>> To me it look like nothing matches with each other with the patch.
>>>
>>> Even subject is telling other things than what this patch actually does.
>>>
>>> On 30.7.2021 8.50, Sharma, Swati2 wrote:
>>>> Reviewed-by:
>>>> Swati Sharma <swati2.sharma@intel.com>
>>>>
>>>> On 28-Jul-21 10:25 AM, Tejas Upadhyay wrote:
>>>>> some display resolutions like 1366x768 6bpc which does not have 64B
>>>>> aligned width are creating crc mismatch in kms_plane_alpha_blend
>>>>> test on Intel platforms.
>>>
>>> hm. You are saying none of Intel hw is able to show 1366 wide
>>> framebuffers correctly? And it is fixed by hiding it from being tested?
>>>
>>> Memory given from kernel will have 64B alignment. You can easily see
>>> by yourself.
>>>
>>>>>
>>>>> Also having different alignment requirement by different drivers,
>>>>> 256B aligned width should work for all drm drivers.
>>>
>>> You are saying you are fixing some problem with Intel hw, what does
>>> all this other stuff have to do with it? None of those other drivers
>>> are able to show 1366 pixels wide framebuffers either?
>>>
>>>>>
>>>>> amdgpu and radeon, amdgpu_align_pitch: 256B armada, armada_pitch:
>>>>> 128B
>>>>> exynos_drm_gem_dumb_create: No alignment required
>>>>> drm_gem_shmem_dumb_create: 8B
>>>>> drm_gem_vram_fill_create_dumb: 8B
>>>>>
>>>>> Thus 256B covers everything we see in the kernel drm drivers.
>>>>> Signed-off-by: Tejas Upadhyay
>>>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>
>>>>> ---
>>>>> tests/kms_plane_alpha_blend.c | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/tests/kms_plane_alpha_blend.c
>>>>> b/tests/kms_plane_alpha_blend.c index d649a09f..864e83f9 100644
>>>>> --- a/tests/kms_plane_alpha_blend.c
>>>>> +++ b/tests/kms_plane_alpha_blend.c
>>>>> @@ -168,6 +168,7 @@ static void prepare_crtc(data_t *data,
>>>>> igt_output_t *output, enum pipe pipe)
>>>>> w = mode->hdisplay;
>>>>> h = mode->vdisplay;
>>>>> + w = ALIGN(w, 256);
>>>
>>> This doesn't cause anything to align with 256 bytes. This makes fb
>>> width in pixels divisible by 256. For anything to do with fb
>>> alignments..this has very little to do. Kernel will do viewport
>>> clipping hence for actual intended test this does nothing. FB
>>> alignments are handled otherwise as in this case with with linear fb will
>> have 64 bytes per stride.
>>>
>>>>> /* recreate all fbs if incompatible */
>>>>> if (data->xrgb_fb.width != w || data->xrgb_fb.height != h) {
>>>>> cairo_t *cr;
>>>>>
>>>>
>>>
>>> If this patch actually fixed anything you'll need to create hw wa and
>>> this need to be fixed in kernel. Not testing is not fixing. Imo there
>>> should be no problem for Intel hw to show varying fb sizes, including
>>> 1366 wide.
>>>
>>> /Juha-Pekka
>>
>> --
>> ~Swati Sharma
next prev parent reply other threads:[~2021-08-02 14:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 4:55 [igt-dev] [i-g-t] tests/kms_plane_alpha_blend: Align width to 256B Tejas Upadhyay
2021-07-28 6:15 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-07-28 8:57 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-07-28 14:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-29 8:39 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane_alpha_blend: Align width to 256B (rev2) Patchwork
2021-07-29 11:23 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-07-29 16:04 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2021-07-30 5:50 ` [igt-dev] [i-g-t] tests/kms_plane_alpha_blend: Align width to 256B Sharma, Swati2
2021-08-02 12:12 ` Juha-Pekka Heikkila
2021-08-02 13:04 ` Sharma, Swati2
2021-08-02 14:16 ` Juha-Pekka Heikkila
2021-08-02 14:16 ` Surendrakumar Upadhyay, TejaskumarX
2021-08-02 14:41 ` Juha-Pekka Heikkila [this message]
2021-08-02 19:19 ` Juha-Pekka Heikkilä
2021-08-03 4:55 ` Surendrakumar Upadhyay, TejaskumarX
2021-08-03 9:29 ` Juha-Pekka Heikkilä
2021-08-03 16:16 ` Srinivas, Vidya
2021-08-03 17:49 ` Juha-Pekka Heikkilä
2021-08-04 3:11 ` Srinivas, Vidya
2021-08-04 4:20 ` Surendrakumar Upadhyay, TejaskumarX
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=23ed24c7-381d-8097-b19d-6f4d4934026f@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.com \
--cc=tejaskumarx.surendrakumar.upadhyay@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