public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ayan Halder <Ayan.Halder@arm.com>
To: Ayan Halder <Ayan.Halder@arm.com>,
	Liviu Dudau <Liviu.Dudau@arm.com>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: nd <nd@arm.com>
Subject: [PATCH] drm/selftest:- Adding a new format(whose cpp=0) to be tested by igt_check_drm_format_min_pitch
Date: Fri, 15 Mar 2019 15:50:34 +0000	[thread overview]
Message-ID: <1552665027-16457-1-git-send-email-ayan.halder@arm.com> (raw)

We have introduced some new formats DRM_FORMAT_VUY101010, DRM_FORMAT_YUV420_8BIT,
and DRM_FORMAT_YUV420_10BIT whose cpp is 0 (as they are defined in bits per pixel).
We need to ensure that the pitch returned by drm_format_info_min_pitch() for such
formats is always 0.

Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com>
Depends on:- https://patchwork.freedesktop.org/patch/msgid/1552414556-5756-1-git-send-email-ayan.halder@arm.com
---
 drivers/gpu/drm/selftests/test-drm_format.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/selftests/test-drm_format.c b/drivers/gpu/drm/selftests/test-drm_format.c
index c5e212a..155e4ce 100644
--- a/drivers/gpu/drm/selftests/test-drm_format.c
+++ b/drivers/gpu/drm/selftests/test-drm_format.c
@@ -276,5 +276,14 @@ int igt_check_drm_format_min_pitch(void *ignored)
 	FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) !=
 			(uint64_t)(UINT_MAX - 1) * 2);
 
+	/* Test format with cpp/char_per_block 0 */
+	info = drm_format_info(DRM_FORMAT_VUY101010);
+	FAIL_ON(!info);
+	FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0);
+	FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0);
+	FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0);
+	FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 0);
+	FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 0);
+
 	return 0;
 }
-- 
2.7.4


             reply	other threads:[~2019-03-15 15:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 15:50 Ayan Halder [this message]
2019-03-15 21:57 ` [PATCH] drm/selftest:- Adding a new format(whose cpp=0) to be tested by igt_check_drm_format_min_pitch kbuild test robot
2019-03-15 23:50 ` kbuild test robot

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=1552665027-16457-1-git-send-email-ayan.halder@arm.com \
    --to=ayan.halder@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nd@arm.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